TokenisedFundDepositManager
Documentation for eth_defi.tokenised_fund.vault.TokenisedFundDepositManager Python class.
- class TokenisedFundDepositManager
Bases:
eth_defi.vault.deposit_redeem.VaultDepositManagerFail-closed, non-operational manager for permissioned tokenised funds.
Tokenised funds are issuer-operated products whose subscriptions and redemptions require investor eligibility (KYC, allow-list, transfer agent) and offchain servicing, so there is no publicly executable onchain flow. This manager still implements the full
VaultDepositManagerinterface — but every operational method is fail-closed — so scanner metadata can distinguish a deliberately unsupported permissioned product from an adapter whose capability is merely unknown. It never constructs, settles or analyses a transaction. All refusals route through_reject(), which raisesVaultFlowUnavailablewith a fixed reason (TOKENISED_FUND_FLOW_UNAVAILABLE) and the requested direction/phase.Deposit process
Unsupported / fail-closed.
has_synchronous_deposit()returnsFalse;estimate_deposit(),create_deposit_request(),finish_deposit()andanalyse_deposit()all raiseVaultFlowUnavailable.can_create_deposit_request()returnsFalseandget_max_deposit()returns zero.Redemption process
Unsupported / fail-closed.
has_synchronous_redemption()returnsFalse;estimate_redeem(),create_redemption_request(),finish_redemption()andanalyse_redemption()all raiseVaultFlowUnavailable.can_create_redemption_request()andcan_finish_redeem()returnFalse.Queues and settlement
None. No ticket can be created, so
is_deposit_in_progress()andis_redemption_in_progress()returnFalse, andreclaim_deposit()/reclaim_withdrawal()raise.Lockups and cooldowns
Not applicable / not queryable.
estimate_redemption_delay()raisesVaultFlowUnavailable, andget_redemption_delay_over()returnsNonebecause no redemption can ever be created.Whitelisting / access control
Permissioned. At the vault level
TokenisedFundVault.is_whitelisted_deposit()always returnsTrue, marking these subscriptions as gated, but concrete membership is not queryable here — eligibility is enforced offchain by the issuer, sois_account_whitelistedstays protocol-specific and this base manager does not attempt to evaluate it.Anvil settlement (force_settle)
Unlike the synchronous ERC-4626 managers,
force_settle()does not perform a no-op: it raisesVaultFlowUnavailable(phase="settlement"), because there is no fund transaction to settle.Attributes summary
web3Methods 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.
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.
check_deposit_whitelist(owner)Reject a deposit when the vault's whitelist excludes the owner.
create_deposit_request(owner[, to, amount, ...])Reject creation of a public tokenised-fund deposit.
Build deposit calldata for a closed-vault GuardV0 policy check.
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.
Reject delay estimation for an unsupported redemption.
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_redemption_liquidity(owner, ...)Provision an unavailable synchronous redemption on an Anvil fork.
force_settle(ticket, *[, mock, ignore_liquidity])Reject settlement of an unsupported tokenised-fund flow.
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.
Return false because no public deposit flow is supported.
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 a deposit ticket from a serialised dict.
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, *, mock=None, ignore_liquidity=False)
Reject settlement of an unsupported tokenised-fund flow.
- Parameters
ticket (Optional[Union[eth_defi.vault.deposit_redeem.DepositTicket, eth_defi.vault.deposit_redeem.RedemptionTicket]]) –
ignore_liquidity (bool) –
- Return type
- 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
- Return type
Optional[web3.contract.contract.ContractFunction]
- has_synchronous_deposit()
Return false because no public deposit flow is supported.
- Return type
- has_synchronous_redemption()
Return false because no public redemption flow is supported.
- Return type
- estimate_deposit(owner, amount, block_identifier='latest')
Reject estimation of an unsupported deposit.
- Parameters
owner (Optional[eth_typing.evm.HexAddress]) –
amount (decimal.Decimal) –
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) –
- Return type
- estimate_redeem(owner, shares, block_identifier='latest')
Reject estimation of an unsupported redemption.
- Parameters
owner (Optional[eth_typing.evm.HexAddress]) –
shares (decimal.Decimal) –
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) –
- Return type
- 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
owner (eth_typing.evm.HexAddress) –
to (eth_typing.evm.HexAddress) –
amount (decimal.Decimal) –
raw_amount (int) –
check_max_deposit (bool) –
check_enough_token (bool) –
- Return type
- 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
owner (eth_typing.evm.HexAddress) –
to (eth_typing.evm.HexAddress) –
shares (decimal.Decimal) –
raw_shares (int) –
check_max_deposit (bool) –
check_enough_token (bool) –
- Return type
- is_redemption_in_progress(owner)
Return false because this manager cannot create redemptions.
- Parameters
owner (eth_typing.evm.HexAddress) –
- Return type
- is_deposit_in_progress(owner)
Return false because this manager cannot create deposits.
- Parameters
owner (eth_typing.evm.HexAddress) –
- Return type
- can_create_deposit_request(owner)
Return false because public tokenised-fund deposits are unsupported.
- Parameters
owner (eth_typing.evm.HexAddress) –
- Return type
- get_max_deposit(owner)
Return zero because this manager refuses public deposits.
- Parameters
owner (eth_typing.evm.HexAddress) –
- Return type
- can_create_redemption_request(owner)
Return false because public tokenised-fund redemptions are unsupported.
- Parameters
owner (eth_typing.evm.HexAddress) –
- Return type
- can_finish_redeem(redemption_ticket)
Return false because this manager cannot create redemptions.
- Parameters
redemption_ticket (eth_defi.vault.deposit_redeem.RedemptionTicket) –
- Return type
- can_finish_deposit(deposit_ticket)
Return false because this manager cannot create deposits.
- Parameters
deposit_ticket (eth_defi.vault.deposit_redeem.DepositTicket) –
- Return type
- 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
- get_redemption_delay_over(address)
Return no deadline because no redemption can be created.
- Parameters
address (Union[eth_typing.evm.HexAddress, str]) –
- Return type
- analyse_deposit(claim_tx_hash, deposit_ticket)
Reject analysis because this manager cannot produce deposit transactions.
- Parameters
deposit_ticket (Optional[eth_defi.vault.deposit_redeem.DepositTicket]) –
- 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
redemption_ticket (Optional[eth_defi.vault.deposit_redeem.RedemptionTicket]) –
- Return type
Union[eth_defi.vault.deposit_redeem.DepositRedeemEventAnalysis, eth_defi.vault.deposit_redeem.DepositRedeemEventFailure]
- __init__(vault)
- Parameters
vault (eth_defi.vault.base.VaultBase) –
- check_deposit_whitelist(owner)
Reject a deposit when the vault’s whitelist excludes the owner.
Shared deposit-preflight helper implementing the whitelisting contract every manager must honour: when a vault applies a deposit whitelist policy that is applicable and queryable, and
owneris not a member of it, raiseWhitelistingRequiredbefore any transaction is broadcast so the caller can surface a “whitelisting required” state instead of paying gas for a guaranteed revert.The check is intentionally conservative — it only raises when the whitelist information can be obtained and is applicable:
if
is_whitelisted_deposit()raisesNotImplementedError, the vault-wide policy cannot be determined for this adapter/version, so no exception is raised;if the vault is permissionless, no exception is raised;
if
is_account_whitelisted()raisesNotImplementedError, per-account membership cannot be queried, so no exception is raised;only when the policy is applicable and the owner is provably not admitted is
WhitelistingRequiredraised.
Adapters that need a stricter fail-closed policy for an unknown admission state should override their own preflight and raise
VaultFlowUnavailablein addition to calling this helper (see the Lagoon manager for an example).- Parameters
owner (eth_typing.evm.HexAddress) – Deposit owner and controller whose whitelist membership is checked.
- Raises
WhitelistingRequired – When the vault applies an applicable, queryable whitelist policy and
owneris not permitted to deposit.- Return type
None
- create_deposit_request_for_guard_validation(owner, raw_amount)
Build deposit calldata for a closed-vault GuardV0 policy check.
This Anvil-only diagnostic path is for a consumer that has already received a typed
deposit_closedordeposit_pausedpreflight result. Adapters must override it only after proving that their typed result represents a temporary vault closure rather than a capacity or amount restriction. The returned calls must be supplied individually toGuardV0.validateCall(); callers must never broadcast them to the closed protocol vault.- Parameters
owner (eth_typing.evm.HexAddress) – SimpleVaultV0/Safe address that would own the shares.
raw_amount (int) – Denomination-token amount in the selected asset’s raw unit.
- Returns
Manager-generated deposit request suitable only for isolated GuardV0 validation.
- Raises
UnsupportedVaultSimulation – Unless the protocol-specific manager implements this diagnostic path.
- Return type
- 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
Noneif 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
- Returns
Iterator of protocol-neutral pending vault flow events.
- Return type
collections.abc.Iterator[eth_defi.vault.flow_events.PendingVaultFlow]
- force_redemption_liquidity(owner, raw_shares, failure)
Provision an unavailable synchronous redemption on an Anvil fork.
Concrete managers may implement this only for a source-proven liquidity failure. The default is deliberately unsupported: this hook must never bypass admission, minimums, maturity or time locks.
- Parameters
owner (eth_typing.evm.HexAddress) – Redemption owner.
raw_shares (int) – Exact raw share quantity requested.
failure (eth_defi.vault.deposit_redeem.VaultFlowUnavailable) – Typed preflight failure that prompted the intervention request.
- Returns
Structured intervention evidence from a concrete manager.
- Raises
UnsupportedVaultSimulation – Always for managers without a protocol-specific implementation.
- Return type
eth_defi.vault.deposit_redeem.VaultRedemptionSimulationIntervention
- 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
- 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-uitable).Default returns
None: the protocol has no deterministic onchain 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
Nonewhen no onchain estimate is available.- Return type
- 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. distinguishingreclaimablefrompending).- Parameters
ticket (eth_defi.vault.deposit_redeem.DepositTicket) –
- Return type
- 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
- Return type
- 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
- 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
NotImplementedErrorbecauseRedemptionTickethas abstract methods.- Parameters
data (dict) –
- Return type
- serialize_deposit_ticket(ticket)
Serialise a deposit ticket to a dict for persistence.
The trade-executor stores this in
trade.other_dataso that the settlement retry module can reconstruct the ticket after a process restart.Default implementation stores base
DepositTicketfields. Subclasses override to add protocol-specific fields (e.g.settlement_idfor Ostium,requestIdfor ERC-7540).- Parameters
ticket (eth_defi.vault.deposit_redeem.DepositTicket) –
- Return type
- serialize_redemption_ticket(ticket)
Serialise a redemption ticket to a dict for persistence.
Default implementation stores base
RedemptionTicketfields. Subclasses override to add protocol-specific fields.- Parameters
- Return type