Contents
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
- If the actual percentage of bonded tokens 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 actual percentage of bonded tokens is above the goal %-bonded the inflation rate will decrease until a minimum value is reached
State
Minter
The minter is a space for holding current inflation information.- Minter:
0x00 -> ProtocolBuffer(minter)
Params
The mint module stores its params in state with the prefix of0x01
, it can be updated with governance or the address with authority.
- Params:
mint/params -> legacy_amino(params)
Begin-Block
Minting parameters are recalculated and inflation paid at the beginning of each block.Inflation rate calculation
Inflation rate is calculated using an “inflation calculation function” that’s passed to theNewAppModule
function. If no function is passed, then the SDK’s default inflation function will be used (NextInflationRate
). In case a custom inflation calculation logic is needed, this can be achieved by defining and passing a function that matches InflationCalculationFn
’s signature.
NextInflationRate
The target annual inflation rate is recalculated each block. The inflation is also subject to a rate change (positive or negative) depending on the distance from the desired ratio (67%). The maximum rate change possible is defined to be 13% per year, however, the annual inflation is capped as between 7% and 20%.NextAnnualProvisions
Calculate the annual provisions based on current total supply and inflation rate. This parameter is calculated once per block.BlockProvision
Calculate the provisions generated for each block based on current annual provisions. The provisions are then minted by themint
module’s ModuleMinterAccount
and then transferred to the auth
’s FeeCollector
ModuleAccount
.
Parameters
The minting module contains the following parameters:Key | Type | Example |
---|---|---|
MintDenom | string | ”uatom” |
InflationRateChange | string (dec) | “0.130000000000000000” |
InflationMax | string (dec) | “0.200000000000000000” |
InflationMin | string (dec) | “0.070000000000000000” |
GoalBonded | string (dec) | “0.670000000000000000” |
BlocksPerYear | string (uint64) | “6311520” |
Events
The minting module emits the following events:BeginBlocker
Type | Attribute Key | Attribute Value |
---|---|---|
mint | bonded_ratio | {bondedRatio} |
mint | inflation | {inflation} |
mint | annual_provisions | {annualProvisions} |
mint | amount | {amount} |
Client
CLI
A user can query and interact with themint
module using the CLI.
Query
Thequery
commands allows users to query mint
state.
annual-provisions
Theannual-provisions
command allows users to query the current minting annual provisions value
inflation
Theinflation
command allows users to query the current minting inflation value
params
Theparams
command allows users to query the current minting parameters
gRPC
A user can query themint
module using gRPC endpoints.
AnnualProvisions
TheAnnualProvisions
endpoint allows users to query the current minting annual provisions value
Inflation
TheInflation
endpoint allows users to query the current minting inflation value
Params
TheParams
endpoint allows users to query the current minting parameters
REST
A user can query themint
module using REST endpoints.