-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate and expose APR for 24h and 7d in indexer #74
Comments
Hey team! Please add your planning poker estimate with Zenhub @b-yap @ebma @gianfra-t @TorstenStueber |
Thank you for creating this ticket @ebma |
I want to point out that the formula used by the Nabla team calculates the APR as follows:
Where total supply is the number of minted LP pool tokens. This is also the formula we are using at the moment. However, we argued in this message and the one after that a more appropriate formula would be:
@pendulum-chain/product shall we change this as well in this ticket here? |
Makes sense. So we would then have:
right? |
We would only have the |
Right. I changed the description of this ticket accordingly. |
Context
The portal should show the APR for 24h and 7d in the swap pool info table, see pendulum-chain/portal#590. These fields should be exposed by the indexer instead of calculating them in the frontend.
TODO
Check the calculation of the APR on the indexer of the Nabla team here and apply
the samesimilar calculations to the pendulum indexers.So we would then have:
apr
toapr7d
apr7d
-> (total average fees last 7 days) / (total liability)apr24h
-> (total average fees last 24 hours) / (total liability)The text was updated successfully, but these errors were encountered: