near / near-wallet

Web wallet for NEAR Protocol which stores keys in browser's localStorage
https://wallet.near.org
MIT License
220 stars 176 forks source link

Create the new version of UI/UX for displaying APY for farming validators #2539

Open askulikov opened 2 years ago

askulikov commented 2 years ago

@stefanopepe @esaminu @agileurbanite

agileurbanite commented 2 years ago

Ack we will propose a UX in the next few days and reply in this issue.

stefanopepe commented 2 years ago

@corwinharrell, the APY is an "annual percentage yield" used to measure the interest rate.

Calling it APY can be tricky, as pools (see Aurora) might take $near, keep fees at 100%, and give back only Aurora tokens, which would yield 0% APY in $near tokens and a certain amount of $aurora tokens (or any other similar fungible token).

Example 1:

Example 2:

Example 3:

Notes:

  1. We simplified to a constant of 11.125% APY for the staking on the protocol, coming from the standard rewards of 4.5% over 1 billion tokens of supply, applied to 400 million $near staked
  2. We simplified the fungible tokens annual yields, since some pools may have a release schedule that is shorter than 12 months, so the APY (annual, 12 months) is lower
  3. The current calculation here is using USD as the unit of account instead of $near, which is faster to implement but requires to know the fungible token values in USD
  4. this calculation won't take into account the $near, $aurora and $paras exchange fluctuations: the 299% APY might change dramatically if the $near tokens and/or the $aurora token USD value increase or decrease in the double digit.

Will need an ack by @ilblackdragon to make sure we are all on the same page in terms of UI

askulikov commented 2 years ago

@stefanopepe , about the calculation in terms of prices. It might be wrong, but as I understand if we are using just math - there won't be any difference between the results. Anyway, we have to somewhere take data about prices. As we decided to use ref.finance - it is much easier to take prices of whitelisted tokens instead of selecting the pools and $near/$token ratio. Am I wrong?