A validator is a participant in the network who locks up MATIC tokens in the system and runs Heimdall validator and Bor block producer nodes in order to help run the network. Validators stake their MATIC tokens as collateral to work for the security of the network and in exchange for their service, earn rewards.
Polygon relies on a set of validators to secure the network. The role of validators is to run a full node, produce blocks, validate and participate in consensus, and commit checkpoints on the Ethereum mainnet. To become a validator, one needs to stake their MATIC tokens with staking management contracts residing on the Ethereum mainnet.
Rewards are distributed to all stakers proportional to their stake at every checkpoint with the exception being the proposer getting an additional bonus. User reward balance gets updated in the contract which is referred to while claiming rewards.
Stakes are at risk of getting slashed in case the validator node commits a malicious act like double signing which also affects the linked delegators at that checkpoint.
End-to-end flow for a Polygon validator
Validators set up their signing nodes, sync data and then stake their tokens on the Ethereum mainnet staking contracts to be accepted as a validator in the current set. If a slot is vacant, the validator is accepted immediately. Otherwise, one needs to go through the replacement mechanism to get a slot.
Block producers are chosen from the validator set where it is the responsibility of the selected validators to produce blocks for a given span.
Nodes at Heimdall validate the blocks being produced, participate in consensus and commit checkpoints on the Ethereum mainnet at defined intervals.
The probability of validators to get selected as the block producer or checkpoint proposer is dependent on one’s stake ratio including delegations in the overall pool.
Validators receive rewards at every checkpoint as per their stake ratio, after deducting the proposer bonus which is disbursed to the checkpoint proposer.
One can opt out of the system at any time and can withdraw tokens once the unbonding period ends.
Setting up a validator node