Function: _redeem(uint256 shares, address receiver, address owner)
This allows the redemption of shares from the vault.
Inputs
shares
Control: Fully controlled by the caller.
Constraints: Limited to the balance of
owner
.Impact: The amount of assets to withdraw from the vault.
receiver
Control: Fully controlled by the caller.
Constraints: None.
Impact: The address to mint the shares to.
owner
Control: Fully controlled by the caller.
Constraints: None.
Impact: The address owning the assets to withdraw.
Branches and code coverage (including function calls)
Intended branches
Deplete the balance of assets for
address(this)
byassets
.Increase the balance of assets for
receiver
byassets
.Burn
shares
fromowner
.
Negative behavior
Should not allow spending more than the allowance if the caller is not the owner.
Should not allow withdrawing more assets than what is burned.