Skip to content

Commit

Permalink
feat(no-rounding): removes rounding from sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexangelj committed Apr 18, 2022
1 parent 210b81d commit 4d1f13b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/entities/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export class Pool extends Calibration {

/**
*
* @remarks Rounds down! rmm-core: Reserve.sol.getAmounts() computes the amount of tokens
* @remarks rmm-core: Reserve.sol.getAmounts() computes the amount of tokens
* to withdraw when removing liquidity.
*
* @param delLiquidity Amount of liquidity to mint or burn.
Expand All @@ -384,8 +384,8 @@ export class Pool extends Calibration {

let delRisky: Wei = parseWei(0, reserveRisky.decimals)
let delStable: Wei = parseWei(0, reserveStable.decimals)
delRisky = reserveRisky.mul(delLiquidity).div(liquidity).sub(1)
delStable = reserveStable.mul(delLiquidity).div(liquidity).sub(1)
delRisky = reserveRisky.mul(delLiquidity).div(liquidity)
delStable = reserveStable.mul(delLiquidity).div(liquidity)

invariant(
delRisky.decimals === reserveRisky.decimals,
Expand Down

0 comments on commit 4d1f13b

Please sign in to comment.