TokenisedFundDepositManager

Documentation for eth_defi.tokenised_fund.vault.TokenisedFundDepositManager Python class.

class TokenisedFundDepositManager

Bases: eth_defi.vault.deposit_redeem.VaultDepositManager

Non-operational manager for permissioned tokenised funds.

The manager exposes the common vault-flow interface so scanner metadata can distinguish a deliberately unsupported permissioned product from an adapter whose capability is unknown. It never constructs, settles, or analyses a transaction because tokenised-fund dealing requires issuer-specific eligibility and servicing.

Attributes summary

web3

Methods summary

__init__(vault)

analyse_deposit(claim_tx_hash, deposit_ticket)

Reject analysis because this manager cannot produce deposit transactions.

analyse_redemption(claim_tx_hash, ...)

Reject analysis because this manager cannot produce redemption transactions.

can_create_deposit_request(owner)

Return false because public tokenised-fund deposits are unsupported.

can_create_redemption_request(owner)

Return false because public tokenised-fund redemptions are unsupported.

can_finish_deposit(deposit_ticket)

Return false because this manager cannot create deposits.

can_finish_redeem(redemption_ticket)

Return false because this manager cannot create redemptions.

create_deposit_request(owner[, to, amount, ...])

Reject creation of a public tokenised-fund deposit.

create_redemption_request(owner[, to, ...])

Reject creation of a public tokenised-fund redemption.

estimate_deposit(owner, amount[, ...])

Reject estimation of an unsupported deposit.

estimate_redeem(owner, shares[, ...])

Reject estimation of an unsupported redemption.

estimate_redemption_delay()

Reject delay estimation for an unsupported redemption.

fetch_completed_redemption_tx_hash(ticket)

Find an operator-owned terminal redemption transaction when available.

fetch_vault_flow_events(hypersync_client, ...)

Fetch asynchronous vault request events from an indexed backend.

finish_deposit(deposit_ticket)

Reject completion of an unsupported deposit.

finish_redemption(redemption_ticket)

Reject completion of an unsupported redemption.

force_settle(ticket)

Reject settlement of an unsupported tokenised-fund flow.

get_deposit_approval_target()

Return the ERC-20 spender required for a deposit request.

get_deposit_delay_over(address)

Estimate when a pending async deposit request will settle.

get_deposit_request_status(ticket)

Query the current status of an async deposit request.

get_max_deposit(owner)

Return zero because this manager refuses public deposits.

get_redemption_delay_over(address)

Return no deadline because no redemption can be created.

get_redemption_request_status(ticket)

Query the current status of an async redemption request.

has_synchronous_deposit()

Return false because no public deposit flow is supported.

has_synchronous_redemption()

Return false because no public redemption flow is supported.

is_deposit_in_progress(owner)

Return false because this manager cannot create deposits.

is_redemption_in_progress(owner)

Return false because this manager cannot create redemptions.

reclaim_deposit(ticket)

Reject recovery because this manager cannot create deposit tickets.

reclaim_withdrawal(ticket)

Reject recovery because this manager cannot create redemption tickets.

reconstruct_deposit_ticket(data)

Reconstruct a deposit ticket from a serialised dict.

reconstruct_redemption_ticket(data)

Reconstruct a redemption ticket from a serialised dict.

serialize_deposit_ticket(ticket)

Serialise a deposit ticket to a dict for persistence.

serialize_redemption_ticket(ticket)

Serialise a redemption ticket to a dict for persistence.

force_settle(ticket)

Reject settlement of an unsupported tokenised-fund flow.

Parameters

ticket (Optional[Union[eth_defi.vault.deposit_redeem.DepositTicket, eth_defi.vault.deposit_redeem.RedemptionTicket]]) –

Return type

eth_defi.vault.deposit_redeem.VaultForcedSettlementResult

reclaim_deposit(ticket)

Reject recovery because this manager cannot create deposit tickets.

Parameters

ticket (eth_defi.vault.deposit_redeem.DepositTicket) –

