diff --git a/.pending/improvements/sdk/3752-Explanatory-doc b/.pending/improvements/sdk/3752-Explanatory-doc new file mode 100644 index 000000000..1179bf065 --- /dev/null +++ b/.pending/improvements/sdk/3752-Explanatory-doc @@ -0,0 +1 @@ +\#3752 Explanatory docs for minting mechanism (`docs/spec/mint/01_concepts.md`) diff --git a/docs/spec/mint/01_concepts.md b/docs/spec/mint/01_concepts.md new file mode 100644 index 000000000..14b2c6abd --- /dev/null +++ b/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 diff --git a/docs/spec/mint/01_state.md b/docs/spec/mint/02_state.md similarity index 100% rename from docs/spec/mint/01_state.md rename to docs/spec/mint/02_state.md diff --git a/docs/spec/mint/02_begin_block.md b/docs/spec/mint/03_begin_block.md similarity index 100% rename from docs/spec/mint/02_begin_block.md rename to docs/spec/mint/03_begin_block.md diff --git a/x/mint/minter.go b/x/mint/minter.go index 761d9d1e6..a28e8f447 100644 --- a/x/mint/minter.go +++ b/x/mint/minter.go @@ -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 }