Module formulas

Source
Expand description

Defines constants and formulas which are used in pchain_runtime.

For example, they are

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.