File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,8 @@ export class TradeQuoter {
253
253
// BigNumber does not do fixed point math & FixedNumber underflows w/ numbers less than 1
254
254
// Multiply the slippage by a factor and divide the end result by same...
255
255
const percentMultiplier = 1000 ;
256
- const slippageToleranceBN = Math . floor ( percentMultiplier * this . outputSlippageTolerance ( slippagePercentage ) ) ;
256
+ const slippageAndFee = slippagePercentage + feePercentage ;
257
+ const slippageToleranceBN = Math . floor ( percentMultiplier * this . outputSlippageTolerance ( slippageAndFee ) ) ;
257
258
const toTokenAmountMinusSlippage = toTokenAmount . mul ( slippageToleranceBN ) . div ( percentMultiplier ) ;
258
259
const toUnits = toTokenAmountMinusSlippage . mul ( SCALE ) . div ( setTotalSupply ) ;
259
260
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ export const tradeQuoteFixtures = {
181
181
gasPrice : '61' ,
182
182
slippagePercentage : '2.00%' ,
183
183
fromTokenAmount : '1126868991563' ,
184
- toTokenAmount : '91245821628 ' ,
184
+ toTokenAmount : '90314741816 ' ,
185
185
display : {
186
186
inputAmountRaw : '.5' ,
187
187
inputAmount : '500000000000000000' ,
You can’t perform that action at this time.
0 commit comments