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
Sum the TVL in the token
Aggregate the TVL from every active strategy within the token:
Determine Each Strategy's "Weight”
Calculate the proportional "weight" of each strategy by comparing its TVL to the total TVL.
Total APY
Multiply each strategy's individual APY by its calculated weight and sum the results.
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)
).
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
).
Calculate the 7-Day Period Return
Two rates are used to calculate the strategy's raw percentage gain over the ~7 day period.
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:
This process updates daily, so the Strategy APY always reflects the most recent 7-day performance window.
Last updated