In Fees.sellProfits()
swaps are executed through the Uniswap V3 router.The amountOutMinimum
value has been set to 0,without slippage protection, this is vulnerable to sandwich attacks.
As the code below, the UniV3SwapInput function uses the Uniswap V3 router's exactInput function to perform the swap. However, it does not specify a minimum acceptable amount of the desired token to be received (amountOutMinimum:0). This omission leaves the transaction vulnerable to slippage, as there is no guarantee that the desired output amount will be obtained at the expected price.
Swaps will be sandwiched causing a loss of funds for users.
Vscode
To address this issue, it is recommended to incorporate slippage protection by setting a reasonable amountOutMinimum parameter. This ensures that the swap will only be executed if the received output amount meets or exceeds the specified minimum threshold, protecting against adverse price movements during the transaction.
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.