Consensus (n.) a general agreement
Mechanism (n.) a natural or established process by which something takes place or is brought about.
By definition, a consensus mechanism is an established process by which a general agreement is brought about. But how does this relate to blockchain? Blockchains and their associated cryptocurrencies or tokens rely on consensus mechanisms (also known as consensus algorithms or consensus protocols) to function and be trusted by users.
Blockchains run on nodes, computers that run the blockchain’s software to validate and store the complete history of transactions on the network. These nodes reach consensus when at least 51% of them agree that all information (current and historical) written to the chain is accurate and free from the influence of bad actors. When consensus is established, a new block in the chain is produced. How blockchains coordinate their nodes to reach this consensus is called the consensus mechanism.
The two most common types of consensus mechanisms deployed in blockchain today are proof-of-work (PoW) and proof-of-stake (PoS).
PoW was the original consensus mechanism utilized with Bitcoin, Litecoin, and Ethereum using this method to validate new blocks on their respective blockchains. PoW is done by miners who compete to create new blocks of transactions. When a miner solves a complex mathematical puzzle (which, in the case of Bitcoin, requires massive computational power), a new block is created and the miner is rewarded with some freshly minted crypto for their efforts to validate and secure the network. PoW blockchains are generally regarded as the most secure chains, but they encounter trouble with regards to scaling because of the staggering amount of resources spent to solve the math puzzles.
PoS consensus is achieved through validators who ‘stake’ or deposit a large number of the blockchain’s native token in order to act as a node. Nodes are randomly chosen to validate the next block on the blockchain. Instead of the massive computational power needed in PoW consensus mechanisms, PoS blockchains only require you to stake more tokens on the chain in order to earn rewards. PoS blockchains are considered much more environmentally-friendly and scalable than PoW chains, but they may sacrifice some level of security in the process.
A number of new types of consensus mechanisms have arisen in the recent past. Proof-of-authority (PoA), proof-of-history (PoH), and proof-of-elapsed time (PoET) are just to name a few. There is also a growing number of PoS variations including Nominated PoS or Delegated PoS, Leased PoS, Pure PoS, Liquid PoS, Proof-of-Validation, and Hybrid PoS.
As blockchain developers mix and match various protocols and design new ways to streamline blockchain consensus, the number of consensus mechanisms will continue to grow.