1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

change swapFee calculation

This commit is contained in:
Matthias Kretschmann 2020-10-26 18:57:57 +01:00
parent 4585fecb1f
commit 0658b656b1
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -51,7 +51,7 @@ export default function Dynamic({
const foo = y.pow(weightRatio).minus(new Decimal(1))
const tokenAmountIn = new Decimal(oceanAmount)
.times(foo)
.div(new Decimal(1).minus(new Decimal(swapFee)))
.div(new Decimal(1).minus(new Decimal(swapFee / 100)))
setFirstPrice(`${tokenAmountIn}`)
}, [swapFee, weightOnOcean, weightOnDataToken, dtAmount, oceanAmount])