A Beginner’s Guide to Understanding the Blockchain (Part 2: Blockchain Consensus Mechanisms)
Tags: cryptocurrency, investing, technology, blockchain
Published: 2021-06-26 02:19:47

---
title: A Beginner’s Guide to Understanding the Blockchain (Part 2: Blockchain Consensus Mechanisms)
published: true
date: 2021-06-21 16:21:04 UTC
tags: cryptocurrency,investing,technology,blockchain
canonical_url: https://medium.com/coinmonks/a-beginners-guide-to-understanding-the-blockchain-part-2-blockchain-consensus-mechanisms-f2900b967b69
---

![](https://cdn-images-1.medium.com/max/1024/0*4VvAkyxuGQ0LFop_.jpg)<figcaption>Source: <a href="https://www.logicsolutions.com/">https://www.logicsolutions.com/</a></figcaption>

#### **_Consensus and Blockchains_**

As mentioned in the previous article on blockchains (access it [here](https://derekklim.medium.com/a-beginners-guide-to-investing-in-crypto-74781455645) if you haven’t already), consensus is a concept that is central to any blockchain, or distributed, system.

#### Why is this the case?

Think of it this way: in a normal centralized organisation, all decisions are made by a leader, a group of leaders, or by a board of decision-makers. In this case, no consensus between _all parties_ in the whole organisation is required, because decision-making power is vested in the leaders in the upper echelons of the hierarchy. **The authority figures will make the final decisions for everyone.**

In contrast, blockchains are decentralized systems, fully peer-to-peer, and with **no central authority figure or third party to make decisions**. While such systems have its merits, where they are less corruptible by a single source, and have more redundancies in place to prevent a single point of failure, they also have their issues.

In such a system, and with no restrictions on the _types of_, and _number of_ ‘peers’ coming into and going from the system, where anyone and everyone can just enter and leave this network as and when they please, how can users then make any decision as a collective? No one will be able to trust each other because they will know nothing about each others’ backgrounds!

#### How then, can they _even get anything done_?

This is where the concept of consensus is of utmost importance — only through such a _group decision-making process_ where group members develop, and agree to support a decision in the best interest of the whole, can anything in the blockchain get done.

But how can such consensus be achieved without a dedicated and central third party to oversee such a tenuous operation? We are talking about **helping an unlimited number of trustless users come to consensus here**  — surely it must be impossible to do so without someone to oversee everything?

There is actually a way, and yes, you guessed it — we can do so through consensus mechanisms!

_At this point, if you have not already read my previous article on blockchains, please do so at this_ [_link_](https://derekklim.medium.com/a-beginners-guide-to-investing-in-crypto-74781455645) _before proceeding on, if not you will definitely be lost in the next section!_

#### **_Trust without Trust in Blockchains: Consensus Mechanisms_**

Explained in its simplest terms, consensus mechanisms in blockchains are methods by which agreements between disparate parties in a group (who don’t know, and don’t trust each other) are achieved _without the involvement of any third party._

In the world of blockchain, there are numerous different consensus mechanisms. The main ones include, but are not limited to:

1. _Proof-of-Work_
2. _Proof-of-Stake_
3. _Proof-of-Activity_
4. _Proof-of-Space_
5. _Proof-of-Elapsed-Time_
6. _Proof-of-Authority_
7. _Proof-of-View_

Although they may sound drastically different, all these mechanisms serve the same ultimate purpose: **to ensure that the record of transactions on a blockchain are true and honest, where all participants are in agreement with regard to the history of transactions.**

The difference between them lies in the _way_ such a consensus is reached.

For the sake of not overloading you with too much information, this article will only focus on the **_Proof-of-Work_ (POW)** and **_Proof-of-Stake_ (POS)** consensus mechanisms.

![](https://cdn-images-1.medium.com/max/1024/0*IRslqlTUlWOMmZp6.jpg)<figcaption>Source: <a href="https://timestampmag.com/">https://timestampmag.com/</a></figcaption>

#### **_Proof-of-Work (POW)_**

In a blockchain that utilises the POW mechanism, a system of proposers and voters is established to ensure that no one user or group of users can make any decisions on their own. Such siloed decisions will never be beneficial to the network, because they are likely to be in the self-interests of said user/group of users.

Instead, updates to the ledger (or Google sheet, as referenced in the previous article) are proposed by one user at a time, and every other user in the network will vote on whether or not to accept the proposal.

Any user who wants to make a transaction on this blockchain sends the transaction to everyone in the entire network, and not just the recipient of the transaction. **Everyone on the network then casts votes based on whether the transaction they saw was valid or not.** Only after receiving a certain number of votes, say a _majority_, does the transaction get saved.

This protects the collective from any malicious behavior, as everyone will get to verify the transaction, before voting it into the ledger. It seems like our consensus problem has been solved!

![](https://cdn-images-1.medium.com/max/700/0*E11oF0HVhCOujeq2.png)<figcaption>What a double spend looks like. Source: <a href="https://www.chowles.com/">https://www.chowles.com/</a></figcaption>

Alas, there is one fatal flaw that we have missed out on: what if a malicious user swarms a blockchain network with multiple identities that he has created, in order to vote his malicious transaction (usually a [double spending attack](https://www.investopedia.com/terms/d/doublespending.asp)) in? This will essentially destroy the blockchain.

For example, imagine if 51% or more of a network’s users (thus, a network majority) are all controlled by the same entity — this will mean that any transaction that said entity proposes, malicious or honest, will _always_ be accepted into the blockchain, destroying the integrity of the network.

This method of overwhelming voting systems by flooding the network with multiple identities is referred to as a [_Sybil Attack_](https://academy.binance.com/en/articles/sybil-attacks-explained), and is one of the more common vectors of attack on a distributed system.

Sybil attacks are only possible in networks where there is little-to-no-cost to vote. In such a situation, there’s no longer any value in a vote because anyone with spare time can make as many identities as they want to. True consensus can never be achieved in a network like this.

This is where the ‘_work_’ from POW comes into play.

To solve the problem, **we have to make voting expensive**. We have to make it such that anyone trying to vote has the same amount of voting power as anyone else, regardless of how many different identities they may have.

Therefore, each vote must be cast with resources — scarce, valuable, tangible assets. Let’s take the example of Bitcoin (since it utilises the POW consensus) to understand this better.

In his whitepaper, Satoshi Nakamoto (the creator(s) of Bitcoin) envisioned a “1-CPU-1-vote” network, rather than the traditional “1-identity-1-vote” system, in order to prevent Sybil Attacks from pervading the Bitcoin network.

To do so, Satoshi identified _computing power_ as the scarce, valuable and tangible resource that users had to provide, in exchange for a vote.

Whenever someone wants to make a proposal to the rest of the Bitcoin network, they first have to solve a computationally difficult problem. This problem is uniquely generated based on the information within the proposed block, and thus its solution cannot be predicted beforehand.

Instead, it’s similar to brute forcing a password: all you can do is trial and error. Your computer will try a bunch of inputs until it finds a solution to the problem, at which point it will submit the successful input along with the proposed block to the rest of the network.

These people who lend their computational power to the network (and so doing, help verify transactions on the network) are called miners.

The unpredictability of the form of correct inputs ensures that there’s no way for miners to game the system, keeping any of them from cheating. By having every user solve this uncheatable brute force problem, you have a reasonable expectation that they’ve done _a lot of_ (computational) work to solve it.

In tethering voting power to such immense computing power, Satoshi ensured that all users will have _scarce voting power_.

It is this method of voting and generating consensus that made Bitcoin the first successful cryptocurrency. It also inspired the voting mechanisms (even alternatives to POW) for practically every other cryptocurrency that followed.

#### **_Proof-of-Stake (POS)_**

Although the POW system is one that is utilised by many projects, including — as aforementioned — the most popular cryptocurrency, Bitcoin, it still has many drawbacks.

For example, in order to solve the computationally difficult problem required of all miners before they can add a block to the network, a massive amount of energy will need to be consumed. This has dire repercussions for the environment, and also renders it such that only those who can afford powerful and expensive computers can be miners (not in line with the whole _decentralized_ rhetoric!).

To solve some of these issues, Proof-of-Stake was introduced.

Proof-of-Stake is a consensus mechanism where voting power is directly proportional to economic stake locked up in the network, instead of computational power and resources. Each participant stakes a certain amount of native currency (by locking it up in the network), and each node is given a probability of being chosen as the next validator, weighted by how much was at stake/locked up. Once a validator is chosen, they can propose a valid block and receive a reward.

With this scheme, **how much power a participant has in the network is limited by the amount they are willing to stake**. Rather than relying on rewards for security (like what the POW system does), Proof-of-Stake relies on _penalties_. If a participant places stake on a dishonest block, they are penalized and lose however much they put at stake. In this, acting maliciously is penalized much more heavily than the gain from acting honestly.

Users on the network are now more disincentivized to act maliciously due to the explicit consequences of doing so. This security comes from locking up capital (the stake prerequisite) for long periods of time.

Let’s apply this to a real-life scenario.

Picture a group of treasure hunters vying for a chest. The chest is rewarded based on a lottery system. To participate, each hunter has to buy lottery tickets from the chest itself.

This act of the hunters buying lottery tickets from the chest represents the staking/locking of the validators’ currency into the network. The more each hunter buys, the higher the chance of winning. Correspondingly — the more native currency a participant in the network stakes, the higher chance he/she will get to validate a new block coming in, and in so doing — get a reward.

In sum, Proof-of-Stake is a particular type of consensus mechanism that assumes all voting power is tied to financial resources.

Fundamentally, the idea is: the more tokens or currency an actor holds within a Proof-of-Stake system, the stronger the incentive for them to be good stewards of said system; if the system grows the wealthier the actor becomes.

Thus in Proof-of-Stake, we give these individuals the most power as validators, because we trust that they will not want any harm to befall the network.

Prev: [A Beginner’s Guide to Understanding the Blockchain (Part 1: How Does a Blockchain Work?)](https://derekklim.medium.com/a-beginners-guide-to-investing-in-crypto-74781455645)

Next: [A Beginner’s Guide to Understanding the Blockchain (Part 3: Smart Contracts)](https://derekklim.medium.com/a-beginners-guide-to-understanding-the-blockchain-part-3-smart-contracts-39166dbe7577)

> Join [Coinmonks Telegram Channel](https://t.me/coincodecap) and learn about crypto trading and investing

#### Also, Read

- [YouHodler vs CoinLoan vs Hodlnaut](https://medium.com/coinmonks/youhodler-vs-coinloan-vs-hodlnaut-b1050acde55a) | [Cryptohopper vs HaasBot](https://blog.coincodecap.com/cryptohopper-vs-haasbot)
- [Binance vs Kraken](https://blog.coincodecap.com/binance-vs-kraken) | [Dollar-Cost Averaging Trading Bot](https://blog.coincodecap.com/pionex-dca-bot)
- [How to buy Bitcoin in India?](https://medium.com/coinmonks/buy-bitcoin-in-india-feb50ddfef94) | [WazirX Review](https://medium.com/coinmonks/wazirx-review-5c811b074f5b) | [BitMEX Review](https://blog.coincodecap.com/bitmex-review)
- [Bitcoin Taproot](https://blog.coincodecap.com/bitcoin-taproot) | [Bitso Review](https://blog.coincodecap.com/bitso-review) | [Top 6 Bitcoin Credit Card](https://medium.com/coinmonks/bitcoin-credit-card-bc8ab6f377c6)
- [Gemini vs Coinbase](https://blog.coincodecap.com/gemini-vs-coinbase) | [Coinbase vs Kraken](https://blog.coincodecap.com/kraken-vs-coinbase) | [CoinJar vs CoinSpot](https://blog.coincodecap.com/coinspot-vs-coinjar)
- [Bitcoin exchange in India](https://medium.com/coinmonks/bitcoin-exchange-in-india-7f1fe79715c9) | [Bitcoin Savings Account](https://medium.com/coinmonks/bitcoin-savings-account-e65b13f92451) | [Paxful Review](https://medium.com/coinmonks/paxful-review-4daf2354ab70)
- [Leveraged Token](https://medium.com/coinmonks/leveraged-token-3f5257808b22) | [Best Crypto Exchange](https://medium.com/coinmonks/crypto-exchange-dd2f9d6f3769) | [Crypto Trading Bot](https://blog.coincodecap.com/best-crypto-trading-bots)

* * *