Function: withdraw(address recipient, uint256 amount)
This function withdraws collateral from the vault.
Inputs
recipient
Control: Completely controlled by the caller.
Constraints: Cannot be
address(0)
.Impact: Account that needs to claim the withdrawal.
amount
Control: Completely controlled by the caller.
Constraints: Cannot be zero.
Impact: Amount of the collateral to withdraw.
Branches and code coverage (including function calls)
Intended branches
Withdrawal updates the active stake and shares of the sender.
Negative behavior
Reverts if called with zero amount.
Reverts if amount exceeds caller's active shares.
Reverts if recipient is
address(0)
.