VaultFacts

Documentation for eth_defi.vault_report.vault_probes.VaultFacts Python class.

class VaultFacts

Bases: object

Deterministic facts about one candidate vault.

One entry of the facts file the agent reads. The agent cites the file, with observed_at, as evidence, so the observation time must be the time of the reads.

Attributes summary

vault_id

Vault id, {chain_id}-{address}

probe

Probe used, e.g.

block_number

Block the onchain reads used, the chain head when the probe started

observed_at

When the facts were read, naive UTC ISO timestamp; liquidity evidence older than seven days before the data date is rejected, see eth_defi.vault_report.vault_checks.read_check_decisions()

total_assets

Total assets in denomination token units

idle_assets

Assets held idle by the vault: its own denomination token balance, or the cash() of an Euler EVK vault

redeemable_assets

Assets a depositor could redeem now: idle plus what the vault can pull from its positions

redeemable_share

Redeemable assets as a share of total assets

exposures

Where the assets are

history

Liquidity and withdrawal history, see calculate_liquidity_history()

signals

Deterministic suspicion signals for the agent to research

errors

Reads that failed, or facts the probe cannot read; the agent must not take a missing figure as a good one

Methods summary

__init__(vault_id, probe[, block_number, ...])

vault_id: str

Vault id, {chain_id}-{address}

probe: str

Probe used, e.g. morpho_v1, or unsupported, see select_probe()

block_number: Optional[int]

Block the onchain reads used, the chain head when the probe started

observed_at: Optional[str]

When the facts were read, naive UTC ISO timestamp; liquidity evidence older than seven days before the data date is rejected, see eth_defi.vault_report.vault_checks.read_check_decisions()

total_assets: Optional[float]

Total assets in denomination token units

idle_assets: Optional[float]

Assets held idle by the vault: its own denomination token balance, or the cash() of an Euler EVK vault

redeemable_assets: Optional[float]

Assets a depositor could redeem now: idle plus what the vault can pull from its positions

redeemable_share: Optional[float]

Redeemable assets as a share of total assets

exposures: list[eth_defi.vault_report.vault_probes.Exposure]

Where the assets are

history: dict

Liquidity and withdrawal history, see calculate_liquidity_history()

signals: list[str]

Deterministic suspicion signals for the agent to research

errors: list[str]

Reads that failed, or facts the probe cannot read; the agent must not take a missing figure as a good one

__init__(vault_id, probe, block_number=None, observed_at=None, total_assets=None, idle_assets=None, redeemable_assets=None, redeemable_share=None, exposures=<factory>, history=<factory>, signals=<factory>, errors=<factory>)
Parameters
Return type

None