While there is an existing Medium finding about MEV risks with block.timestamp
, this finding specifically addresses the larger architectural vulnerability in the claimAndSwap
function that enables sandwich attacks through its multi-step process. This is distinct from and more severe than the general MEV timestamp manipulation issue.
The claimAndSwap
function in StrategyArb contract exposes users to sandwich attacks due to its multi-step process of claiming and then swapping, combined with predictable price impact. This creates a more severe MEV opportunity than the general timestamp manipulation issue already identified.
The vulnerability lies in the sequential execution of operations:
The key issue is that the entire operation (claim → swap → deposit) is done in separate steps within a single transaction, making the token flow predictable and exploitable. This is particularly dangerous because:
The claim amount is visible in the mempool
The swap path is predetermined
The minimum output check only verifies against a user-supplied minimum
When keepers execute claimAndSwap
, attackers can front-run to artificially inflate alETH price and back-run to profit, leading to direct value extraction estimated at 1-3% of total swap amount (e.g., 1M swap).
The strategy will receive significantly less alETH than expected for the claimed WETH due to this manipulation, permanently reducing the value of user deposits in the strategy.
Since this operation occurs frequently as part of the strategy's core yield-generating mechanism, the cumulative losses from repeated sandwich attacks could make the strategy unprofitable and negate any yield advantages from the Transmuter.
To run this test:
Save as test/SandwichAttack.t.sol
Configure environment:
Run test:
Implement atomic claiming and swapping through a single function call.
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.