The queueWithdrawal function in the WithdrawalPool contract contains a check to ensure that the withdrawal amount is not less than a specified minimum (minWithdrawalAmount). This check can cause a transaction to revert when the function is called from the PriorityPool contract, particularly when the amount to be withdrawn is a residue after processing queued tokens.
A user initiates a withdrawal from the PriorityPool contract.
The PriorityPool attempts to fulfill the withdrawal request using queued tokens.
If the requested withdrawal amount exceeds the available queued tokens, the remaining amount (residue) is passed to the queueWithdrawal function in the WithdrawalPool.
If this residue amount is less than minWithdrawalAmount, the transaction reverts due to the check in queueWithdrawal.
This issue can prevent users from successfully withdrawing their tokens if the residue amount is less than the minimum withdrawal threshold.It can be adjusted by reducing the withdrawal amount or filling the withdrawal request in batches . But It can lead to user frustration and potential loss of trust in the system's reliability.
Manual Review , Cursor .
It can be solved in multiple ways . One of them could be :
Handling the residue amount within the PriorityPool contract to ensure it meets the minimum requirement before calling queueWithdrawal.
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.