
Three-layer view
The network can be described as three layers:- Ethereum layer: a set of contracts on Ethereum mainnet. These include staking contracts, checkpoint storage, and the bridge.
- Heimdall-v2 layer: a set of proof-of-stake nodes running in parallel to Ethereum mainnet. Heimdall-v2 monitors staking contracts on Ethereum, validates Bor block data, and submits checkpoints to Ethereum. Built on Cosmos SDK and CometBFT.
- Bor layer: a set of block-producing nodes shuffled by Heimdall. Built on Go Ethereum.
Staking contracts on Ethereum
The PoS mechanism relies on staking management contracts deployed on Ethereum mainnet. These contracts:- Allow anyone to stake POL tokens and register as a validator.
- Distribute staking rewards for validating state transitions on the network.
- Record checkpoints submitted by Heimdall.
Heimdall-v2: validation layer
Heimdall-v2 aggregates blocks produced by Bor into Merkle trees and publishes the Merkle root periodically to Ethereum. These periodic snapshots are called checkpoints. For every set of Bor blocks, a Heimdall-v2 validator:- Validates all blocks since the last checkpoint.
- Creates a Merkle tree of the block hashes.
- Publishes the Merkle root hash to Ethereum mainnet.
- Providing finality on Ethereum for cross-chain withdrawals.
- Providing proof of burn for asset withdrawal to Ethereum.
- A subset of active validators from the pool is selected as block producers for a span. These producers create and broadcast blocks.
- A checkpoint includes the Merkle root hash of all blocks in a given interval. All nodes validate the hash and attach their signatures.
- A proposer from the validator set collects all signatures and submits the checkpoint to Ethereum mainnet.
- Validator selection probability is proportional to stake ratio in the overall pool.