Gets full details for one Earn vault: fixed info like its contract address and curator, plus live numbers like netApy and tvlUsd. The live numbers are best-effort and may be missing (undefined) if that data is temporarily unavailable, so always check for that before displaying them.
Promise<YieldVaultDetails> - The vault’s full details.
Field
Type
Description
vaultId
string
Opaque identifier for the vault.
contractAddress
string
On-chain address of the vault. Which contract or account this is depends on the vault’s provider, and it is a Solana address for a Solana vault.
chainId
number
Chain ID where the vault is deployed. An EVM chain ID for an EVM vault, and a Solana network ID for a Solana vault.
chainName
'EVM' | 'SOL' (optional)
The chain family the vault runs on. Use a wallet account from the same family for every Earn action on this vault.
curator
string
Name of the organization or team that curates this vault.
provider
'MORPHO' | 'AAVE' | 'KAMINO'
The DeFi protocol that serves the vault. Handle values your code does not recognize. See Provider support.
assetAddress
string
Address of the underlying asset token.
assetSymbol
string
Ticker symbol of the underlying asset (e.g. USDC).
assetDecimals
number
Number of decimals for the underlying asset token. Use this to format getYieldPosition amounts.
isFeeWrapper
boolean
true if a fee is taken before your deposit reaches the vault. Informational only: you don’t need to do anything differently either way, and every Earn function works the same regardless of this value.
netApy
number (optional)
Estimated yearly return, as a decimal (e.g. 0.05 = 5% per year). Includes any bonus rewards. Missing when live data is temporarily unavailable.
netApyExcludingRewards
number (optional)
Same as netApy, but base yield only, with bonus rewards excluded.
tvlUsd
number (optional)
Total amount deposited in the vault by everyone, in US dollars. Missing when live data is temporarily unavailable.
tvlRaw
string (optional)
Same as tvlUsd, but in the vault’s raw, undecimalized token units instead of dollars. Prefer tvlUsd unless you need the raw figure.
getYieldDetails throws if vaultId doesn’t match a vault available to your environment. This looks identical whether the ID is simply wrong or points to a vault scoped to a different environment. Treat any error here as “vault not found.”