This is an interim solution as I work to get the Trello and GitHub issues linked up. Please tick off items on the board as you complete them, and feel free to claim them in comments below as well so we avoid two people working on the same issue at once.
Need to have
[x] Instead of using monthly share price APY extrapolation, default to the higher of two values between monthly and weekly.
Reasoning: Almost always, with share price calculations, we are under-representing our APY.
Weekly APYs are preferable to monthly when a vault harvests frequently and the harvested asset has gone up in price recently, or if the vault is more active than it was in previous weeks.
Monthly APYs are preferable for vaults that harvest less frequently, and will give a smoother picture of APY (potentially lower percentage of days without a harvest).
[x] If gauge is zero, assume 2.5x boost, not a 1x boost. sUSD, HUSD, AAVE, RENBTC, TBTC, PBTC all currently have this problem.
[x] Truncate boost value on hover to two decimals, currently shows way too many
[x] Fix tooltip APY spacing (100%+ is too far over for USDN)
[x] Manually update displayed USDN APY for now since we're pulling 80% for backscratcher
[x] Add disclaimer in drop-down menu for USDN as well like we had for DAI after hack. Something like 80% of USDN CRV yield is deposited to yveCRV. APY of ~20% is accurate after accounting for this.
[x] Update APY calculations for crvSTETH vault. Currently this is being treated as a Curve vault, but it is not boosted, and should be treated as a normal v2 vault.
[x] For yveCRV, multiplier column should pull data from currentBoost in the API and Growth should pull from totalApy in the API
[x] Reorder the appearance of the data in the Curve vault hover so it reads:
Pool APY + CRV Boosted APY (blank line after this title)
Pool APY xx%
Base CRV APY xx%
Boost xx
Total APY xx%
[x] Copy for yveCRV hover could read as this:
yveCRV Admin Fees (blank line after this title)
veCRV APY xx%
Boost xx
Total APY xx%
Nice to have
[x] Calculate APY for non-Curve vaults (both v1 and v2) without fees subtracted. Since Curve vaults will be showing APY with and without fees, we should do the same for all other vaults and can extrapolate using our after-fee yield.
[x] For v1 vaults, the math is as follows: Gross APY = Net APY / (1 - sum of strategistFee, treasuryFee, fee, and/or performanceFee)
[x] For v2 vaults, the math is as follows: Gross APY = (Net APY / (1 - performanceFee)) + managementFee
[x] Create SDK endpoints for fees
[x] For v1 vaults, pull strategistReward, treasuryFee, withdrawalFee, fee, performanceFee from the strategy contract. strategistReward, treasuryFee, performanceFee can be summed as one fee in the endpoint since they are all performance fees, and withdrawalFee, fee can be put into the same endpoint since they are withdrawal fees.
[x] For v2 vaults, pull managementFee and performanceFee fields from the vault contract. These should be kept as separate endpoint since the management fee is calculated on TVL, whereas performance fee is only on earnings.
[x] For v1 Curve vaults, pull keepCRV as well (this is CRV reserved every harvest for boosting yield)
[x] Show Net APY somewhere in UI
[x] Easy option: add it to the bottom of the hover tooltip for each vault's APY
[x] Improved option: Reorder columns on vault page, removing version column and replacing it with fees column that sits right after growth. Fees column can have all fees listed above for each vault, as well as the Net APY displayed.
[x] Could also consider making this column NET APY instead, display the net APY, and then show fees on hover.
[x] For non-Curve vaults (and crvSTETH), Net APY is the APY that is currently calculated using share price. For Curve vaults, Net APY can be calculated from the current Curve APY as so:
[x] Note that totalPerformanceFee in the formula above is simply the sum of a vault strategy's strategistReward, treasuryFee, and/or performanceFee values
[x] Add tooltip next to GROWTH that explains what it means
[x] If we add FEES, add tooltip next to it explaining it as well
Feedback based on current state of site at https://pr-175.yearn.dev/vaults
Need to have
share price
calculations, we are under-representing our APY.80% of USDN CRV yield is deposited to yveCRV. APY of ~20% is accurate after accounting for this.
currentBoost
in the API andGrowth
should pull fromtotalApy
in the APINice to have
Gross APY = Net APY / (1 - sum of strategistFee, treasuryFee, fee, and/or performanceFee)
Gross APY = (Net APY / (1 - performanceFee)) + managementFee
strategistReward
,treasuryFee
,withdrawalFee
,fee
,performanceFee
from the strategy contract.strategistReward
,treasuryFee
,performanceFee
can be summed as one fee in the endpoint since they are all performance fees, andwithdrawalFee
,fee
can be put into the same endpoint since they are withdrawal fees.managementFee
andperformanceFee
fields from the vault contract. These should be kept as separate endpoint since the management fee is calculated on TVL, whereas performance fee is only on earnings.keepCRV
as well (this is CRV reserved everyharvest
for boosting yield)Net APY
somewhere in UIversion
column and replacing it withfees
column that sits right aftergrowth
.Fees
column can have all fees listed above for each vault, as well as theNet APY
displayed.NET APY
instead, display the net APY, and then show fees on hover.Net APY
is the APY that is currently calculated using share price. For Curve vaults,Net APY
can be calculated from the current Curve APY as so:Curve Net APY = Boosted CRV APY * (1- keepCRV - totalPerformanceFee)
totalPerformanceFee
in the formula above is simply the sum of a vault strategy'sstrategistReward
,treasuryFee
, and/orperformanceFee
values