yearn / yLSTeth

Home Page:https://yeth.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🟢 P2 Feat: Improve pool details

0xkorin opened this issue · comments

Upon clicking the header, a detailed view of the pool is shown. This table can be more informative by adding the following data:

  • Current target weight (%)
  • Current beacon chain ETH equivalent value
  • Current bands (+/- %)
  • Distance from target weight (+/- % point)
  • Weight ramps (if any)
  • 30d APR (query provider.rate(addr) now and 30 days ago and compare)
- Amount in pool
asset.balanceOf(pool)
pool.virtual_balance(i) / pool.vb_prod_sum()[1] (=X)

- Current beacon chain ETH equivalent value
pool.virtual_balance(i)

- Current target weight (%)
pool.weight(i)[0] (=Y)

- Current bands (+/- %)
pool.weight(i)[2] and pool.weight(i)[3]

- Distance from target weight (+/- % point)
compare X with Y

- Weight ramps (if any)
pool.weight(i)[1] is new target weight after ramp

- 30d APR
query provider.rate(addr) now and 30 days ago and compare