Closed hetfly closed 2 years ago
How to calculate:
($$ value of fees distributed over the last month 12) / (Number of Staked BALN $$ price of BALN)
For Fee APYs, here is the calculation for everything except sICX/ICX. For sICX / ICX, instead of multiplying by 50%, please multiply by 70%
$$ value of fees 365 50% / $$ value of liquidity.... (Red box 365 50% / Green Box)
@BennyOptions thanks for the help! Please review the numbers.
@hetfly I just realized that the calculation I gave for Fee APY for pools is only based on the last 24 hours, not on a trailing 30 day average.
@hetfly @pranav925 is it possible to pull Fees (30 day)? If so, let's change the Fee APY calculation to use Fees (30d) 12 instead of Fee (24h) 365.
For 30d of fees
https://balanced.geometry.io/api/v1/stats/dex-pool-stats-30d
updated, ready for review
This is looking great, thanks @hetfly! Aside from the minor content change suggested, I only noticed 2 things:
[x] The colour for the day should be rgba(255,255,255,0.75)
[x] Let's move the Exchange APY label to the left a bit, so the ?
is aligned with the data underneath. It doesn't look as bad on desktop, but when you're on mobile you likely have to scroll horizontally before you even see that there's a tooltip beside APY:
Blocked, waiting for continuous rewards upgrade
@hetfly I was just comparing the APYs from this PR to production and noticed they are quite different. Can you explore that? It's the BALN APY. They should both match.
This PR
Current production page
@BennyOptions APY calculations are identical, difference was in current rewards settings. Merged master into this branch and all looks good now.
@hetfly Let's resolve the conflicts in this branch so we can have it ready to merge alongside the continuous rewards update.
The latest updates on your projects. Learn more about Vercel for Git âī¸
Name | Status | Preview | Updated |
---|---|---|---|
balanced-network-info | â Ready (Inspect) | Visit Preview | Jun 21, 2022 at 9:52AM (UTC) |
@parrot9design this PR is ready to be reviewed.
BTW shouldn't we change the abbreviations to APR (BALN staking as well as pools)? APY reflects compounding during the year, our numbers don't. The BALN APY is something I'd like to go through in Stats v2
cc @BennyOptions
Ah, yes I think you're correct re: APY vs APR. I've added suggestions to make the change easier. Other than that, this should be good to merge alongside continuous rewards.
EDIT: After talking on the frontend call, I've removed the APR suggestions. The meanings for APY/APR seem to vary widely, so am thinking we'll replace the term with Yield
, Reward rate
, or something similar. Will likely address that in a separate update, though.
@hetfly I noticed that the BALN staking APY doesn't have a loading animation. Is it possible to add one?
The Exchange section currently isn't loading any data. Does that need to be updated to account for the new java contracts?
@parrot9design both issues sorted out
Looks good, thanks @hetfly!
Math looks good, no longer blocked by contract. @hetfly @parrot9design looks good to merge
Might be worth noting here that the calculation doesn't include impermanent losses, with a link to impermanent loss explained? @parrot9design
Good call. @hetfly, let's add this line to the end as a label:
Impermanent loss is not factored in.
If it's possible to keep the tooltip content up when the mouse hovers over it, we could link off for more info, like this:
Impermanent loss is not factored in.
But that may be too much hassle, so it's also fine to ship without it.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
đ Inspect: https://vercel.com/balanced-dao/balanced-network-info/4dUQZoE5yL5grRQ7d8ogZrKNJHQg
â Preview: https://balanced-network-info-git-feat-display-baln-1d140e-balanced-dao.vercel.app