vaultAddress needed by getVaultAPY and getVaultTVL.
Import
Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
assetAddress | Address | Yes | Token contract address (e.g., USDC) |
yieldType | YieldType | Yes | Yield strategy (CORE, TREASURY, FRONTIER) |
chainId | number | Yes | Blockchain network ID |
Return Type
Returns the matching vault configuration, orundefined if no vault matches.
vault.boringVaultAddress — pass this as the vaultAddress parameter to getVaultAPY and getVaultTVL.
Example: Vault Discovery → APY Display
Example: React Component
Error Handling
| Error Message Pattern | Description | Resolution |
|---|---|---|
"SDK not initialized" | SDK not initialized | Call initAmplifySDK() first |
undefined (not an error) when no vault matches the given parameters. Always check the return value before accessing vault properties.
Related
- getVaultAPY - Fetch vault APY (requires vault address)
- getVaultTVL - Fetch vault TVL (requires vault address)
- fetchSupportedAssets - Discover supported tokens and chains