Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add getInflationRate for reward and dynamic reward modules #7799

Closed
Tracked by #7210
shuse2 opened this issue Nov 18, 2022 · 0 comments · Fixed by #8047
Closed
Tracked by #7210

Add getInflationRate for reward and dynamic reward modules #7799

shuse2 opened this issue Nov 18, 2022 · 0 comments · Fixed by #8047

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Nov 18, 2022

Description

Add getInflationRate endpoint for both Dynamic reward and reward modules.
The rate should be number of token scheduled to be generated / year.
The number of token scheduled to be generated should consider

  • current reward bracket
  • 365 days for a year
  • block time

Req

{}

Res

{
  tokenID: string,
  rate: number,
}

Acceptance Criteria

  • Add unit tests for each brackets of the reward

Additional Information

  • We have consider to make the inflation rate more accurate, but this information is only used as supplemental information for user, and it will not be accurate information because reward changes based on the protocol violation. Therefore, it only consider current bracket for the estimation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants