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

One quick question, Heimdall layer is part of the side chain right (core matic network)? I mean to ask is, do validators sits on matic network or ethereum network?

As I understand, stakers sits on ethereum network and validator and blockproducer sits on matic network. Is my understanding correct?

1 Like

How does the Heimdall component connect to Ethereum in order to “inherit Ethereum chain security”?

Asked otherwise: how does Heimdall check that some Ethereum account indeed staked certain amount of MATIC token on the Eth blockchain.

I suspect that the Heimdall component receives the block headers from random Ethereum nodes and then use Merkle paths rooted at (some of) the Ethereum blocks?