erc_4626.vault_protocol.arcadia.description
Documentation for eth_defi.erc_4626.vault_protocol.arcadia.description Python module.
Deterministic Arcadia lending descriptions for pools without narrative copy.
Templates describe the mechanics documented in the Arcadia lender guide. They make no assumptions about fees, liquidity guarantees or the protection of a particular tranche.
Module Attributes
Maximum listing-summary length, including any ellipsis. |
|
Canonical source for generated lending-strategy explanations. |
Functions
|
Extract the first sentence within the listing character budget. |
|
Distinguish narrative from empty text and known pool labels. |
|
Prefer Arcadia narrative or generate factual lending copy. |
Classes
Resolved website copy for an Arcadia lending tranche. |
- MAX_SHORT_DESCRIPTION_LENGTH = 200
Maximum listing-summary length, including any ellipsis.
- LENDING_DOCUMENTATION_URL = 'https://docs.arcadia.finance/users/lenders'
Canonical source for generated lending-strategy explanations.
- class ArcadiaVaultDescriptions
Bases:
objectResolved website copy for an Arcadia lending tranche.
Provider narrative takes precedence; otherwise both fields are generated from the same known token, chain and tranche identity.
- is_arcadia_narrative(description, *, vault_name, asset_symbol, metadata=None)
Distinguish narrative from empty text and known pool labels.
Equality to a known label is the only content heuristic; even a brief provider sentence is preserved when it explains the product.
- Parameters
description (Optional[str]) – Candidate provider or persisted description.
vault_name (Optional[str]) – Onchain vault name, when available.
asset_symbol (Optional[str]) – Denomination symbol, when available.
metadata (Optional[eth_defi.erc_4626.vault_protocol.arcadia.offchain_metadata.ArcadiaVaultMetadata]) – Optional matching Arcadia API record.
- Returns
Whether the candidate contains narrative rather than a label.
- Return type
- extract_arcadia_short_description(description)
Extract the first sentence within the listing character budget.
Long sentences are cut at a word boundary with an ellipsis, rather than dropping a valid short description altogether.
- resolve_arcadia_descriptions(*, chain_id, vault_name, asset_symbol, metadata=None)
Prefer Arcadia narrative or generate factual lending copy.
Only an explicit senior/junior name establishes tranche terminology. Missing token and chain information is omitted, with no live financial metrics interpolated into either description.
- Parameters
chain_id (int) – Vault chain ID used for its display name.
vault_name (Optional[str]) – Onchain vault name, also usable during an API outage.
asset_symbol (Optional[str]) – Known denomination-token symbol, never a guessed ticker.
metadata (Optional[eth_defi.erc_4626.vault_protocol.arcadia.offchain_metadata.ArcadiaVaultMetadata]) – Optional API record matched by chain and tranche address.
- Returns
Full and compact descriptions ready for existing export fields.
- Return type
eth_defi.erc_4626.vault_protocol.arcadia.description.ArcadiaVaultDescriptions