analyse_4626_flow_transaction
Documentation for eth_defi.erc_4626.analysis.analyse_4626_flow_transaction function.
- analyse_4626_flow_transaction(vault, tx_hash, tx_receipt, direction, hot_wallet=True, *, deposit_event_signature=None, redemption_event_signature=None)
Analyse a ERC-4626 deposit/redeem transaction.
Figure out
The success of the deposit
Slippage, etc.
Warning
Do not use TradeSuccess.price directly, as this price depends on in which order token0 and token1 are in the pool smart contract. Use TradeSuccess.get_human_price() instead.
- Parameters
tx_receipt (dict) – Transaction receipt
hot_wallet –
Is this a hot wallet originiated transaction or contract to contract transaction.
We can perform additioanl checks with hot wallet transactions.
deposit_event_signature (Optional[str]) – Explicit event signature for a vault that overloads
Deposit. This is only used for the deposit direction; plain ERC-4626 vaults leave it unset and continue to useDepositby name.redemption_event_signature (Optional[str]) – Explicit event signature for a vault that overloads
Withdraw. This is only used for the redemption direction; plain ERC-4626 vaults leave it unset and continue to useWithdrawby name.vault (eth_defi.erc_4626.vault.ERC4626Vault) –
direction (Literal['deposit', 'redeem']) –
- Return type
Union[eth_defi.trade.TradeSuccess, eth_defi.trade.TradeFail]