Return type

Optional[web3.contract.contract.ContractFunction]

reclaim_withdrawal(ticket)

Reject recovery because this manager cannot create redemption tickets.

Parameters

ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) –

Return type

Optional[web3.contract.contract.ContractFunction]

has_synchronous_deposit()

Return false because no public deposit flow is supported.

Return type

bool

has_synchronous_redemption()

Return false because no public redemption flow is supported.

Return type

bool

estimate_deposit(owner, amount, block_identifier='latest')

Reject estimation of an unsupported deposit.

Parameters
Return type

decimal.Decimal

estimate_redeem(owner, shares, block_identifier='latest')

Reject estimation of an unsupported redemption.

Parameters
Return type

decimal.Decimal

create_deposit_request(owner, to=None, amount=None, raw_amount=None, check_max_deposit=True, check_enough_token=True)

Reject creation of a public tokenised-fund deposit.

Parameters
Return type

eth_defi.vault.deposit_redeem.DepositRequest

create_redemption_request(owner, to=None, shares=None, raw_shares=None, check_max_deposit=True, check_enough_token=True)

Reject creation of a public tokenised-fund redemption.

Parameters
Return type

eth_defi.vault.deposit_redeem.RedemptionRequest

is_redemption_in_progress(owner)

Return false because this manager cannot create redemptions.

Parameters

owner (eth_typing.evm.HexAddress) –

Return type

bool

is_deposit_in_progress(owner)

Return false because this manager cannot create deposits.

Parameters

owner (eth_typing.evm.HexAddress) –

Return type

bool

can_create_deposit_request(owner)

Return false because public tokenised-fund deposits are unsupported.

Parameters

owner (eth_typing.evm.HexAddress) –

Return type

bool

get_max_deposit(owner)

Return zero because this manager refuses public deposits.

Parameters

owner (eth_typing.evm.HexAddress) –

Return type

decimal.Decimal

can_create_redemption_request(owner)

Return false because public tokenised-fund redemptions are unsupported.

Parameters

owner (eth_typing.evm.HexAddress) –

Return type

bool

can_finish_redeem(redemption_ticket)

Return false because this manager cannot create redemptions.

Parameters

redemption_ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) –

Return type

bool

can_finish_deposit(deposit_ticket)

Return false because this manager cannot create deposits.

Parameters

deposit_ticket (eth_defi.vault.deposit_redeem.DepositTicket) –

Return type

bool

finish_deposit(deposit_ticket)

Reject completion of an unsupported deposit.

Parameters

deposit_ticket (eth_defi.vault.deposit_redeem.DepositTicket) –

Return type

web3.contract.contract.ContractFunction

finish_redemption(redemption_ticket)

Reject completion of an unsupported redemption.

Parameters

redemption_ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) –

Return type

Optional[web3.contract.contract.ContractFunction]

estimate_redemption_delay()

Reject delay estimation for an unsupported redemption.

Return type

datetime.timedelta

get_redemption_delay_over(address)

Return no deadline because no redemption can be created.

Parameters

address (Union[eth_typing.evm.HexAddress, str]) –

Return type

Optional[datetime.datetime]

analyse_deposit(claim_tx_hash, deposit_ticket)

Reject analysis because this manager cannot produce deposit transactions.

Parameters
Return type

Union[eth_defi.vault.deposit_redeem.DepositRedeemEventAnalysis, eth_defi.vault.deposit_redeem.DepositRedeemEventFailure]

analyse_redemption(claim_tx_hash, redemption_ticket)

Reject analysis because this manager cannot produce redemption transactions.

Parameters
Return type

Union[eth_defi.vault.deposit_redeem.DepositRedeemEventAnalysis, eth_defi.vault.deposit_redeem.DepositRedeemEventFailure]

__init__(vault)
Parameters

vault (eth_defi.vault.base.VaultBase) –

fetch_completed_redemption_tx_hash(ticket)

Find an operator-owned terminal redemption transaction when available.

