Expand description
Defines constants and formulas which are used in pchain_runtime
.
For example, they are
- the portion of gas fee burning into Tresury account (TREASURY_CUT_OF_BASE_FEE)
- the calculation of issuance to reward the network (issuance_reward)
- issuance rate (ISSUANCE_RATE_FACTORS)
- calculation of pool reward and stake reward
Constants§
- ISSUANCE_
RATE_ FACTORS - 0.85 ^ (n / 365) (and then multply by 10000 to make it integer)
- ISSUANCE_
STABLE_ EPOCH - Number of epoch to reach for applying a constant issurance rate in reward calculation
- TOTAL_
BASE_ FEE - denominator of Treasury cut of Base fee
- TREASURY_
CUT_ OF_ BASE_ FEE - Send 20% of gas to Treasury
Functions§
- issuance_
reward - Calculate issuance reward at particular epoch.
- pool_
reward - Calculate reward of a pool. It is fraction of the pool power to network power, and block performance. Baseline is calculated by: number of blocks per term / number of validators.
- stake_
reward - Return reward to the stakes and commission_fee.