The claimAndSwap
function in the StrategyMainnet
contract is vulnerable to MEV attacks due to predictable value changes, allowing users to extract profits by timing deposits and withdrawals around the swap execution.
The vulnerability exists in the claimAndSwap
function in StrategyMainnet.sol
:
The issue occurs because:
The swap execution creates a predictable increase in strategy value due to the premium received when swapping WETH to alETH
Users can observe pending claimAndSwap
transactions in the mempool
Users can:
Front-run by depositing before the swap
Back-run by withdrawing after the swap and report
Extract the majority of the swap yield as profit
Users can extract value from the strategy at the expense of other depositors by:
Capturing the majority of swap premiums through well-timed deposits/withdrawals
Reducing returns for long-term strategy holders
Making the strategy unprofitable for its intended purpose
Manual Review
Use a private mempool for swap execution or consider adding withdrawal fee or timelock to at least make the attack unprofitable or too risky.
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.