Using same slippage value for single swaps and multi-hop swaps allows single swaps to be executed at worse prices.
Protocol uses calculateAmountOutMin to calculate the amount of tokenOut expected considering the slippageToleranceBps
variable.
This function is used in both single-swap - executeSwapExactSingle and multi-hop swaps - executeSwapExactInput, given the provided pools path.
Multi-hop swaps needs a larger slippage tolerance to account for fees paid to multiple pools and accumulated slippage over the same pools.
By using same slippageToleranceBps
value for both types of swap allows single swap to be executed with with higher slippage than necessary.
Single pool swaps may be executed at worse rates, to the detriment of protocol.
Consider adding a new slippageToleranceBpsSingleSwap
and use it for single single pool token swaps.
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.