inflation
Abstract
Thex/inflation module mints new Paxeer Network tokens and allocates them in daily
epochs according to the [Paxeer Network Token
Model](https://Paxeer-Network.blog/the-Paxeer Network-token-model-edc07014978b) distribution to
- Community Pool
50%. - Staking Rewards
50%, - Usage Incentives:
0%,
x/mint module, that other Cosmos chains are using.
The allocation of new coins incentivizes specific behaviour in the Paxeer Network network.
Inflation allocates funds to 1) the community pool(managed by sdk x/distribution module) to fund spending proposals,
and 2) the Fee Collector account (in the sdk x/auth module) to increase staking rewards.
The now deprecated x/incentives module account (3) does not accrue tokens anymore.
Contents
Concepts
Inflation
In a Proof of Stake (PoS) blockchain, inflation is used as a tool to incentivize participation in the network. Inflation creates and distributes new tokens to participants who can use their tokens to either interact with the protocol or stake their assets to earn rewards and vote for governance proposals. Especially in an early stage of a network, where staking rewards are high and there are fewer possibilities to interact with the network, inflation can be used as the major tool to incentivize staking and thereby securing the network. With more stakers, the network becomes increasingly stable and decentralized. It becomes stable, because assets are locked up instead of causing price changes through trading. And it becomes decentralized, because the power to vote for governance proposals is distributed amongst more people.Paxeer Network Token Model
The Paxeer Network Token Model outlines how the Paxeer Network network is secured through a balanced incentivized interest from users, developers and validators. In this model, inflation plays a major role in sustaining this balance. With an initial supply of 200 million and over 300 million tokens being issued through inflation during the first year, the model suggests an exponential decline in inflation to issue 1 billion Paxeer Network tokens within the first 4 years. We implement two different inflation mechanisms to support the token model:- linear inflation for team vesting and
- exponential inflation for staking rewards and community pool.
Linear Inflation - Team Vesting
The Team Vesting distribution in the Token Model is implemented in a way that minimized the amount of taxable events. An initial supply of 200M allocated tovesting accounts at genesis. This amount is equal to the total inflation
allocated for team vesting after 4 years (20% * 1B = 200M). Over time,
unvested tokens on these accounts are converted into vested tokens at a
linear rate. Team members cannot delegate, transfer or execute Ethereum
transaction with unvested tokens until they are unlocked represented as
vested tokens.
Exponential Inflation - The Half Life
The inflation distribution for staking and community pool is implemented through an exponential formula, a.k.a. the Half Life. Inflation is minted in daily epochs. During a period of 365 epochs (one year), a daily provision (epochProvison) of Paxeer Network tokens is minted
and allocated to staking rewards and the community pool.
The epoch provision depends on module parameters and is recalculated at the end of every epoch.
The calculation of the epoch provision is done according to the following formula:
State
State Objects
Thex/inflation module keeps the following objects in state:
| State Object | Description | Key | Value | Store |
|---|---|---|---|---|
| Period | Period Counter | []byte{1} | []byte{period} | KV |
| EpochIdentifier | Epoch identifier bytes | []byte{3} | []byte{epochIdentifier} | KV |
| EpochsPerPeriod | Epochs per period bytes | []byte{4} | []byte{epochsPerPeriod} | KV |
| SkippedEpochs | Number of skipped epochs bytes | []byte{5} | []byte{skippedEpochs} | KV |
Period
Counter to keep track of amount of past periods, based on the epochs per period.EpochIdentifier
Identifier to trigger epoch hooks.EpochsPerPeriod
Amount of epochs in one periodGenesis State
Thex/inflation module’s GenesisState defines the state necessary for
initializing the chain from a previously exported height. It contains the module
parameters, the current period, epoch identifier, epochs per period and
the number of skipped epochs.
:
Hooks
Thex/inflation module implements the AfterEpochEnd hook from the
x/epoch module in order to allocate inflation.
Epoch Hook: Inflation
The epoch hook handles the inflation logic which is run at the end of each epoch. It is responsible for minting and allocating the epoch mint provision as well as updating it:- Check if inflation is disabled. If it is, skip inflation, increment number of skipped epochs and return without proceeding to the next steps.
- A block is committed, that signalizes that an
epochhas ended (blockheader.Timehas surpassedepoch_start+epochIdentifier). - Mint coin in amount of calculated
epochMintProvisionand allocate according to inflation distribution to staking rewards and community pool. - If a period ends with the current epoch, increment the period by
1and set new value to the store.
Events
Thex/inflation module emits the following events:
Inflation
| Type | Attribute Key | Attribute Value |
|---|---|---|
inflation | "epoch_provisions" | {fmt.Sprintf("%d", epochNumber)} |
inflation | "epoch_number" | {strconv.FormatUint(uint64(in.Epochs), 10)} |
inflation | "amount" | {mintedCoin.Amount.String()} |
Parameters
Thex/inflation module contains the parameters described below. All parameters
can be modified via governance.
| Key | Type | Default Value |
|---|---|---|
ParamStoreKeyMintDenom | string | evm.DefaultEVMDenom // “ahpx” |
ParamStoreKeyExponentialCalculation | ExponentialCalculation | A: sdk.NewDec(int64(300_000_000)) |
R: sdk.NewDecWithPrec(50, 2) | ||
C: sdk.NewDec(int64(9_375_000)) | ||
BondingTarget: sdk.NewDecWithPrec(66, 2) | ||
MaxVariance: sdk.ZeroDec() | ||
ParamStoreKeyInflationDistribution | InflationDistribution | StakingRewards: sdk.NewDecWithPrec(500000000, 9) |
UsageIncentives: sdk.NewDecWithPrec(000000000, 9) | ||
CommunityPool: sdk.NewDecWithPrec(500000000, 9) | ||
ParamStoreKeyEnableInflation | bool | true |
Mint Denom
TheParamStoreKeyMintDenom parameter sets the denomination in which new coins are minted.
Exponential Calculation
TheParamStoreKeyExponentialCalculation parameter holds all values required for the
calculation of the epochMintProvision. The values A, R and C describe
the decrease of inflation over time. The BondingTarget and MaxVariance
allow for an increase in inflation, which is automatically regulated by the
bonded ratio, the portion of staked tokens in the network. The exact formula
can be found under
Concepts.
Inflation Distribution
TheParamStoreKeyInflationDistribution parameter defines the distribution in which
inflation is allocated through minting on each epoch
(stakingRewards, CommunityPool).
Enable Inflation
TheParamStoreKeyEnableInflation parameter enables the daily inflation. If it is disabled,
no tokens are minted and the number of skipped epochs increases for each passed
epoch.
Clients
A user can query thex/inflation module using the CLI, JSON-RPC, gRPC or
REST.
CLI
Find below a list ofhyperpaxd commands added with the x/inflation module. You
can obtain the full list by using the hyperpaxd -h command.
Queries
Thequery commands allow users to query inflation state.
period
Allows users to query the current inflation period.
epoch-mint-provision
Allows users to query the current inflation epoch provisions value.
skipped-epochs
Allows users to query the current number of skipped epochs.
total-supply
Allows users to query the total supply of tokens in circulation.
inflation-rate
Allows users to query the inflation rate of the current period.
params
Allows users to query the current inflation parameters.
Proposals
Update Params Allows users to submit aMsgUpdateParams with the desired changes on the x/inflation module parameters.
To do this, you will have to provide a JSON file with the correspondiong message in the submit-proposal command.
For more information on how to draft a proposal, refer to the Drafting a proposal section.
gRPC
Queries
| Verb | Method | Description |
|---|---|---|
gRPC | Paxeer Network.inflation.v1.Query/Period | Gets current inflation period |
gRPC | Paxeer Network.inflation.v1.Query/EpochMintProvision | Gets current inflation epoch provisions value |
gRPC | Paxeer Network.inflation.v1.Query/Params | Gets current inflation parameters |
gRPC | Paxeer Network.inflation.v1.Query/SkippedEpochs | Gets current number of skipped epochs |
gRPC | Paxeer Network.inflation.v1.Query/TotalSupply | Gets current total supply |
gRPC | Paxeer Network.inflation.v1.Query/InflationRate | Gets current inflation rate |
GET | /Paxeer-Network/inflation/v1/period | Gets current inflation period |
GET | /Paxeer-Network/inflation/v1/epoch_mint_provision | Gets current inflation epoch provisions value |
GET | /Paxeer-Network/inflation/v1/skipped_epochs | Gets current number of skipped epochs |
GET | /Paxeer-Network/inflation/v1/total_supply | Gets current total supply |
GET | /Paxeer-Network/inflation/v1/inflation_rate | Gets current inflation rate |
GET | /Paxeer-Network/inflation/v1/params | Gets current inflation parameters |