The executeERC20SwapAndFee private function in the provided contract lacks explicit slippage checks during the execution of ERC-20 swaps. This absence of slippage controls may expose the contract to potential risks associated with unfavorable trade execution prices.
The executeERC20SwapAndFee function is responsible for handling the execution of ERC-20 swaps, including the transfer of a swap fee to the protocol, approving the swap router, and executing the swap itself. However, the code does not incorporate checks for slippage, which refers to the potential difference between the expected and executed trade prices. The absence of slippage controls may result in less favorable exchange rates, potentially impacting the overall security and efficiency of the contract.
User will be affected by unintended and unhandled slippage, potentially affecting the funds they get back from the swap
Manual
Implement slippage tolerance checks within the executeERC20SwapAndFee function to compare the expected price with the executed price.
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.