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
Read handler-settled subscription prices from prefetched context. |
- class AntarcticHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead 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
Falsefor the ordinary static-multicall path.
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()
- 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
block_number (int) –
timestamp (datetime.datetime) –
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) –
- Return type
- 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
- 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) –
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
Truewhen the vault carries theshare_price_equivalencefeature.