Merge PR #3894: Minting mechanism explanatory docs

* minting spec concepts

* cl

* Update docs/spec/mint/01_concepts.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* typo address @alexanderbez

* Apply suggestions from code review

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* commit for CI to restart
This commit is contained in:
frog power 4000 2019-03-18 11:11:31 -04:00 committed by GitHub
parent 6ce4d5efd1
commit ea9aecdff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 2 deletions

View File

@ -0,0 +1 @@
\#3752 Explanatory docs for minting mechanism (`docs/spec/mint/01_concepts.md`)

View File

@ -0,0 +1,22 @@
# Concepts
## The Minting Mechanism
The minting mechanism was designed to:
- allow for a flexible inflation rate determined by market demand targeting a particular bonded-stake ratio
- effect a balance between market liquidity and staked supply
In order to best determine the appropriate market rate for inflation rewards, a
moving change rate is used. The moving change rate mechanism ensures that if
the % bonded is either over or under the goal %-bonded, the inflation rate will
adjust to further incentivize or disincentivize being bonded, respectively. Setting the goal
%-bonded at less than 100% encourages the network to maintain some non-staked tokens
which should help provide some liquidity.
It can be broken down in the following way:
- If the inflation rate is below the goal %-bonded the inflation rate will
increase until a maximum value is reached
- If the goal % bonded (67% in Cosmos-Hub) is maintained, then the inflation
rate will stay constant
- If the inflation rate is above the goal %-bonded the inflation rate will
decrease until a minimum value is reached

View File

@ -61,8 +61,8 @@ func (m Minter) NextInflationRate(params Params, bondedRatio sdk.Dec) (
Mul(params.InflationRateChange)
inflationRateChange := inflationRateChangePerYear.Quo(sdk.NewDec(int64(params.BlocksPerYear)))
// increase the new annual inflation for this next cycle
inflation = m.Inflation.Add(inflationRateChange)
// adjust the new annual inflation for this next cycle
inflation = m.Inflation.Add(inflationRateChange) // note inflationRateChange may be negative
if inflation.GT(params.InflationMax) {
inflation = params.InflationMax
}