Module agora.consensus.Reward
Contains functions to calculate the block reward.
Block rewards are given to validators for verifying transactions and signing blocks. This serves as an incentive for coin holders to participate in the network as validators. The more active validators the network has, the more signatures are on the blocks, and ultimately the more secure the overall network is.
Block rewards are also sent to the Commons Budget address for the first 6.7 years. After that period, the Commons Budget will be funded only from the transaction and data fees.
Here are some finer details of the block reward calculation:
- Block rewards, along with transaction and data fees, will be
distributed in a
Coinbase transaction
which will be added to a block's transaction set at the end of each payout period. - The distribution of the block rewards and fees will be delayed by one payout period, so that enough time is given to validators to share block signatures.
- Each validator will be rewarded based on the percentage of the actual / maximum possible block signatures for the payout period.
- The total block reward for a particular height is fixed, however this
doesn't mean that the total validator reward is fixed. The total validator
reward is based on the total number of signatures on the blocks in question.
The total validator reward is reduced using a multiplier function of the
missing signatures, meaning that the more that are missing the higher the
penalty per missing signature. This is to encourage validators to share
signatures.
The coins remaining will go to the Commons Budget.
i.e.
fixed block reward at height X - total validator reward
- The part of the total validator reward that cannot be divived equally between the validators will also go to the Commons Budget.
Classes
Name | Description |
---|---|
Reward
|
Calculate Block Rewards for Validators and Commons Budget
|
Structs
Name | Description |
---|---|
BlockRewards
|
struct to return the calculated block rewards for the Validators and the
Commons Budget
|