Function: unstake(address receiver)
This function unstakes assets after the cooldown period ends.
Inputs
receiver
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Address to receive the assets.
Branches and code coverage
Intended branches
Check that the receiver is not the zero address.
Check that the caller's cooldown period has ended.
Set caller's cooldown and
underlyingAmount
to zero.Call silo's withdraw function to withdraw assets with the amount of
underlyingAmount
.
Negative behavior
If the receiver is the zero address, the transaction will be reverted.
If the caller's cooldown period has not ended, the transaction will be reverted.