The executeQueuedWithdrawals function in PriorityPool.sol lacks a crucial validation check for the pool’s status. This omission allows withdrawals to be processed even when the pool is in a CLOSED state, which contradicts the intended behavior outlined in the documentation.
The function does not include a check to verify the current status of the pool before proceeding with withdrawal operations. Specifically, it does not ensure that the pool is not in a CLOSED state before executing the withdrawal logic, allowing withdrawals to proceed when they should be restricted.
The absence of this validation allows execution of queued withdrawals even when the pool status is CLOSED—a state that, according to the documentation, should restrict both deposits and withdrawals. This vulnerability could lead to unauthorized withdrawals, potentially disrupting the intended functionality of the protocol during critical periods.
Assumes that the PriorityPool has been set to the CLOSED status (poolStatus = 2), where withdrawals should normally be disabled.
Since the PriorityPool contract does not check the poolStatus before allowing the withdrawal, the executeQueuedWithdrawals function proceeds without reverting.
The executeQueuedWithdrawals will bypass the CLOSED state and will be successfully executed.
Manual review
Introduce a status check at the beginning of the executeQueuedWithdrawals function to ensure that queued withdrawals cannot be executed when the pool is in a CLOSED state:
This check will ensure that withdrawals are correctly restricted when the pool is closed, aligning the contract’s behavior with the documented specifications.
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.