🧮 APR calculation
⚠️

APR is solely provided for informational purposes.

APR calculation

The APR (Annual Percentage Rate) is the potential annual yield generated by staking LP tokens into their gauge.

For Strategies we have two cases : Current APR and Projected APR.

Current APR

On an harvest, the earned rewards are distributed to users that staked their LP tokens into the gauge during the following week. The gauge updates the rate and the period_finish properties returned by the reward_data view, and it means that the reward token will be distributed at this rate per second until the period_finish.

Based on this rate and the price of the reward token, Stake DAO can then compute the APR of a user using his working_balance (a boosted balance based on the users' veSDT position).

The current APR is then the following :

rate×token price×year in second×user working balancetotal working supply×100\frac{{\text{{rate}} \times \text{{token price}} \times \text{{year in second}} \times \text{{user working balance}}}}{{\text{{total working supply}}}} \times 100

After computing this APR, Stake DAO deduce fees to sdTOKENs holders for the boost provided, aswell as protocol fees.

Projected APR

If a strategy has not been harvested since at least 7 days, the gauge does not stream rewards. However, the rewards are still accumulating and will be redistributed to stakers on the next harvest. The projected APR reflects this accumulating rewards waiting for harvest, and are either computed from protocols' API or by replicating protocols' logics for their APR. After computing this APR, Stake DAO deduce fees to sdBAL holders, aswell as protocol fees.

Curve

Curve has many API endpoints depending on the pool type and compute the base APR:

Angle

Angle provides an API endpoint for the APR of vaults and gauges:

https://api.angle.money/v1/apr (opens in a new tab)

Pendle

Pendle provides an API endpoint for the APR of their LPs:

https://api-v2.pendle.finance/core/v1/1/markets/ (opens in a new tab) + lp address

Yearn

Yearn provides an API endpoint for the APR of their vaults:

https://ydevmon.ycorpo.com/vaults?hideAlways=true&orderBy=featuringScore&orderDirection=desc&strategiesDetails=withDetails&strategiesRisk=withRisk&strategiesCondition=inQueue&chainIDs=1&limit=2500 (opens in a new tab)

Balancer

Balancer provides a subgraph for the trading fees of their pools:

https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-v2 (opens in a new tab)

In addition to this trading fees, Stake DAO compute the projected BAL APR by fetching current BAL emission and the allocation to the pool during next week.

The projected APR is then the following :

Trading feesAPR+weekly BAL rewards×BAL price×52LP staked×LPprice×BAL Locker boost×100\text{{Trading fees}} APR + \frac{{\text{{weekly BAL rewards}} \times \text{{BAL price}} \times {{52}}}}{{\text{{LP staked}} \times{{LP price}}}} \times \text{{BAL Locker boost}} \times \text{{100}}