Claim-based protocols finish through finish_redemption() and do not need this lookup. Operator-finalised protocols override the hook to find and validate the transaction that paid the requested receiver.

Parameters

ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) – Persisted redemption request to locate.

Returns

Terminal transaction hash, or None if the protocol has not observed one yet.

Return type

Optional[hexbytes.main.HexBytes]

fetch_vault_flow_events(hypersync_client, start_block, end_block)

Fetch asynchronous vault request events from an indexed backend.

The base implementation returns no events for vault managers that do not have a two-phase deposit or redemption flow.

Parameters
  • hypersync_client – Configured Hypersync client for this vault’s chain.

  • start_block (int) – Inclusive start block.

  • end_block (int) – Inclusive end block.

Returns

Iterator of protocol-neutral pending vault flow events.

Return type

collections.abc.Iterator[eth_defi.vault.flow_events.PendingVaultFlow]

get_deposit_approval_target()

Return the ERC-20 spender required for a deposit request.

Standard ERC-4626 and the currently supported async adapters pull denomination tokens from the vault address itself. An adapter using a different router or silo must override this method; guarded callers use it to whitelist and validate the exact approval calldata.

Returns

ERC-20 approval spender address.

Return type

eth_typing.evm.HexAddress

get_deposit_delay_over(address)

Estimate when a pending async deposit request will settle.

  • Mirror of get_redemption_delay_over() for the deposit side.

  • Used to show an estimated settlement time for unsettled deposits (e.g. in the trade-executor trade-ui table).

  • Default returns None: the protocol has no deterministic on-chain settlement schedule (e.g. operator-driven ERC-7540 vaults like Lagoon). Subclasses with a predictable settlement cadence (e.g. Ostium V1.5) override this to return an estimated UTC timestamp.

Parameters

address (Union[eth_typing.evm.HexAddress, str]) – Owner of the pending deposit request.

Returns

Naive UTC timestamp when the deposit is expected to settle, or None when no on-chain estimate is available.

Return type

Optional[datetime.datetime]

get_deposit_request_status(ticket)

Query the current status of an async deposit request.

Default implementation probes via can_finish_deposit(). Subclasses should override for more accurate status reporting (e.g. distinguishing reclaimable from pending).

Parameters

ticket (eth_defi.vault.deposit_redeem.DepositTicket) –

Return type

eth_defi.vault.deposit_redeem.AsyncVaultRequestStatus

get_redemption_request_status(ticket)

Query the current status of an async redemption request.

Default implementation probes via can_finish_redeem(). Subclasses should override for more accurate status reporting.

Parameters

ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) –

Return type

eth_defi.vault.deposit_redeem.AsyncVaultRequestStatus

reconstruct_deposit_ticket(data)

Reconstruct a deposit ticket from a serialised dict.

Default returns a base DepositTicket. Subclasses override for protocol-specific ticket types.

Parameters

data (dict) –

Return type

eth_defi.vault.deposit_redeem.DepositTicket

reconstruct_redemption_ticket(data)

Reconstruct a redemption ticket from a serialised dict.

Async vault managers must override this to return their protocol-specific ticket subclass. The base implementation raises NotImplementedError because RedemptionTicket has abstract methods.

Parameters

data (dict) –

Return type

eth_defi.vault.deposit_redeem.RedemptionTicket

serialize_deposit_ticket(ticket)

Serialise a deposit ticket to a dict for persistence.

The trade-executor stores this in trade.other_data so that the settlement retry module can reconstruct the ticket after a process restart.

Default implementation stores base DepositTicket fields. Subclasses override to add protocol-specific fields (e.g. settlement_id for Ostium, requestId for ERC-7540).

Parameters

ticket (eth_defi.vault.deposit_redeem.DepositTicket) –

Return type

dict

serialize_redemption_ticket(ticket)

Serialise a redemption ticket to a dict for persistence.

Default implementation stores base RedemptionTicket fields. Subclasses override to add protocol-specific fields.

Parameters

ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) –

Return type

dict