The amountOutMinimum
is calculated using:
However, this may result in a higher minimumAmountOut
than intended, as the amountIn
used in the ExactInputSingleParams
parameters is _amount - swapFee
, which is significantly lower depending on the swapFee
. This can lead to more reverted calls than anticipated.
The number of reverted calls may increase depending on the size of the swapFee.
Hardhat
Calculate minimumAmountOut
with the applied fee:
By adjusting the calculation to consider the swapFee
, the minimumAmountOut
will align with the expected value, reducing the likelihood of reverted calls.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.