Incorrect balance accounting when withdrawing more than available. In all three strategy implementations StrategyOp.sol, StrategyMainnet.sol, and StrategyArb.sol, the vulnerability is present within the _freeFunds function. This indicates that the issue is not isolated to a single variant but affects the core functionality across multiple strategies.
The vulnerability irugunates from incorrect balance accounting when withdrawing funds. freeFundsSafety requires that balanceAfter >= balanceBefore - amount, but this is violated when:
A withdrawal request exceeds the available unexchanged balance
The function withdraws the total available amount without properly accounting for the difference between requested and available amounts
This creates a discrepancy where the actual balance reduction can exceed the requested withdrawal amount
The issue is compounded by the fact that balanceDeployed() includes three components:
When _freeFunds withdraws the total available amount instead of the requested amount, it breaks the mathematical relationship that should exist between the withdrawal request and the resulting balance change.
In StrategyOp.sol (and similarly in other implementations)
The root cause is a fundamental mismatch between:
The balance tracking system balanceDeployed
The withdrawal logic in _freeFunds
Impact across implementations:
Optimism (StrategyOp.sol): Affects WETH/alETH handling through Velodrome
Mainnet (StrategyMainnet.sol): Impacts WETH/alETH operations via Curve
Arbitrum (StrategyArb.sol): Affects WETH/alETH management through Ramses
The bug manifests when:
A withdrawal request exceeds available unexchanged balance
The function withdraws all available funds without proper accounting
This breaks the mathematical relationship between requested withdrawal and actual balance change
This affects all supported blockchains (Optimism, Ethereum, Arbitrum) and tokens (WETH, alETH) in the system, potentially leading to incorrect balance reporting and withdrawal processing.
The bug is caused by a fundamental design flaw in the balance accounting system across all strategy implementations.
In the balance tracking system.
However, in the withdrawal logic
The root cause is the inconsistency between how balances are tracked versus how they are withdrawn:
Balance tracking considers all three components (unexchanged, underlying, asset)
Withdrawal logic only operates on unexchanged balance
When withdrawing more than available unexchanged balance, the function withdraws a different amount than requested without proper accounting
And this design flaw exists in all three implementations (StrategyOp.sol, StrategyMainnet.sol, StrategyArb.sol) and affects operations across Optimism, Ethereum, and Arbitrum networks.
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.