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

Calculate APR for a given address #46

Open
Aytorex opened this issue Feb 20, 2023 · 0 comments
Open

Calculate APR for a given address #46

Aytorex opened this issue Feb 20, 2023 · 0 comments
Assignees
Labels
kind/enhancement New feature or request

Comments

@Aytorex
Copy link

Aytorex commented Feb 20, 2023

Network(s)

Polkadot, Kusama, Moonbeam

Description

I would like to calculate (or get) APR for a given address using your API.

To do this, I need at least :

  • Community taxes (%)
  • Annual provisions
  • Bonded tokens
  • Fees (%) that are applied by a given validator address.

I can't find the endpoints to use this method, could you help me?

There is another way to do this :
Calculate the yield between two dates, but the concern is that if a few tokens has been added or removed from the validator, I need to be able to know when and how many.

Is it possible to implement one or the other way to calculate it ? Or is there another way ?

Thanks !

Use cases

Ideally, sending a get request to the api which give me the APR for this address.

Second way, having one or more requests to get :

  • Community taxes (%)
  • Annual provisions
  • Bonded tokens
  • Fees (%) that are applied by a given validator address.

And the last option is a way to get the reward between two dates, and the total added / removed from this address.

Additional factoids or references

No response

@Aytorex Aytorex added the kind/enhancement New feature or request label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants