tokenised_fund.centrifuge.historical

Documentation for eth_defi.tokenised_fund.centrifuge.historical Python module.

Historical reads for Centrifuge permissioned tranche tokens.

Classes

CentrifugeTrancheHistoricalReader

Read supply without inventing JTRSY NAV or TVL.

class CentrifugeTrancheHistoricalReader

Bases: eth_defi.vault.base.VaultHistoricalReader

Read supply without inventing JTRSY NAV or TVL.

The direct Tranche token exposes ERC-20 supply, but no NAV/share price. The linked Centrifuge pool vault owns valuation and dealing semantics. This reader records available supply and explicitly leaves price and TVL absent.

Create a read-only tranche-token history reader.

Parameters
  • vault – Direct Centrifuge Tranche token adapter.

  • stateful – Ignored because no NAV call exists from which adaptive state could safely be updated.

__init__(vault, stateful)

Create a read-only tranche-token history reader.

Parameters
  • vault (CentrifugeTrancheVault) – Direct Centrifuge Tranche token adapter.

  • stateful (bool) – Ignored because no NAV call exists from which adaptive state could safely be updated.

construct_multicalls()

Construct the ERC-20 supply read.

Returns

One totalSupply() multicall.

Return type

collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]

process_result(block_number, timestamp, call_results)

Convert token supply to an explicitly unpriced history row.

Parameters
Returns

Supply-only historical record with unavailable price and TVL.

Return type

eth_defi.vault.base.VaultHistoricalRead

fetch_contextual_historical_reads(start_block, end_block, step)

Yield protocol-sourced historical rows outside the static call grid.

Contextual readers override this method and read an already-prefilled local cache. Network collection belongs before the common price scan.

Parameters
  • start_block (int) – Inclusive archive block boundary.

  • end_block (int) – Exclusive archive block boundary.

  • step (int) – Approximate block spacing used to downsample source observations.

Returns

Ordinary VaultHistoricalRead rows for the common writer.

Raises

NotImplementedError – If a reader opts into contextual history without implementing it.

Return type

Iterable[eth_defi.vault.base.VaultHistoricalRead]

property share_price_change_threshold: float

Return this reader’s sparse share-price comparison threshold.

Event-only readers may require every exact price change; ordinary readers retain the existing ten-basis-point suppression threshold.

Returns

Non-negative relative suppression threshold.

property uses_contextual_history: bool

Return whether this reader supplies protocol-sourced observations.

Most EVM vaults expose static calldata that the common multicaller can execute on a regular block grid. Protocols such as GMX instead expose sparse value events that are prefetched into a protocol-owned cache.

Returns

False for the ordinary static-multicall path.

property uses_share_price_equivalence: bool

Return whether cash flows must be ignored by the sparse filter.

Vault-like products without a standard share-price method can still expose a supply-normalised price equivalent. Their TVL and supply changes must not create false performance observations.

Returns

True when the vault carries the share_price_equivalence feature.