APR
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.
Strategies no longer offer per-user boosted rewards — the vlSDT balance of the user does NOT impact the APR. (Liquid Locker boost is still mutualized at the locker level via OnlyBoost; see the Liquid Lockers APR page for the vlSDT-boosted case on sdToken staking.)
Based on the rate and the price of the reward token, the current APR is then the following :
After computing this APR, Stake DAO deducts 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:
-
https://api.curve.finance/api/getPools/ethereum/factory-crvusd
-
https://api.curve.finance/api/getPools/ethereum/factory-crypto
-
https://api.curve.finance/api/getPools/ethereum/factory-tricrypto
Angle
Angle provides an API endpoint for the APR of vaults and gauges:
https://api.angle.money/v1/apr
Pendle
Pendle provides an API endpoint for the APR of their LPs:
https://api-v2.pendle.finance/core/v1/1/markets/ + lp address
Yearn
Yearn provides an API endpoint for the APR of their vaults:
Balancer
Balancer provides a subgraph for the trading fees of their pools:
https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-v2
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 :