Skip to main content
This guide walks through how to compute Vault TVL, Vault APY, rewards APY, and Loop APY using Loopscale’s data endpoints. These are the key metrics for building dashboards, portfolio trackers, or any integration that displays Loopscale yield data.

Vault Metrics

Use the Get Vaults endpoint to retrieve Vault data. You can also query the Get Vault Depositors endpoint for depositor-level breakdowns. All of the fields referenced below are located in the vaultStrategy object of the response. Example request:
Example

Computing Vault TVL

Sum the following fields from vaultStrategy.strategy:
Example

Computing Vault APY

The total Vault APY that a depositor earns is the sum of two components, the lending APY from order-book interest, and the rewards APY from any active token incentive schedules.
This blends the interest earned from order-book lending with the yield from any external yield source, normalized over the total TVL.
Example

Calculating Total APY

The following combines both components into a single calculation:
Example

Loop Metrics

Use the Get Loop Info endpoint to retrieve Loop data. You can filter by:
  • Loop identifiers — either the slug (e.g. acred-usdg) or the mints formatted as {PRINCIPAL_MINT}-{COLLATERAL_MINT}
  • Tags — e.g. Stablecoin, Exponent, Hylo, etc.
Example request:
Example

Total Looped Assets

The collateralDeposited field returns the total assets deposited into the Loop, in decimal-scaled value.
Example

Computing Loop APY

Use the wAvgApy field, which represents the current weighted-average APY across all active positions, weighted by size.
Example
Avoid using maxApy for display purposes. If borrow liquidity is exhausted, maxApy may be empty or pull from a small strategy with an unrealistically high or low yield. wAvgApy is more reliable and representative of actual user returns.