Normalize remove liquidity exchange rate
This commit is contained in:
parent
f87aa671a3
commit
207df31154
@ -198,7 +198,7 @@ class RemoveLiquidity extends Component {
|
||||
const ownership = liquidityBalance.dividedBy(totalSupply);
|
||||
const ethPer = ethReserve.dividedBy(totalSupply);
|
||||
const tokenPer = tokenReserve.dividedBy(totalSupply);
|
||||
const exchangeRate = tokenReserve.div(ethReserve);
|
||||
const exchangeRate = tokenReserve.multipliedBy(10 ** (18 - tokenDecimals)).div(ethReserve);
|
||||
|
||||
const ownedEth = ethPer.multipliedBy(liquidityBalance).dividedBy(10 ** 18);
|
||||
const ownedToken = tokenPer.multipliedBy(liquidityBalance).dividedBy(10 ** tokenDecimals);
|
||||
|
Loading…
Reference in New Issue
Block a user