DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: medium
Invalid

Malicious user can DOS claimAndSwap

Summary

Part of the purpose of the claimAndSwap is to claim WETH and exchange it for alETH during depegs on the condition that they're on a premium, however malicious user can frontrun this function to ensure the critical condition of swapping at a preminum is not met and the function reverts.

Vulnerability Details

this is the attack path

  1. Attacker acquires large amounts of alETH from Curve pool

  2. Price of alETH/WETH increases significantly

  3. Strategy's claimAndSwap becomes impossible because:

    • Either _minOut check fails

    • Or actual swap fails due to insufficient output

  4. Strategy becomes unable to convert claimed WETH back to alETH

Impact

  • Opportunity cost from inability to execute swaps

  • Locked funds in wrong token form

Tools Used

Manual Review

Recommendations

Add a circuit breaker that counteracts market volatility

modifier withCircuitBreaker(uint256 amount) {
require(amount <= MAX_SWAP_SIZE, "Swap too large");
require(!isPriceVolatile(), "Market too volatile");
_;
}
Updates

Appeal created

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.