Function: processWithdrawalQueue(address vaultAddress, uint256 maxProcessCount)
Processes all the queued withdrawals in the withdrawal queue.
Inputs
vaultAddressControl: Fully controlled.
Constraints: Vault must have a status of
FeesCollectedorZombie.Impact: This vault's metadata is updated.
maxProcessCountControl: Fully controlled.
Constraints: N/A.
Impact: Used to constrain the amount of gas used by this function.
Branches and code coverage (including function calls)
Intended branches
Should update relevant
FCNProductstorage variables correctly.Should update relevant vault metadata properties correctly.
Should set the vault's status to
WithdrawalQueueProcessedif the entire deposit queue is processed.Should set the vault's status to
Zombieif the specific preconditions are met.Should emit a
WithdrawalQueueProcessedevent.
Negative behaviour
Should revert if the vault's status is not set to
FeesCollectedorZombie.Should revert if called by a non--trader-admin role.
Function call analysis
vault.redeem(withdrawal.amountShares, withdrawal.receiver)What is controllable? withdrawal.amountShares, withdrawal.receiver.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? Denial of service on revert, as processing the withdrawal queue is crucial to the functionality of this contract. Withdrawals may be accounted for twice on reentry, and some withdrawals will not be accounted for at all in that scenario.