The claimAndSwap function uses a keeper-provided deadline equal to the current block timestamp, which introduces potential security risks and could lead to worse execution prices.
In the claimAndSwap function, the IVeloRouter's swapExactTokensForTokens call sets the deadline parameter to the current block timestamp:
This implementation allows transactions to remain pending in the mempool and be executed in subsequent blocks. This delay can expose the transaction to front-running or sandwich attacks. Although the minOut parameter offers some level of protection, relying solely on it may not be sufficient in all scenarios.
An attacker or arbitrage bot could exploit the delayed execution caused by the current block deadline to manipulate token prices, resulting in unfavorable swap rates for users. This exposes the protocol to sandwich attacks, where attackers profit from the user's transaction while users receive suboptimal execution prices.
Slither, Manual Review
Use a Future Deadline: Replace block.timestamp with a future timestamp (e.g., block.timestamp + 300) to allow a reasonable buffer for transaction execution.
Monitor Mempool Activity: Implement additional checks to detect unusual transaction activity or delays.
Strengthen minOut Calculations: Ensure the minOut parameter is set conservatively to reduce the impact of unfavorable price changes.
Gas Price Management: Use optimized gas price strategies to ensure swift transaction inclusion in blocks, minimizing mempool delay.Improper Use of Current Block Timestamp as Swap Deadline in claimAndSwap Function
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.