erc_4626.estimate

Documentation for eth_defi.erc_4626.estimate Python module.

ERC-4626 estimations.

  • Deposit: estimate number of shares we are going to receive

  • Redeem: estimate how much underlying denomination we are going to receive when burning shares

Functions

estimate_4626_deposit(vault, ...[, ...])

Estimate how much shares we get for a deposit.

estimate_4626_redeem(vault, owner, share_amount)

Estimate how much denomination token (USDC) we get if we cash out the shares.

estimate_value_by_share_price(vault, ...[, ...])

Estimate ownership value by the share price.

estimate_4626_deposit(vault, denomination_token_amount, block_identifier='latest')

Estimate how much shares we get for a deposit.

  • The vault should deduct its fees from this amount.

  • The estimation is done using previewRedeem()

Returns

Amount of USDC we get when existing the vault with the shares.

Parameters
Return type

decimal.Decimal

estimate_value_by_share_price(vault, share_amount, block_identifier='latest')

Estimate ownership value by the share price.

Parameters
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

Parameters
Returns

Amount of USDC we get when existing the vault with the shares.

Return type

decimal.Decimal