Function: redeem(uint256 amount, bytes)
This function allows the InfiniCard Vault to redeem a specified amount of underlying tokens from the strategy.
Inputs
amountControl: Controlled by the caller with
INFINI_CARD_VAULT.Constraints: None.
Impact: The amount of tokens will be redeemed from the strategy.
bytesControl: Controlled by the caller with
INFINI_CARD_VAULT.Constraints: None.
Impact: Not used.
Branches and code coverage
Intended branches
Redeems when
amountis withinvaultPositionand sufficient shares are available.
Negative behavior
Reverts if the caller does not have the
INFINI_CARD_VAULTrole.Reverts when
amountexceedsvaultPosition.Reverts when the contract lacks enough share tokens.
Function call analysis
IERC4626(shareToken).convertToShares(amount)What is controllable?
amount.If the return value is 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? N/A.
IERC4626(market).redeem(shouldRedeemSharesAmount, address(this), address(this))What is controllable?
shouldRedeemSharesAmount.If the return value is 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? N/A.