Skip to content

Calculate and expose APR for 24h and 7d in indexer #74

@ebma

Description

@ebma

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 same similar calculations to the pendulum indexers.

So we would then have:

  • Rename apr to apr7d
  • apr7d -> (total average fees last 7 days) / (total liability)
  • apr24h -> (total average fees last 24 hours) / (total liability)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions