The StrategyMainnet
contract is vulnerable to a Denial of Service (DOS) attack through balance manipulation that affects the slippage check mechanism in the claimAndSwap
function. The vulnerability arises from using direct token balance checks (asset.balanceOf(address(this))
) for slippage protection.
The vulnerability stems from two design decisions:
Using direct token balance checks for slippage protection
Not accounting for potential external balance manipulations
Keeper submits a transaction to execute claimAndSwap
Attacker front-runs the transaction by sending a small amount of ALETH directly to the contract
The balBefore
check captures this artificially inflated balance
After the swap, the balAfter - balBefore
calculation returns a lower value than expected or it may fail due to underflow as balBefore can be manipulated to higher than balAfter.
The transaction reverts due to the slippage check failing.
Keeper operations can be consistently blocked
Strategy cannot perform necessary token swaps
As the strategy will be deployed on Ethereum Mainnet. Attacker can monitor the mempool and perform the attack.
Implement internal balance tracking:
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.