Skip to main content
Returns a user’s share balances across all known vaults, including current asset value and historical deposit amount for yield calculation.

Path Parameters

Query Parameters

How It Works

For each known vault (excluding those marked unsupported):
  1. Read the user’s share balance on-chain via balanceOf(user)
  2. Skip if balance is zero
  3. Convert shares to asset units via vault.convertToAssets(shares) (falls back to totalAssets/totalSupply ratio if unavailable)
  4. Sum the user’s historical net deposits to that vault (deposits − withdrawals) in vault-asset units
  5. Compute yield as current_assets − deposited_assets
Values are in the vault asset’s smallest unit (e.g. 6 decimals for USDC).

Response

Fields

Notes

  • current_assets, deposited_assets, and yield_assets can each be null independently 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_assets is null and 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.

Example