Max Vaults APY Calculation

The APY for Max Vaults is calculated by taking a TVL-weighted average of the APYs from all its underlying strategies. This document explains the complete process, detailing how both the individual strategy APYs and the final blended vault APY are determined.

Max Vaults APY Calculation

Products this calculation applies to: ynETHx, ynBNBx, ynUSDx

  1. Sum the TVL in the token

    Aggregate the TVL from every active strategy within the token:

Total  TVL=TVL1+TVL2++TVLnTotal\;TVL=TVL_1​+TVL_2​+⋯+TVL_n
  1. Determine Each Strategy's "Weight”

    Calculate the proportional "weight" of each strategy by comparing its TVL to the total TVL.

Weight=StrategyTVLTotalTVLWeight = \frac{ Strategy TVL}{Total TVL}
  1. Total APY

    Multiply each strategy's individual APY by its calculated weight and sum the results.

Total  APY=(APY1×Weight1)+(APY2×Weight2)++(APYn×Weightn)Total\;APY=(APY_1 \times Weight_1)​+(APY_2 \times Weight_2)​+⋯+(APY_n \times Weight_n)

Historical APY Display (7d & 31d)

The APY figures displayed in the UI represent historical averages of the daily APY calculation described above.

  • 7d APY: This is the simple average of the last 7 daily APY calculations. It shows the vault's recent performance trend.

  • 31d APY: This is the simple average of the last 31 daily APY calculations. It offers a more stable, long-term view of the vault's historical performance.


Strategy APY Calculation

The APY for each strategy represents its annualized performance based on a trailing 7-day period of on-chain data. This provides a current, data-driven measure of a strategy's recent performance.

The calculation relies on the rate that each strategy’s provider contract publishes (e.g., getRate(asset)).

  1. On-chain exchange rates

    Our system reads a strategy's exchange rate directly from its smart contract. The rate is captured at two points in time:

    • The rate from the latest block (R_now).

    • The rate from a block approximately 7 days prior (R_7d-ago).

  2. Calculate the 7-Day Period Return

    Two rates are used to calculate the strategy's raw percentage gain over the ~7 day period.

R=RnowR7d-ago1R=\frac{R_{\text{now}}}{R_{\text{7d-ago}}}−1
  1. Annualized return

    The below calculation is used to project this 7-day return over a 365-day horizon to calculate the APY for the strategy. This shows what the return would be over a full year if the performance of the last 7 days were to continue.

    A standard periodic compounding formula for is used for this projection:

APY7d  =  (1+R)  31536000/Δt1\text{APY}_{7\text{d}} \;=\; \Bigl(1+R\Bigr)^{\;31\,536\,000/\Delta t}-1

Where 31,536,000 is the number of seconds in a year.

And Δt is the precise number of seconds that elapsed between the two blocks measured.

  1. This process updates daily, so the Strategy APY always reflects the most recent 7-day performance window.

Last updated