Skip to content

Mainnet Validator & Block Rewards Tutorial v0.18.13

manikanta472 edited this page Jan 23, 2022 · 1 revision

Who earns block reward

Block Rewards will be distributed to the active validators, based on their participation in Voting for the blocks

How is block rewards distributed across the active validators in each block

Assume that [validator-1, validator-2, validator-3] voted block H and the amount of block reward for block H is 9 OLT. Each validator will able to earn its share of 9 OLT proportional to its power in height H+1.

Block rewards interval and maturity time

Block rewards mature every 80000 blocks which is called reward interval. Matured block reward goes to above "matureBalance" field. Block rewards made in interval X will show in above "matureBalance" after interval X+1

How to check validator active status and power

Run command olclient validatorset to see validator status.

It looks like this

Active true
Frozen false
Address 0lt2d568d7e68a37ed47fdae0f612b1538d796c9785
StakeAddress 0lt889514a83f5013c8ed7c279202fb04324c40883b
Power 500000
Name 0
Staking 500000

Check reward information for a specific validator

Run below command to see reward information, replacing address with actual address in the command.

olclient call query.GetTotalRewardsForValidator {\"validator\":\"REPLACE_YOUR_ADDRESS_HERE_WITHOUT_0lt_PREFIX\"}

Result looks similar to this:

{
  "address": "0lt2d568d7e68a37ed47fdae0f612b1538d796c9785",
  "matureBalance": "675646403141504552440",
  "pendingAmount": "1824490612636249422",
  "totalAmount": "677470893754140801862",
  "withdrawnAmount": "0"
}

How to withdraw block reward

Once you see no-zero "matureBalance" in above reward information. For example, you'll be able to withdraw 10 OLT from the reward pool using below command, replacing address with actual validator stake address.

olclient rewards withdraw --amount 10 --address REPLACE_YOUR_STAKEADDRESS_HERE_WITHOUT_0lt_PREFIX

Please enter your password

Check the increased balance in validator stake address

Run below command, replacing address with actual stake address.

olclient balance --address REPLACE_YOUR_STAKEADDRESS_HERE_WITHOUT_0lt_PREFIX

Clone this wiki locally