The withdrawLiquidity function of the StakingPool
withdraws tokens from strategies
when called by the PriorityPool
. The function loops through all the strategies
to withdraw the assets.
The issue with the current implementation is that a check is made by the strategy to ensure that a sufficient amount of unbonded tokens is available to proceed with the operation.
If the amount exceeds the total unbonded tokens, the call will revert. The issue is that this happens within a loop, meaning if the amount for one or more strategies exceeds the totalUnbonded
, the entire transaction will revert.
The withdrawal of assets from the strategies
will fail, causing the entire transaction to revert, even when it shouldn't.
Manual review
Implement a try-catch block to ensure that if one withdrawal fails and causes a revert, the remaining iterations in the loop will continue executing, allowing the other strategies to proceed with the withdrawal.
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.