Component | Rewards |
Stakeholders | Brendon Fish, Mathis Antony, Abdul Basit |
Inflation rate for ESP tokens: 3%
Average block time: 2 seconds
Total supply: 10 billion ESP tokens (hardcoded)
Calculated block reward: ESP tokens
Assumption: The block reward is fixed.
Acceptance: Verify that the total reward distributed among the validator and
its delegators equals the calculated block reward. Acceptance: Confirm that
the average block time is reasonable by running a load generator on a devnet
over time and calculating average block time based on network uptime.
Note
The total supply calculation will eventually be based on the token contract rather than being hardcoded. This is because the mainnet and testnet can have different initial token supply. Furthermore, this doesn’t take into account the supply changes due to minting
Acceptance: Verify the validator receives both commission and delegator reward when also delegating.
Acceptance: Confirm the validator receives no commission reward when the rate is set to 0.
Acceptance: Confirm the validator receives the entire block reward if commission is set to 10,000 basis points.
Acceptance: Run a network with distinct stake weightings (e.g., 100, 200, 500, 1000) and verify that reward distributions align proportionally over time.
Acceptance: Remove a node from the stake table and verify rewards are no
longer distributed to it; test that the overall reward distribution is now higher
for the remaining validators over a period of time compared to before.
Acceptance: Verify the Merkle tree updates at every block by checking the reward Merkle tree commitment in the block header.
Acceptance: Confirm rewards for leaders and delegators accumulate correctly
over time.
Assumption: The network has committed the merkle root of the reward state for an epoch
Acceptance: Verify that a leader can successfully submit a valid proof to claim their reward for a specific block
Acceptance: Test that the contract verifies the submitted proof against the committed merkle root and transfers the correct reward amount to the account.
Acceptance: Test that claims submitted without a valid proof are rejected.
Acceptance: Test that same rewards cannot be claimed more than once for any account.
Acceptance: Test that withdrawals are rejected for amount greater than what is specified in the merkle tree
Acceptance: Test that claims can only be submitted for rewards in the epoch
for which the merkle root has been committed and not for any future or
uncommitted epochs.
Acceptance: Shut down a node for some time, restart it, and verify it participates in consensus and voting.
Acceptance: Add a new node later and verify it can catch up on the reward Merkle tree. Query reward-state/reward-balance/{block_height}/{address} at multiple block heights and validator addresses to confirm rewards update correctly.
Acceptance: For every address in the stake table (leaders and delegators),
query reward balances at blocks and
. Confirm that the difference in
total rewards equals the block reward.
Note
This has not been implemented and requires discussion about the design
Warning: