Tokenised fund price scheduling
The recurring price-feed registry integrates reviewed tokenised-fund adapters with the all-chain vault scanner. It selects already registered products by their persisted protocol feature, writes address-scoped daily samples and keeps each protocol’s scheduler result separate. Every product has an independent continuation and rewrite boundary so a missing-history bootstrap cannot remove another product’s rows.
Stable issuer NAVs still emit one approximate daily sample. This keeps the dashboard freshness timestamp current even when the value does not change.
Operator settings and bootstrap behaviour are documented in
scripts/erc-4626/README-vault-scripts.md.
Recurring price scans for reviewed tokenised-fund products.
The protocol backfill modules remain the explicit bootstrap and repair path. This module is deliberately narrower: it refreshes only products that are already present in the shared vault metadata database and writes only their address-scoped raw-price rows.
- class TokenisedFundPriceScanSpec
Bases:
objectOne independently scheduled tokenised-fund price feed.
The feature marker is the authoritative link between the scheduler and the persisted vault metadata. Product-specific predicates exclude known supply-only products such as Libeara ULTRA and non-fund Midas products.
- feature: eth_defi.erc_4626.core.ERC4626Feature
Persisted vault feature identifying candidate products.
- accepts: collections.abc.Callable[[eth_defi.vault.base.VaultSpec], bool]
Optional reviewed-product filter within the feature family.
- prerequisite_error()
Return a human-readable unmet prerequisite, when any.
- __init__(selector, dashboard_name, feature, accepts=<function TokenisedFundPriceScanSpec.<lambda>>, prerequisite_env=None, refetch_tail=False)
- Parameters
selector (str) –
dashboard_name (str) –
feature (eth_defi.erc_4626.core.ERC4626Feature) –
accepts (collections.abc.Callable[[eth_defi.vault.base.VaultSpec], bool]) –
refetch_tail (bool) –
- Return type
None
- class TokenisedFundPriceScanContext
Bases:
objectExplicit shared paths and resource limits for one scheduled scan.
- vault_db_path: pathlib.Path
Shared reviewed vault metadata database.
- raw_price_path: pathlib.Path
Shared raw vault-price Parquet file.
- vault_addresses: Optional[frozenset[str]]
Optional lowercase product-address filter for a targeted backfill.
- rpc_request_stats: Optional[eth_defi.provider.rpcdb.RPCRequestStats]
Optional shared physical JSON-RPC request counter.
- asseto_registry_cache_path: Optional[pathlib.Path]
Optional persistent Asseto registry cache override for isolated runs.
- __init__(vault_db_path, raw_price_path, max_workers, enabled_chain_ids, vault_addresses=None, hypersync_concurrency=None, rpc_request_stats=None, asseto_registry_cache_path=None)
- Parameters
vault_db_path (pathlib.Path) –
raw_price_path (pathlib.Path) –
max_workers (int) –
rpc_request_stats (Optional[eth_defi.provider.rpcdb.RPCRequestStats]) –
asseto_registry_cache_path (Optional[pathlib.Path]) –
- Return type
None
- class TokenisedFundPriceScanResult
Bases:
objectSummary of one tokenised-fund scheduled price refresh.
- TOKENISED_FUND_PRICE_CAPABILITIES: dict[str, str] = {'asseto': 'scheduled', 'centrifuge': 'supply only; no reviewed NAV/share source', 'fdit': 'supply only; no reviewed NAV/share source', 'franklin': 'scheduled', 'kaio': 'supply only; no reviewed NAV/share source', 'kinexys': 'static adapter estimate, not a refreshable feed', 'libeara': 'scheduled for CUMIU and BELIF only', 'midas': 'scheduled for tokenised-fund products only', 'ondo': 'scheduled', 'openeden': 'scheduled', 'securitize': 'scheduled for products with reviewed NAV', 'spiko': 'scheduled', 'superstate': 'scheduled', 'sygnum': 'scheduled', 'theo': 'supply only; no reviewed scalar NAV source', 'usyc': 'scheduled', 'wisdomtree': 'scheduled when DataSpan credentials are configured'}
Every aggregate backfill selector has either a scheduled source or an explicit reason why it is not a recurring price feed.
- select_tokenised_fund_price_scanners(selection)
Resolve an optional comma-separated protocol selection.
- Parameters
selection (Optional[str]) –
TOKENISED_FUND_PROTOCOLSvalue, orNonefor every scanner.- Returns
Selected scanner specs in stable dashboard order.
- Raises
ValueError – If a selector is not price-capable.
- Return type
tuple[eth_defi.tokenised_fund.scan.TokenisedFundPriceScanSpec, …]
- resolve_target_start_blocks(spec, raw_price_path, targets)
Choose one independent continuation point per exact product.
The latest non-null raw price is the continuation source for these stateless daily reads. Null rows after that point do not hide a price gap. A missing product starts at its reviewed deployment or discovery block. Each product is scanned and rewritten separately, so bootstrapping one product cannot delete another product’s newer history.
- Parameters
spec (eth_defi.tokenised_fund.scan.TokenisedFundPriceScanSpec) – Protocol source semantics, including whether recent samples need a bounded refetch.
raw_price_path (pathlib.Path) – Existing shared raw-price Parquet file, if any.
targets (list[tuple[eth_defi.vault.base.VaultSpec, int]]) – Exact target specs paired with their deployment blocks.
- Returns
Exact target-to-start-block mapping.
- Return type
- load_tokenised_fund_target_specs(vault_db_path, scanners)
Load exact products owned by ready dedicated scanners.
Disabled, unselected and product-filtered vaults remain under generic scanner ownership. A missing metadata database safely owns no products.
- Parameters
vault_db_path (pathlib.Path) – Shared reviewed vault metadata database.
scanners (collections.abc.Iterable[eth_defi.tokenised_fund.scan.TokenisedFundPriceScanSpec]) – Ready scanner specifications for this process configuration.
- Returns
Exact chain and address pairs reserved for dedicated daily scans.
- Return type
- load_tokenised_fund_last_timestamps(raw_price_path, vault_db_path)
Load dashboard freshness per protocol from its exact target addresses.
- Parameters
raw_price_path (pathlib.Path) – Shared raw price Parquet path.
vault_db_path (pathlib.Path) – Shared vault metadata path containing persisted feature markers.
- Returns
Mapping of dashboard names to latest valid NAV timestamp.
- Return type
- run_tokenised_fund_price_scan(spec, context)
Refresh one reviewed protocol’s raw price rows.
When no prior raw row exists, start from the reviewed vault deployment block. This intentionally favours complete daily history over a precise initial source boundary; the relevant adapter still rejects calls before its oracle or issuer data is available.
The scanner uses the same archive-state adapters as the normal vault price pipeline and samples at approximately one-day intervals. It does not claim to preserve every source update or its original publication timestamp.
- Parameters
spec (eth_defi.tokenised_fund.scan.TokenisedFundPriceScanSpec) – Protocol selection and product filter.
context (eth_defi.tokenised_fund.scan.TokenisedFundPriceScanContext) – Shared production paths and worker limits.
- Returns
Aggregate scan result across every configured target chain.
- Raises
RuntimeError – If the metadata database or a selected product adapter is invalid.
- Return type