Matic System Overview - Heimdall

Heimdall is our Proof-of-Stake Verifier layer, which is responsible for checkpointing a representation of the Plasma blocks to the main chain in our architecture. We have implemented this by building on top of the Tendermint consensus engine with changes to the signature scheme and various data structures.

The main chain Stake Manager contract works in conjunction with the Heimdall node to act as the trust-less stake management mechanism for the PoS engine, including selecting the Validator set, updating validators, etc. Since staking is actually done on the Ethereum smart contract, we do not rely only on validator honesty and instead inherit Ethereum chain security for this key part.

Validator Selection

Validators are selected via an on-chain auction process which happens at regular intervals as defined here. The process of becoming a validator after you have won the slot is outlined here:

  • Call StakeFor() function on StakeManager contract to lock your state on-chain.
  • Bridge on heimdall listens to this event and broadcasts to heimdall
  • After consensus Validator is added to heimdall but not activated.
  • Validator starts validating only after StartEpoch (defined here)
  • As soon as startEpoch reaches the validator is added to validator-set and starts participating in the consensus mech