Add unitAmount calculation logic for 1Inch and Paraswap
thrilok209 opened this issue · 1 comments
thrilok209 commented
Eg code snippet:
let unitAmt = new BigNumber(buyAmount)
.dividedBy(10 ** buyDecimal)
.dividedBy(new BigNumber(sellAmount).dividedBy(10 ** sellDecimal))
unitAmt = unitAmt.multipliedBy((100 - slippage) / 100)
unitAmt = unitAmt.multipliedBy(1e18).toFixed(0)
return unitAmt