Selling received fee tokens (_profits
) for WETH is susceptible to slippage due to using amountOutMinimum = 0
in the exactInputSingle
function of Uniswap V3.
Received fee tokens are swapped for WETH using the sellProfits
function. The parameter amountOutMinimum
for Uniswap V3's exactInputSingle
function is used to specify the minimum amount of tokens the caller wants to be returned from a swap. Using amountOutMinimum = 0
means that the caller accepts a minimum amount of 0 output tokens from the swap, leading to receiving less WETH than anticipated due to being vulnerable to MEV bot sandwich attacks.
Due to a lack of slippage protection, all fee token swaps are open to sandwich attacks and will lead to loss of funds.
Manual Review
Use the parameter amountOutMinimum
correctly to avoid loss of funds. amountOutMinimum
can be calculated based on a reasonable slippage threshold value (e.g., 5%).
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.