generated from okp4/template-oss
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
44 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,16 @@ | ||
description: | | ||
## Purpose | ||
## Function | ||
The Minting Module is a fundamental component within the blockchain ecosystem, responsible for managing the dynamic | ||
issuance of tokens to validators, thereby ensuring the stability and sustainability of the network. | ||
This module operates on a continuous basis, recalculating parameters with each new block to maintain an optimal | ||
token supply. | ||
The Minting Module plays a crucial role in the blockchain ecosystem, tasked with regulating the issuance of tokens to | ||
validators. This ensures the network's ongoing stability and viability. The module operates consistently, adjusting | ||
key parameters with each block to maintain a balanced token supply. | ||
## 🧮 Calculation | ||
## Calculation of Inflation | ||
The formula for calculating the yearly staking reward target (srty) is as follows: | ||
The method for determining the inflation rate is outlined in the | ||
[OKP4 Whitepaper - Token Model](https://docs.okp4.network/whitepaper/token-model). | ||
``` | ||
srty = a • i • (c - b / bt) | ||
``` | ||
## Per-Block Token Generation | ||
- `srty`: Represents the yearly staking reward target. | ||
- `a`: Denotes the total token supply within the blockchain. | ||
- `i`: Refers to the inflation coefficient, a configurable parameter set at 0.073 by default. | ||
- `c`: Signifies the bonding ratio adjustment coefficient. | ||
- `b`: A dynamic variable ranging from 0 to 1, symbolizing the current bonding ratio at the current block. | ||
- `bt`: Represents the target bonding ratio, conventionally set to 0.66. | ||
### Yearly Inflation Rate | ||
Upon the determination of srty, the Minting Module proceeds to convert it into a yearly inflation rate | ||
expressed as a percentage (Iy): | ||
``` | ||
Iy = (srty • 100) / a = (a • i • (c - b / bt) • 100) / a = i • (c - b / bt) • 100 | ||
``` | ||
- `Iy` (in percentage): Represents the yearly inflation rate. | ||
### Block-Level Token Minting | ||
With the yearly inflation rate in hand, the Minting Module can calculate the number of tokens to be minted for | ||
each individual block by knowing the number of block in one years. | ||
Given the annual inflation rate, the Minting Module calculates the exact amount of tokens to be generated for each | ||
block, based on the total number of blocks in a year. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.