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

Understand inflation #115

Closed
Vishwas1 opened this issue Mar 25, 2022 · 2 comments
Closed

Understand inflation #115

Vishwas1 opened this issue Mar 25, 2022 · 2 comments
Assignees

Comments

@arnabghose997
Copy link
Contributor

arnabghose997 commented Mar 25, 2022

API endpoints:

  • Inflation: http://localhost:1317/cosmos/mint/v1beta1/inflation
  • Annual Provisions: http://localhost:1317/cosmos/mint/v1beta1/annual_provisions

@arnabghose997
Copy link
Contributor

arnabghose997 commented Apr 8, 2022

Inflation in Cosmos SDK

  • Cosmos SDK enables us to set the initial inflation rate and the parameters that influence it. These parameters are: Inflation Rate Change, Maximum and Minimum Inflation Rate, Goal Bonded and Assumed Blocks Per Year.

    • Inflation Rate Change defines the speed at which the inflation will increase or decrease.
    • Maximum and Minimum Inflation Rate sets the limits for the inflation rate
    • Goal Bonded states what the expected staking ratio should be. If I stake there 100M tokens in circulation and 67M of them, then the Staking Ratio is (67M / 100M) = 67%
      • Cosmos SDK doesn’t support Max Token Supply parameter
    • Assumed Blocks Per Year states the provisional number of blocks that are supposed to be produced every year.
  • The amount of tokens minted for every block depends on the following factors:

    • Total Supply
    • Inflation
    • Blocks Per Year
    • Formulae to calculate it: [ (Inflation) * (Total Supply) ] / Blocks Per Year
  • Following are data points observed for a single node run by adjusting parameters Inflation Rate and Blocks Per Year:

Inflation Rate Minted Token Quantity
0.13 2059
0.15 2376
0.150027712013391456 2377
0.150095962009955910 2378
0.150162639431067902 2379
Blocks per year Minted Token Quantity
6311520 2377
6411520 2339
6911520 2170
8111520 1849
  • Inflation Rate depends on Goal Bonded in the following manner:

    • If the current staking ratio is greater than Goal Bonded, the inflation reduces
    • If the current staking ratio equals Goal Bonded, the inflation remains constant
    • If the current staking ratio is lesser than Goal Bonded, the inflation increases
  • Goal Bonded is there to encourage staking in the blockchain in initial stages. If we increase it, the incentive goes higher which encourages stakers to stake more tokens which improves the security of the blockchain. If we set a lower Goal Bonded value, its the otherwise

  • Following is the formula to calculate the Reward Rate for stakers: Inflation Rate / Staking Ratio.

  • Following are the parameters kept by Cosmos Hub and PersistenceOne:

Cosmos Hub

Parameters Value
Initial Inflation Rate 0.13
Minimum Inflation Rate 0.07
Maximum Inflation Rate 0.20
Inflation Rate Change 0.13
Goal Bonded 0.67
Blocks Per Year 4360000

PersistenceOne

Parameters Value
Initial Inflation Rate 0.35
Minimum Inflation Rate 0.07
Maximum Inflation Rate 0.20
Inflation Rate Change 0.13
Goal Bonded 0.67
Blocks Per Year 6311520

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

No branches or pull requests

2 participants