Consensus Mechanisms
In a decentralized network, there is no central authority to validate transactions. Consensus mechanisms are the protocols that ensure all nodes agree on the current state of the ledger, preventing fraud and double-spending.
How Consensus Works
Without Consensus: With Consensus:
Node A says: "Pay 5 BTC to X" Node A says: "Pay 5 BTC to X"
Node B says: "Pay 2 BTC to Y" All nodes vote/verify
Node C says: "A sent nothing" Valid transactions added
Nobody agrees β Chaos Network agrees β Trust
Proof of Work (PoW)
Miners compete to solve a complex mathematical puzzle. The first to find the solution gets to add the next block and receives a reward. This requires massive computational power, making attacks expensive.
Proof of Work Process:
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β Create Block ββββββΊβ Try Nonce=0 ββββββΊβ Hash valid? β
β β β Compute Hash β β No β Noce++β
ββββββββββββββββ ββββββββββββββββ β Yes β Done!β
ββββββββββββββββ
Puzzle: Find nonce where hash starts with "00000"
Hash("0xabc...0") = 7f3a... β No
Hash("0xabc...1") = 3b2e... β No
Hash("0xabc...2") = 0000f8... β Yes! Block valid!
Used by: Bitcoin, Litecoin, Dogecoin
Pros: Battle-tested, extremely secure
Cons: High energy consumption, slow block times
Proof of Stake (PoS)
Validators are chosen to create blocks based on how much cryptocurrency they "stake" (lock up) as collateral. The more you stake, the higher your chance of being selected. Misbehavior results in losing your stake.
Proof of Stake Process:
βββββββββββββββββββββββββββββββββββββββββββ
β Validator Pool β
β βββββββββββ βββββββββββ βββββββββββ β
β βAlice:32 β βBob:16 β βCarol:48 β β
β βETH stakedβ βETH stakedβ βETH stakedβ β
β βββββββββββ βββββββββββ βββββββββββ β
β Selection weighted by stake amount β
β Carol (48/96 = 50%) most likely chosenβ
βββββββββββββββββββββββββββββββββββββββββββ
Used by: Ethereum, Cardano, Solana, Polkadot
Pros: Energy efficient, fast finality
Cons: Can lead to wealth concentration
Other Mechanisms
Delegated Proof of Stake (DPoS): Token holders vote for a fixed number of delegates who validate blocks. Used by EOS, TRON.
Proof of Authority (PoA): A set of pre-approved validators sign blocks. Used in private/consortium chains.
Practical Byzantine Fault Tolerance (PBFT): Nodes vote on blocks in rounds. Tolerates up to 1/3 malicious nodes. Used by Hyperledger Fabric.
Proof of History (PoH): Creates a verifiable timestamp sequence before consensus, speeding up validation. Used by Solana.