estimate_4626_redeem
Documentation for eth_defi.erc_4626.estimate.estimate_4626_redeem function.
- estimate_4626_redeem(vault, owner, share_amount, receiver=None, block_identifier='latest', fallback_using_share_price=True)
Estimate how much denomination token (USDC) we get if we cash out the shares.
The vault should deduct its fees from this amount.
The estimation is done using previewRedeem()
See also
eth_defi.erc_4626.flow.redeem_4626()for the transaction crafting and notes.
- Parameters
fallback_using_share_price –
If previewRedeem() fails (some vaults may not implement it properly), fall back to estimating the value using the share price.
This will also happen if the vault has lockups (Plutus) and shares cannot be redeemed at the moment.
vault (eth_defi.erc_4626.vault.ERC4626Vault) –
owner (Optional[eth_typing.evm.HexAddress]) –
share_amount (decimal.Decimal) –
receiver (Optional[eth_typing.evm.HexAddress]) –
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, hexbytes.main.HexBytes, int]) –
- Returns
Amount of USDC we get when existing the vault with the shares.
- Return type