Table of Contents
Table of Contents

What Are Consensus Mechanisms in Blockchain and Cryptocurrency?

Consensus Mechanism: A program used in blockchain systems to achieve distributed agreement about the ledger's state.

Investopedia / Lara Antal

What Is a Consensus Mechanism?

A consensus mechanism is a program used in blockchain systems to achieve distributed agreement about the ledger's state. Cryptocurrencies, blockchains, and distributed ledgers benefit from their use because the consensus mechanism replaces much slower human verifiers and auditors.

For instance, the Bitcoin blockchain uses a mechanism called Proof-of-Work (PoW), which requires computational power to solve an encrypted puzzle. After one miner (or a group working together) solves the hashing puzzle, Bitcoin's PoW requires that every node on the network verifies the data that has been changed by checking:

  • The data structure
  • The block header hash
  • The block timestamp
  • The block size
  • The first transaction

Every node completes a long transaction verification checklist. This verification takes much less time than the process of solving the hash, which is called mining, and is orders of magnitude less time-consuming than human verification.

Key Takeaways

  • A consensus mechanism is any method used to achieve agreement, trust, and security across a decentralized computer network.
  • In the context of blockchains and cryptocurrencies, proof-of-work (PoW) and proof-of-stake (PoS) are two of the most prevalent consensus mechanisms.
  • Consensus mechanisms play an essential part of securing information by encrypting it and using automated group verification.

History of Consensus Mechanisms

When computers and networks began gaining popularity in the 1980s and 90s, shared databases were created so that multiple users could access the information they stored. Most had a centralized database with permissions that users accessed from different workstations. This setup evolved into centralized networks with administrators who granted user rights and maintained the integrity of the data.

Some of these shared databases developed into programs that distributed storage and processing power across a network of storage devices in different locations. One of the most significant issues that needed addressing was that of preventing data tampering and unauthorized access, whether it was malicious or not. A method to automate distributed database management was required to ensure data was not changed.

This need led to the creation of distributed autonomous consensus, where programs on a network agreed on a database's state using cryptographic techniques. Agreement was designed to be reached using encryption algorithms to create long strings of alphanumeric numbers—called a hash—which were then verified by programs running on the network. A hash only changes if the information input into the hashing algorithm is changed, so the programs were designed to compare hashes to ensure they matched.

When each program running on the network created a matching alphanumeric string, the data was said to be agreed upon by consensus of the network. Thus, consensus mechanisms were made, with credit generally given to Satoshi Nakamoto, the anonymous Bitcoin creator. However, many people worked on consensus mechanisms for years before Nakamoto released the whitepaper that made Bitcoin famous.

Data and computer scientists such as Moni Naor, Cynthia Dwork, Adam Beck, Nick Szabo, and many others worked on and contributed to developing networked consensus mechanisms.

Types of Consensus Mechanisms

There are different kinds of consensus mechanism algorithms, each of which works on different principles.

Proof of work (PoW) is a common consensus algorithm used by the most popular cryptocurrency networks like Bitcoin and Litecoin. It requires a participant node to prove that the work done and submitted by them was valid. However, the bitcoin mining mechanism requires high energy consumption and long processing times.

Proof of stake (PoS) is another common consensus algorithm that evolved as a low-cost, low-energy-consuming alternative to the PoW algorithm. It involves allocating responsibility in maintaining the public ledger to a participant node in proportion to the number of virtual currency tokens held. However, this has the drawback that it incentivizes hoarding instead of spending.

Proof of History (PoH) was developed by the Solana Project. It is similar to Proof of Elapsed Time (PoET), which encodes the passage of time cryptographically to achieve consensus without expending many resources.

While PoW and PoS are by far the most prevalent in the blockchain space, there are other consensus algorithms. Proof of Capacity (PoC) allows contributing nodes to share storage space. The more hard disk space a node has, the more rights it is granted for maintaining the public ledger. Proof of Activity (PoA), used on the Decred blockchain, is a hybrid that makes use of aspects of both PoW and PoS. Proof of Burn (PoB) requires transactors to send small amounts of cryptocurrency to inaccessible wallet addresses, in effect "burning" them out of existence.

Future of Consensus Mechanisms

While used by all cryptocurrencies, consensus mechanisms are just as important in distributed ledger networks used by enterprises. Platforms have been created for business and government use, allowing each entity to choose from modules created for their needs, backed by consensus mechanisms. Hyperledger Fabric, one of the more well-known distributed ledger platforms, provides different consensus mechanisms that can be used for several purposes.

Cryptocurrency's future may be unknown and volatile, but consensus mechanisms remain an essential part of emerging technology. They ensure data safety and integrity and keep those with nefarious intentions locked out of distributed ledgers.

What Is the Most Popular Consensus Mechanism?

Proof of work and proof of stake seem to be the most used in cryptocurrencies. Other mechanisms might work better for enterprises, businesses, or personal uses.

What Is PoW vs. PoS Consensus Mechanism?

Proof of work is generating hashes to solve an encryption puzzle to prove work was done honestly to propose a new block and earn fees and rewards. Proof of stake requires users to offer cryptocurrency as collateral for proposing new blocks to earn fees and rewards.

What Are the Three Types of Consensus in Blockchain?

Several have been created, but only a few have been implemented. Some types besides proof of work and proof of stake are delegated proof of stake, proof of importance, proof of elapsed time, proof of authority, and proof of capacity. Each uses different concepts to validate data changes.

The Bottom Line

Consensus mechanisms have become an essential aspect of distributed ledgers, databases, and blockchains because much of the world is becoming more digital. Ownership of physical assets is being tokenized on ledgers and blockchains, people without access to financial services have access through blockchains, and businesses need data security more than ever.

Consensus mechanisms verify data inputs and outputs, which translates to automatically auditing the digital transactions that are common today—without human oversight or intervention. They create an environment where you don't need to trust that the other party in a transaction is honest because they ensure the information is unalterable and secure.

The comments, opinions, and analyses expressed on Investopedia are for informational purposes only. Read our warranty and liability disclaimer for more info.

Article Sources
Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial policy.
  1. O'Reilly. "Mastering Bitcoin, Chapter 8."

Take the Next Step to Invest
×
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.