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:
parent
6ce4d5efd1
commit
ea9aecdff4
|
@ -0,0 +1 @@
|
||||||
|
\#3752 Explanatory docs for minting mechanism (`docs/spec/mint/01_concepts.md`)
|
|
@ -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
|
|
@ -61,8 +61,8 @@ func (m Minter) NextInflationRate(params Params, bondedRatio sdk.Dec) (
|
||||||
Mul(params.InflationRateChange)
|
Mul(params.InflationRateChange)
|
||||||
inflationRateChange := inflationRateChangePerYear.Quo(sdk.NewDec(int64(params.BlocksPerYear)))
|
inflationRateChange := inflationRateChangePerYear.Quo(sdk.NewDec(int64(params.BlocksPerYear)))
|
||||||
|
|
||||||
// increase the new annual inflation for this next cycle
|
// adjust the new annual inflation for this next cycle
|
||||||
inflation = m.Inflation.Add(inflationRateChange)
|
inflation = m.Inflation.Add(inflationRateChange) // note inflationRateChange may be negative
|
||||||
if inflation.GT(params.InflationMax) {
|
if inflation.GT(params.InflationMax) {
|
||||||
inflation = params.InflationMax
|
inflation = params.InflationMax
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue