erc_4626.vault_protocol.antarctic.historical

Documentation for eth_defi.erc_4626.vault_protocol.antarctic.historical Python module.

Adapt sparse Antarctic subscription events to the common price writer.

Classes

AntarcticHistoricalReader

Read handler-settled subscription prices from prefetched context.

class AntarcticHistoricalReader

Bases: eth_defi.vault.base.VaultHistoricalReader

Read handler-settled subscription prices from prefetched context.

Amount ratios are exact Decimal values until common Parquet export. Staking income and redemption execution ratios are deliberately excluded.

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 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.

construct_multicalls()

Create smart contract calls needed to read the historical state of this vault.

  • Multicall machinery will call these calls at a specific block and report back to process_result()

Return type

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

process_result(block_number, timestamp, call_results)

Process the result of mult

  • Calls are created in construct_multicalls()

  • This method combines result of this calls to a easy to manage historical record VaultHistoricalRead

Parameters
Return type

eth_defi.vault.base.VaultHistoricalRead

fetch_contextual_historical_reads(start_block, end_block, step)

Yield one actual subscription observation per vault/block.

A zero bootstrap TVL is unknown historical assets, not a measured empty vault. Supply is not paired with event TVL because no historical supply observation accompanies the valuation.

Parameters
  • start_block (int) – Inclusive source boundary.

  • end_block (int) – Exclusive source boundary.

  • step (int) – Ignored; no hourly observations are manufactured.

Returns

Common historical rows at actual event timestamps.

Return type

collections.abc.Iterator[eth_defi.vault.base.VaultHistoricalRead]

__init__(vault)
Parameters

vault (eth_defi.vault.base.VaultBase) –

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.