fetch_current_vault_tvl_usd
Documentation for eth_defi.vault.rpc_batch.fetch_current_vault_tvl_usd function.
- fetch_current_vault_tvl_usd(vault)
Probe a discovered vault’s current TVL using its existing USD conversion.
The probe lets a live scan include a meaningful vault even when it has fewer than the normal number of deposit events. The vault’s own reader state supplies protocol-specific exchange-rate overrides. An unknown conversion is reported separately and never treated as verified USD TVL.
Specialised admission batches and direct callers share this path. The adapter owns the timing and composition of its NAV, including live HyperCore values; forcing the ordinary batch block onto these reads could make them unavailable.
- Parameters
vault (eth_defi.vault.base.VaultBase) – Vault adapter to read at the provider’s current state.
- Returns
(tvl_usd, unsupported_conversion). The first member is a Decimal USD estimate or None; the second is True when the denomination rate is unknown or unavailable. A failed read returns(None, False)so it is distinguishable from an unsupported conversion returning(None, True).- Return type
tuple[decimal.Decimal | None, bool]