VaultFlowManager
Documentation for eth_defi.vault.base.VaultFlowManager Python class.
- class VaultFlowManager[source]
Manage deposit/redemption events.
For some vault structures, we need to know how much redemptions there are in the queue, so we can rebalance to have enough cash
Create a replay of flow events that happened for a vault within a specific block range
Not implemented yet
Methods summary
__init__
()fetch_pending_deposit
(block_identifier)Get how much users want to redeem from the vault.
fetch_pending_deposit_events
(range)Read incoming pending deposits.
fetch_pending_redemption
(block_identifier)Get how much users want to redeem from the vault.
Read outgoing pending withdraws.
Read incoming pending deposits.
fetch_processed_redemption_event
(vault, range)Read outgoing pending withdraws.
- abstract fetch_pending_redemption(block_identifier)[source]
Get how much users want to redeem from the vault.
- Parameters
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) – Block number
- Returns
Number of share tokens the users want to redeem from the vault.
Shares must be valued separately.
- Return type
- abstract fetch_pending_deposit(block_identifier)[source]
Get how much users want to redeem from the vault.
- abstract fetch_pending_deposit_events(range)[source]
Read incoming pending deposits.
- Parameters
range (Tuple[eth_typing.evm.BlockNumber, eth_typing.evm.BlockNumber]) –
- Return type
None
- abstract fetch_pending_redemption_event(range)[source]
Read outgoing pending withdraws.
- Parameters
range (Tuple[eth_typing.evm.BlockNumber, eth_typing.evm.BlockNumber]) –
- Return type
None
- abstract fetch_processed_deposit_event(range)[source]
Read incoming pending deposits.
- Parameters
range (Tuple[eth_typing.evm.BlockNumber, eth_typing.evm.BlockNumber]) –
- Return type
None
- abstract fetch_processed_redemption_event(vault, range)[source]
Read outgoing pending withdraws.
- Parameters
vault (eth_defi.vault.base.VaultSpec) –
range (Tuple[eth_typing.evm.BlockNumber, eth_typing.evm.BlockNumber]) –
- Return type
None