tokenised_fund.usyc.historical
Documentation for eth_defi.tokenised_fund.usyc.historical Python module.
Historical reader for Circle USYC.
Classes
Read USYC ERC-20 supply and official historical NAV/share. |
- class USYCHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead USYC ERC-20 supply and official historical NAV/share.
USYC is not ERC-4626. Its Chainlink-compatible oracle publishes its NAV per token after business-day reconciliation, so scans derive TVL as token supply multiplied by the oracle answer.
Create a USYC historical reader.
- Parameters
vault – USYC vault adapter.
stateful – Whether to attach shared adaptive reader state.
- __init__(vault, stateful)
Create a USYC historical reader.
- construct_multicalls()
Construct token-supply and oracle calls.
- Returns
Multicalls for
totalSupplyandlatestRoundData.- Return type
collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]
- process_result(block_number, timestamp, call_results)
Convert supply and oracle observations to one historical row.
- Parameters
block_number (int) – Historical block number.
timestamp (datetime.datetime) – Naive UTC block timestamp.
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) – Multicall results at
block_number.
- Returns
USYC supply, NAV/share and TVL record.
- Return type
- 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
- Returns
Ordinary
VaultHistoricalReadrows for the common writer.- Raises
NotImplementedError – If a reader opts into contextual history without implementing it.
- Return type
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
Falsefor the ordinary static-multicall path.
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.