erc_4626.vault_protocol.nest.offchain_metadata
Documentation for eth_defi.erc_4626.vault_protocol.nest.offchain_metadata Python module.
First-party Nest vault metadata.
Nest publishes the canonical contract deployment catalogue through its public
API and richer product information through its public CMS API. The contract
catalogue maps every Nest share token to its chain-specific NestVault
deposit and redemption entrypoints; the CMS supplements that mapping with the
strategy description, redemption estimate and yield-source partners.
Module Attributes
Public contract and live-statistics API used by the Nest web application. |
|
Public Payload CMS endpoint used by the Nest web application. |
|
The cache is deliberately short because vault routes and their CMS metadata evolve. |
|
Arc mainnet chain ID used by Nest's current application. |
|
Nest's API uses these chain names in its product |
|
Reviewed Nest product managers. |
|
Nest identifies Nest DAO LLC as the primary curator of its vaults. |
Functions
|
Look up first-party metadata for one NestVault deployment. |
|
Fetch and cache the first-party catalogue of Nest vault entrypoints. |
|
Select the best available partner name for a Nest manager label. |
Classes
First-party data for a chain-specific Nest vault entrypoint. |
- DEFAULT_CACHE_PATH = PosixPath('/home/runner/.tradingstrategy/cache/nest')
Where cached first-party Nest API responses are stored.
- DEFAULT_API_BASE_URL = 'https://api.nest.credit/v1'
Public contract and live-statistics API used by the Nest web application.
- DEFAULT_CMS_API_BASE_URL = 'https://cms.nest.credit/api'
Public Payload CMS endpoint used by the Nest web application.
- DEFAULT_CACHE_DURATION = datetime.timedelta(days=2)
The cache is deliberately short because vault routes and their CMS metadata evolve.
- NEST_ARC_CHAIN_ID = 5042
Arc mainnet chain ID used by Nest’s current application.
- NEST_CHAIN_NAMES: dict[int, str] = {1: 'mainnet', 56: 'bsc', 143: 'monad', 480: 'worldchain', 2818: 'morph', 4663: 'robinhood', 5042: 'arc', 8453: 'base', 9745: 'plasma', 43114: 'avalanche', 98866: 'plume'}
Nest’s API uses these chain names in its product
chainobject.
- NEST_REVIEWED_MANAGERS: dict[str, str] = {'nest-acrdx-vault': 'Apollo', 'nest-basis-vault': 'Bitwise', 'nest-falconx-clo': 'M11 Credit', 'nest-onre-vault': 'OnRe', 'nest-opal-vault': 'BlackOpal', 'nest-wisdom-vault': 'WisdomTree', 'nprime': 'Hastra', 'plume-factor-vault': 'Plume'}
Reviewed Nest product managers. These are strategy or asset managers, not necessarily curators of the Nest vault contracts. https://www.plume.org/blog/plume-and-bybit-expand-access-to-3-trillion-brazilian-credit-card-financing-market-through-nopal https://app.nest.credit/vaults/nest-falconx-clo https://app.nest.credit/vaults/plume-factor-vault https://www.plume.org/blog/plume-vaults-expands-access-to-figures-30b-home-equity-ecosystem-through-nprime https://bitwiseinvestments.com/crypto-funds/uscc
- NEST_CURATOR_SLUG = 'nest-dao'
Nest identifies Nest DAO LLC as the primary curator of its vaults. https://nest.credit/
- select_nest_manager_name(slug, yield_source_partners)
Select the best available partner name for a Nest manager label.
Nest’s CMS lists yield-source partners without roles. Prefer a reviewed manager where one is documented; otherwise retain the first published partner as an indicative label. FACTOR’s curator is stated in its product description although its partner list is empty.
- class NestVaultMetadata
Bases:
TypedDictFirst-party data for a chain-specific Nest vault entrypoint.
- display_symbol: Optional[str]
Marketing symbol from Nest’s CMS; the onchain token symbol remains authoritative.
ERC-20 share token shared by the product’s EVM routes.
- vault_address: eth_typing.evm.HexAddress
Chain-specific NestVault entrypoint address.
- asset_address: eth_typing.evm.HexAddress
Deposit/redemption denomination token address on
chain_id.
- start_block: Optional[int]
Block where Nest reports the product as deployed on this chain. A historical lower bound, not proof of an entrypoint’s bytecode at this block.
- redemption_time_days: Optional[int]
Estimated redemption time in days, if supplied by the Nest CMS.
- reported_apy: Optional[float]
Catalogue SEC 30-day annualised yield as a fraction; its month-end window can differ from the application’s rolling NAV yield.
- target_apy: Optional[float]
Product target APY reported by the contract catalogue, distinct from realised yield.
- estimated_apy: Optional[float]
CMS yield estimate, which may be unpublished or stale on some products.
- __init__(*args, **kwargs)
- __new__(**kwargs)
- clear()
Remove all items from the dict.
- copy()
Return a shallow copy of the dict.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items()
Return a set-like object providing a view on the dict’s items.
- keys()
Return a set-like object providing a view on the dict’s keys.
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values()
Return an object providing a view on the dict’s values.
- fetch_nest_vaults(cache_path=PosixPath('/home/runner/.tradingstrategy/cache/nest'), api_base_url='https://api.nest.credit/v1', cms_api_base_url='https://cms.nest.credit/api', now_=None, max_cache_duration=datetime.timedelta(days=2), *, allow_stale=True)
Fetch and cache the first-party catalogue of Nest vault entrypoints.
One request obtains contract routes and live statistics; one CMS request obtains the associated product descriptions. The output intentionally keys contracts by chain and address because Nest can deploy equal addresses on more than one EVM network. A successful refresh also updates the in-process adapter cache, so a migration’s freshly verified catalogue is used when rebuilding rows.
- Parameters
cache_path (pathlib.Path) – Local directory for the process-safe JSON cache.
api_base_url (str) – Nest public API base URL, overrideable for tests.
cms_api_base_url (str) – Nest CMS public API base URL, overrideable for tests.
now – Override the current naive UTC time for deterministic cache tests.
max_cache_duration (datetime.timedelta) – Age after which first-party metadata is refreshed.
allow_stale (bool) – Use the cache and fall back to it after an API outage. Disable this for migrations that must refetch the current first-party route catalogue.
now_ (Optional[datetime.datetime]) –
- Returns
Chain-and-address keyed metadata for every NestVault route.
- Return type
dict[str, eth_defi.erc_4626.vault_protocol.nest.offchain_metadata.NestVaultMetadata]
- fetch_nest_vault_metadata(web3, vault_address)
Look up first-party metadata for one NestVault deployment.
Adapters share the latest explicitly fetched catalogue in this process. An empty response is not memoised, allowing recovery after an API outage.
- Parameters
web3 (web3.main.Web3) – Connected Web3 instance used to select the EVM chain.
vault_address (eth_typing.evm.HexAddress) – NestVault deposit and redemption entrypoint address.
- Returns
Product metadata, or
Noneif the address is not in Nest’s published catalogue.- Return type
Optional[eth_defi.erc_4626.vault_protocol.nest.offchain_metadata.NestVaultMetadata]