beethovenxfi / beets-frontend

beets-frontend.vercel.app
MIT License
16 stars 20 forks source link

add swap fee apr to selected relic apr #315

Closed groninge01 closed 1 year ago

groninge01 commented 1 year ago

For a individual (selected) relic apr the swap fee apr should be added to it too.

image

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
beets-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2023 0:48am
op-beets-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2023 0:48am
danielmkm commented 1 year ago

This should actually be done in the backend, wouldn't do this here. pinging @franzns

franzns commented 1 year ago

This should actually be done in the backend, wouldn't do this here. pinging @franzns

The APR that is returned currently is the "native" beets APR per level. The swap fee APR is attached to the pool entity. Changing it in the backend would mean to change the APR per level to the same/similar schema that we have for the pool to be able to differentiate between swapAPR and nativeRewardApr:

type GqlRelicLevelApr {
    apr: GqlPoolAprValue!
    swapApr: BigDecimal!
    nativeRewardApr: GqlPoolAprValue!
}

where swapApr would be identical for each level. Does that make sense?