The StrategyOp::claimAndSwap
function allows keepers to claim WETH and swap it to alETH. If the swap path or the amount is predictable, it could be front-run by an attacker to manipulate the swap rate.
Severity: MEDIUM
Explanation: The claimAndSwap
function allows keepers to claim WETH and swap it to alETH. If the swap path or the amount is predictable (i.e. if any user next to claim and swap the tokens, can predict the swap rate and place the order to swap his respective tokens), it could be front-run by an attacker to manipulate the swap rate.
Front-running attacks could lead to unfavorable swap rates and potential loss of funds. Since an attacker can predict the swap rate, making it easier and more predictable for him to detect the HIGHEST swap rate and place the swap order for these tokens whenever the swap rate is HIGH, resulting in favorable swap rates for the attacker and unfavorable for other users and for the protocol itself.
Manual Testing
Implement mechanisms to randomize or obscure the swap path and amounts, or use a decentralized exchange with anti-front-running measures. Below updated code of StrategyOp::claimAndSwap
function implements the randomize mechanism.
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.