The protocol allows immediate withdrawals and deposits in Stakelink staking, for efficient asset flow. This is achieved by transferring pending deposits to users withdrawing assets from Stakelink, and vice versa.
However, the issue arises when queuing a withdrawal. First, if the deposit queue is non-zero, the withdrawal amount is filled with the queue deposit. If some amount remains, the queueWithdrawal
function is called. This function enforces a minWithdrawalAmount
check, which prevents users from withdrawing their assets if the remaining amount is below the minimum threshold.
To withdraw assets from pool, user will call PriorityPool:withdraw
function. which will call internal _withdraw
function
It can be observed from the code that the withdrawal amount will either be fully or partially filled. The issue arises when the amount is partially filled, _shouldQueueWithdrawal=true
, and toWithdraw < minWithdrawalAmount
.
The user will not be able to withdraw assets from the pool, even if the initial withdrawal request meets the minimum required amount.
Manual Review
Add a check inside the _withdraw
function to ensure that the amount queued for withdrawal is not less than the required minimum if the amount is partially filled from queued deposits.
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.