Mint Module (x/mint)
Overview
Thex/mint module handles the regular minting of new tokens in a configurable manner, implementing a flexible inflation mechanism that targets a particular bonded-stake ratio.
Purpose: Create new tokens according to a predefined inflation schedule to incentivize token staking and maintain network security.
Key Concepts
The Minting Mechanism
The default minting mechanism:- Flexible Inflation: Market-driven rate targeting bonded-stake ratio
- Market Balance: Balance between liquidity and staked supply
- Moving Rate: Adjusts inflation based on actual vs goal bonded percentage
Inflation Logic
Custom Minters
As of v0.53.0, developers can implement custom minting logic:State
Minter
Holds current inflation information: Storage:0x00 -> ProtocolBuffer(minter)
Parameters
Storage:0x01 -> ProtocolBuffer(Params)
| Parameter | Type | Default | Description |
|---|---|---|---|
| MintDenom | string | ”uatom” | Denomination of minted tokens |
| InflationRateChange | string (dec) | “0.130000000000000000” | Max annual inflation change |
| InflationMax | string (dec) | “0.200000000000000000” | Maximum inflation rate (20%) |
| InflationMin | string (dec) | “0.070000000000000000” | Minimum inflation rate (7%) |
| GoalBonded | string (dec) | “0.670000000000000000” | Target bonded ratio (67%) |
| BlocksPerYear | uint64 | ”6311520” | Expected blocks per year |
| MaxSupply | string (int) | “0” | Maximum supply (0 = unlimited) |
BeginBlock
Minting occurs at the beginning of each block:NextInflationRate
Calculate target annual inflation:NextAnnualProvisions
Calculate annual provisions based on supply and inflation:BlockProvision
Calculate provisions for current block:Max Supply Control
Optional feature to cap total supply:Queries
Query Inflation
Get current inflation rate:Query Annual Provisions
Get current annual provisions:Query Parameters
gRPC Endpoints
Inflation
AnnualProvisions
Params
Events
BeginBlocker
| Type | Attribute Key | Attribute Value |
|---|---|---|
| mint | bonded_ratio | |
| mint | inflation | |
| mint | annual_provisions | |
| mint | amount |
Code Examples
Custom Mint Function
Implement custom minting logic:Custom Inflation Function
Implement custom inflation calculation:Query Minter State
Mint Coins
Calculate Block Provision
Max Supply Example
Configure maximum supply:CLI Commands Reference
| Command | Description |
|---|---|
simd query mint inflation | Query current inflation rate |
simd query mint annual-provisions | Query annual provisions |
simd query mint params | Query mint module parameters |
REST Endpoints
Inflation
Annual Provisions
Params
Integration Guide
Inflation Schedule Examples
Example 1: Cosmos Hub Style
- Goal Bonded: 67%
- Min Inflation: 7%
- Max Inflation: 20%
- Rate Change: 13% per year