The executeERC20SwapAndFee function in the provided smart contract lacks a critical deadline check when executing token swaps. This omission may expose the contract to potential issues related to outdated quotes or liquidity, as there is no mechanism to ensure that the swap is executed within a reasonable timeframe.
The executeERC20SwapAndFee function is responsible for executing ERC-20 token swaps along with associated fees. However, it lacks a deadline parameter, leaving the door open for potential front-running attacks and risks associated with outdated quotes.
The absence of a deadline parameter means that there is no explicit check to ensure the swap is executed within a specified timeframe. This exposes the contract to potential issues, such as inefficient or failed swaps in scenarios where market conditions rapidly change.
The vulnerability increases the risk of inefficient or failed token swaps due to potential front-running attacks, outdated quotes, or other market fluctuations. This may result in financial losses and negatively impact the reliability of the contract's token swapping functionality.
Manual
Introduce a deadline parameter to the ISwapRouter.ExactInputSingleParams struct and include a deadline check within the executeERC20SwapAndFee function. Set a reasonable deadline value to ensure that token swaps are executed within a specified timeframe, minimizing the risk of front-running attacks and providing more predictable behavior.
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.