How the XDC Network commits a block

108 masternodes, each with 10 million XDC at stake, take turns proposing a block every two seconds. Two thirds of them sign it, and three signed blocks in a row make the first one final.

Read how it works

Click a step on the right, or use the arrow keys, to jump to it. Move your mouse to shift the view.

Just included

    pending transaction this round's leader and its proposal vote, and a block with a quorum certificate committed by the three-chain rule timeout; standby candidates sit on the outer ring masternode that proposed the latest block transaction in that block, succeeded included but reverted, gas still paid signatures on the previous block's certificate block committed; standby and penalised candidates on the outer ring
    Transaction types, by share of each block Waiting for the first full block
    How this is counted

    Every user transaction in a block counts once, by what it does: a plain XDC transfer, a token transfer or approval (recognised by the ERC-20 function selector), a contract call, or a contract creation. The gas-free system transactions masternodes send to the block-signer contract are left out here; they appear as the grey part of the bars below. XDC transfers always get the first colour.

      Transaction types in each block since you connected
      BlockTransactions per type
      Transactions per block Waiting for the first block
      • succeeded
      • reverted (included, gas still paid)
      • masternode signing (system, gas-free)
      • before you connected

      Use the left and right arrow keys to read each block's count.

      Transactions in each recent block
      BlockTransactionsSucceededRevertedMasternode signingRoundTime
      Block chain 0 tx in latest block 0.000000 XDC paid in gas 108 masternodes active 900 rounds to epoch end final 0 · head 0

        The parts that make this work

        Masternodes and the 10 million XDC stake

        Anyone can become a candidate by locking 10,000,000 XDC in the network's staking contract, and other holders can add stake to a candidate they trust. Only the 108 highest-staked candidates run consensus; on mainnet a few hundred more sit on a standby list. The stake is what makes misbehaviour expensive: a masternode caught breaking the rules can be penalised and drop out of the active set, and its XDC stays locked while it does.

        Epochs and elections

        An epoch is 900 consensus rounds, roughly half an hour at two seconds a round. At each epoch boundary the candidates are re-ranked by stake, penalised nodes are left out, and the new top 108 take over. The same boundary block pays out the rewards for the epoch just finished, shared according to how many blocks each masternode signed, with a portion to the XDC foundation. Because the round counter keeps running through timeouts, epoch boundaries fall on rounds, not on fixed block numbers.

        Rounds, leaders and certificates

        XDPoS 2.0 is a chained HotStuff protocol. Each round has one leader, masternode number round mod 108, and it proposes exactly one block. The other masternodes sign a vote if the block is valid and extends the highest certificate they know. Any 73 of the 108 signatures (⌈108 × ⅔⌉) form a quorum certificate, and the next block embeds that certificate in its header. That's why every XDC block header carries the round number, the certificate for its parent, and dozens of signatures.

        The three-chain rule

        A single certificate proves that two thirds of the masternodes saw a block, but not that they all agree it's the only block at that height. HotStuff settles that with three certified blocks in consecutive rounds: when a block, its child and its grandchild each carry a certificate, the first one is committed and can never be replaced, and so is everything before it. Every honest node reaches the same conclusion from the same headers, without another message.

        Timeouts, forensics and penalties

        A leader that is offline or slow produces nothing, so masternodes wait a fixed period and then broadcast a signed timeout for the round. Two thirds of those form a timeout certificate, the round is skipped and the next leader proposes. Every vote and timeout is a signature, so a masternode that signs two conflicting blocks, or lies about its round, leaves proof. The forensics part of the design uses those signatures to identify the offenders. Missed rounds are recorded per epoch, and a masternode that signs nothing for a whole epoch is moved to the penalty list and sits out several epochs.

        Finality in about six seconds

        A block is proposed, certified when the next block lands, and committed when the one after that is certified: three blocks, about six seconds. Ethereum's proof of stake needs two full epochs, around thirteen minutes, before a block is finalised. Bitcoin never finalises at all; it only makes reorganisation less likely with each block. On XDC a payment in a committed block is settled, and the explorer's view of it can't change.

        What a transaction costs

        XDC uses Ethereum's gas model, so a plain transfer takes 21,000 gas and a contract call takes more. Blocks carry a base fee, which on mainnet sits at 12.5 gwei, and wallets usually pay a little above it. At that price a transfer costs about 0.00026 XDC. Nothing is burned: the whole fee goes to the masternode that proposed the block. The system transactions masternodes send to sign blocks are free.

        What live mode shows

        Live mode polls a public XDC mainnet JSON-RPC node every second and draws each new block as it lands. The masternode that lights up is the block's real proposer, found from the round number in the header, and the inner ring is the real list of 108 masternodes for this epoch, with the standby and penalised candidates outside it. Each dot is a real transaction, red if it reverted. The signature count on the certificate is read from the header, but the node doesn't say which masternodes signed, so the vote beams are spread around the ring. Rounds that were skipped show as timeouts in the feed. Block numbers, hashes, gas and the finalised height are real.

        What the animation simplifies

        Step-by-step mode shows an election and a timeout in every cycle so you can see them; on mainnet an election happens every 900 rounds and timeouts are rare. Votes are drawn one by one, though real masternodes vote at once, and the transaction counts are illustrative. The full protocol, including the locking rule that stops a masternode voting for two conflicting branches, is in the XDC Network documentation and the XDPoS 2.0 paper.