The TokenizedStrategy:withdraw and redeem
functions allow users to specify an acceptable loss percentage when withdrawing funds. However, the current implementation of availableWithdrawLimit prevents users from withdrawing funds even when they are willing to accept losses.
Users may need to withdraw their alETH during emergencies or any other case, even at a loss. While users can specify a maxLoss parameter in the withdraw and redeem
functions, the StrategyMainnet:availableWithdrawLimit implementation prevents withdrawals beyond the available balance.
User deposits 100 alETH to strategy, which is then deposited to transmuter.
After some time, 10 alETH is converted to WETH in transmuter.
User needs to urgently withdraw their 100 alETH and accepts a 10% loss.
Since strategy:unexchangedBalance
returns 90 alETH, availableWithdrawLimit
also returns 90 alETH.
When availableWithdrawLimit
is called in TokenizedStrategy:withdraw
, the transaction reverts because 100 (assets) exceeds 90 (available).
The following test demonstrates how users cannot withdraw funds even when willing to accept losses.
Paste this test in Operation.t.sol
While the claimAndSwap
function could resolve this issue by freeing up alETH, it only executes when the alETH/WETH exchange rate is favorable enough for keepers to trigger it—an unlikely scenario given the presence of arbitrage bots.
Users cannot withdraw their funds when needed, even if they are willing to accept losses. This is a high-severity issue since user funds remain locked until market conditions favor the keeper calling claimAndSwap
to make alETH available for withdrawal.
Manual review and cursor ai
There should be a way for users to withdraw their assets even when the strategy is at a loss.
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.