Path Parameters
Query Parameters
How It Works
For each known vault (excluding those markedunsupported):
- Read the user’s share balance on-chain via
balanceOf(user) - Skip if balance is zero
- Convert shares to asset units via
vault.convertToAssets(shares)(falls back tototalAssets/totalSupplyratio if unavailable) - Sum the user’s historical net deposits to that vault (deposits − withdrawals) in vault-asset units
- Compute yield as
current_assets − deposited_assets
Response
Fields
Notes
current_assets,deposited_assets, andyield_assetscan each benullindependently if the data isn’t available (e.g. the vault doesn’t expose share price, or the user has no recorded deposits).- For vaults that don’t support
convertToAssets, the API falls back to(shares * totalAssets) / totalSupply. If both fail,current_assetsisnulland the frontend should display the raw share balance. - Yield is in asset units, not USD. A portfolio with mixed assets (USDC + WETH) shouldn’t be summed directly — the frontend should show per-asset totals or use a price oracle.