Skip to content
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

Show 24h and 7d APR on the swap pools UI #590

Open
prayagd opened this issue Oct 4, 2024 · 10 comments
Open

Show 24h and 7d APR on the swap pools UI #590

prayagd opened this issue Oct 4, 2024 · 10 comments
Assignees

Comments

@prayagd
Copy link
Collaborator

prayagd commented Oct 4, 2024

Context

Currently there is only 7d APR shown on the swap pools screen, this ticket is to show both 24h and 7d APR

Todo

  • Change the text "APR" to "APR(24h/7d)"
  • Below for each asset show both values i.e 24h and 7d APR
  • Attached reference of Nabla UI

Note

Screenshot 2024-10-04 at 5 31 31 PM
@prayagd
Copy link
Collaborator Author

prayagd commented Oct 4, 2024

Hey team! Please add your planning poker estimate with Zenhub @ebma @Sharqiewicz @TorstenStueber

@ebma
Copy link
Member

ebma commented Oct 4, 2024

The indexer currently only exposes a general apr field. If we want to split this into 24h and 7d, we'd need to touch the indexer first.

@TorstenStueber
Copy link
Member

@prayagd What is the definition of a 24 hour and a 7 day APR? It's an oxymoron, isn't it as APR is an annual rate?

Anyway, whatever that means. We calculate the APR extrapolated from the gains within the last seven days.

@prayagd
Copy link
Collaborator Author

prayagd commented Oct 11, 2024

We calculate the APR extrapolated from the gains within the last seven days.

What we are extrapolating using APR for 7 days we want to do the same for 24h

@prayagd
Copy link
Collaborator Author

prayagd commented Oct 11, 2024

What we are extrapolating using APR for 7 days we want to do the same for 24h

Even for doing this we need to make changes to the indexer?

@ebma
Copy link
Member

ebma commented Oct 11, 2024

Well the apr field is currently exposed by the indexer. And the nabla team also gets it from their indexer, so I think it makes most sense to do this. I found the relevant lines of code that describe the calculation they do for the 24h and 7d apr here. So IMO we should add similar changes to our indexer and then access those fields in the portal. Thus we'd need one extra ticket in pendulum-squids.

@TorstenStueber
Copy link
Member

Okay, understood. But is this high priority for us? I would consider it more a nice to have – we don't need to copy every aspects of the Nabla UI at this stage of the project.

@prayagd
Copy link
Collaborator Author

prayagd commented Oct 17, 2024

Okay, understood. But is this high priority for us?

Not a high priority, good to have in the backlog

@ebma
Copy link
Member

ebma commented Oct 18, 2024

@pendulum-chain/product as I pointed out, this ticket requires changes to the indexer before it can be worked on. I created the ticket pendulum-chain/pendulum-squids#74 for you, please prioritize it accordingly.

@TorstenStueber
Copy link
Member

@pendulum-chain/product even though this ticket is blocked by another ticket, shall we not move it to Ready, as it is ready?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants