Consensus algorithms: PoW & PoS

By jadams2k18 | jadam2k18 | 23 Jun 2019


Introduction

pT5aJ3B.png

PoW and PoS are not the acronyms used in Batman and Robin comic books to represent blows and punches. I can assure you that it was the first impression I had when I first saw them.

I'm sure many of you are familiar with these terms. However, they were not entirely clear to me until I decided to study them further. These words contain a very important concept within the world of blockchain and cryptocurrencies. That's why I decided to talk about them.

I think it is important to let the readers know the content of the post at the beginning so that they know not only the size of the post but also everything it covers, and obviously, don't bother reading and reading wondering when the post will end (Sometimes it happens to me, it's sad when it happens). This post will contain:

  1. Consensus algorithms
  2. Consensus mechanism Proof of Work (PoW)
  3. Consensus mechanism Proof of Stake (PoS)
  4. Differences between PoW and PoS
  5. Final Considerations

All right, let's get started then…

Consensus algorithms

pT5aJ3B.png

As is well known, blockchain is a technology that allows information to be stored in a secure, transparent and indelible way. And its main characteristic is that it is copied in thousands of nodes of the network of networks. This makes it appear "impossible" to be destroyed since it is not stored in a single place.

Technically speaking, the blockchain is a set of blocks of information (usually made up of data and transactions) joined to each other, forming a chain. And as we all know, it is the infrastructure of the cryptocurrencies.

 

qOFO42M.jpg
Source

 

So, what does the consensus algorithms have to do with all this? Well, as its name indicates, the consensus algorithm is a set of rules for a group of participants (the nodes) to reach a common agreement when performing a task (generating blocks). Obviously when we refer to the blockchain, then it is a set of rules and mathematical calculations that take care of 3 things: validation of authenticity, payment for the generation of a block and the frequency of block generation.

So, in short, the consensus algorithms are the methods to generate the blocks of the blockchain and to pay for them to those who generate them. And this payment is made with the cryptocurrencies corresponding to a given blockchain.

And this is where I want to get, both PoW and PoS are consensus algorithms, that is, is the method used to generate the famous blocks that make up the chain. So far so good.

Of course, as usual, there will always be some people that will say (accusatively): These are not the only existing consensus algorithms!. Obviously not. There are many more, which you (my dear reader) can see in the following image:

K2qKjzp.png
Source

 

Let's see why I only chose these two ...

Proof-of-Work consensus mechanism (PoW)

pT5aJ3B.png

uCBX9aq.jpg
Image by Ryan McGuire at Pixabay

The mechanism or algorithm PoW or Proof-of-Work was the first algorithm launched by the famous Satoshi Nakamoto, master, lord, and creator of Bitcoin (By the way, nobody knows if it is a woman, man, extraterrestrial, Santa Claus?)

There are other blockchains that use PoW consensus mechanism, such as Litecoin and the very famous of all, the Ethereum blockchain. Maybe you are wondering: why Ethereum? I also thought that Ethereum didn't use PoW. Well, according to what I have researched is that the creator wants to change it to the PoS consensus method, but let's not get ahead of ourselves yet.

The PoW mechanism, as its name indicates, is done in the form of hard work, in the form of mathematical calculations, exerting each time an even greater effort than the previous one (like the effort that the poor man in the photo makes to be able to open the jar of pickles).

For this, the equipment or CPU of the nodes (or the miners, as they are called) that make up the blockchain must have a computing power powerful enough to generate the blocks. And constantly, they must increase their computing power. This results in more energy consumption. So much so that they even say they can consume as much energy as a small country could.

But the problem is that to receive a reward in this type of consensus mechanism, you must have a computing power powerful enough to compete with other miners since the one who will receive the reward will be the first to solve the mathematical problem, and therefore the one that can generate the block of information.

And to ensure the safety of the blocks, the complexity of the mathematical problem is constantly increasing. Do you see the vicious circle that is created? More computing power, more power consumption. Sometimes I wonder if the boom of crypto-mining in my country has contributed to the electrical problem that we have had since a few years ago (but I better not get into the subject because it would fall into political issues, God save me!).

For this reason, there are countries that prohibit this type of technology. Without taking into account the damage they do to the environment. But well, it's all about winning 1 BTC! Isn't that right?

The advantage of this mechanism is that it is difficult to attack it, as it would require a high power to create false blocks within it. In addition, each block contains encrypted (cipher) information of the block created previously, which chains the latter.

Generally, miners take about 10 minutes to create a block. This makes it difficult for the blockchain to scale or adapt to growth, i.e. their ability to work smoothly with increased transaction traffic.

It is said that Bitcoin can only perform 7 TPS (transactions per second) and Ethereum 15 (up to 20) TPS (Unbelievable, isn't it?).

That is why it is necessary to look for another consensus method that allows better use of resources and allows more transactions per second, maintaining the same security offered by PoW.

Let's continue then with PoS

Proof of Stake Consensus Mechanism (PoS)

pT5aJ3B.png

5RiHFgF.jpg
Image by OpenClipart-Vectors at Pixabay

The PoS mechanism or Proof-of-Stake, unlike PoW, the blocks are generated by those miners (these are actually called forgers and validators, I read about it somewhere) who have more cryptocurrencies, ie no longer need super powerful computing equipment and high energy consumers, the selection and validation of the blocks depend on the amount of cryptocurrencies that have the participants. It looks like an elitist approach, doesn't it?

In this process, the miners are chosen at random. However, in order to participate in the selection, they will have to deposit an amount of coins. Then a voting system will select the validator of the block. Blocks are created according to the number of coins in the forger's wallet. That is, if you have 15% of all coins, then you will be able to forge 15% of the new blocks.

Unlike PoW, where miners receive rewards for each mined block, forgers will only receive one fee for the transaction.

lI4N81G.jpg
Photo by Pixabay from Pexels

The creator of Ethereum, Vitalik Buterin (Yes! Looks like the name of a medicine with butter flavor) is planning, what is called in the crypto-sphere world, a hard fork to change the consensus mechanism of PoW for mechanism PoS. This Ethereum PoS protocol will be called Casper (Yes! Like the friendly ghost).

Casper will implement a series of measures to avoid malevolent forgers or validators, in which the punishment will usually be the removal of their entire balance of cryptocurrencies.



SJFpCxj.jpg
Image by jumpinjake at Pixabay

Another concept that appears as a result of this consensus mechanism is Masternode. Yes, it always brings to my mind that big granny's purse that besides being a mystery, contained everything to survive a nuclear apocalypse.

This technology, like PoS, has a participation of coins, that is, a wallet is created with a fixed amount of coins, which will be used to reject or validate blocks and transactions. Unlike PoS, Masternodes not always create blocks. A well-known system that uses this technology is Dash.

This is a small glance of the concept since it would take more than one post to explain the whole concept that embraces the Masternodetechnology. However, it is a technology that is very fashionable today and that is giving good dividends and future profitability.

Differences between PoW and PoS

pT5aJ3B.png

  • Obviously, the high energy consumption and the excess of calculation that has PoW, is the main feature and at the same time main the difference with respect to the PoS mechanism.

  • Even though PoW is more secure and has its resource drawbacks, the problem is that it does not have scalability, i.e., it is a slower mechanism and is more expensive than PoS.

  • Another big difference between both mechanisms is that PoW creates crypto coins with each block that originates unlike PoS, who from the beginning already have a fixed amount of coins to work with, no crypto coins are created, and the chosen forgers only receive a fee for each transaction they make.

Final considerations

pT5aJ3B.png

A problem that both protocols, perhaps more in one than in the other, is the centralization of nodes. The control of the blockchain would have it the manufacturers of miners, generally, this happens where the electricity is cheaper. There would be more miners in these places than in others. But that is in the case of the PoW consensus mechanism, however, the PoS could also suffer from this peculiarity as the power will be held by those who handle most of the money within this scheme. This would ruin the decentralized concept of the blockchain.

Perhaps I have overlooked the problem of the 51% attack on the PoW mechanism, where mining power could be controlled by one person or institution that handles 51% of the miners in the entire network. But this would be too expensive, so it would not be profitable for the attacker.

From my point of view, the concept of algorithms or consensus mechanisms has already become clear. Both PoW and PoS are responsible for creating the magic of blockchain and cryptocurrencies.

It is important to note that the developers of blockchain technologies are constantly working on improved consensus mechanisms, hybrids and correcting the flaws I presented in this post. Increasingly optimized, which will allow not only the scalability of the blockchain but also accelerate transactions per second. It will all attract the attention of large investors, which will facilitate the adoption of this technology as the world's most profitable financial method.

References

pT5aJ3B.png

https://101blockchains.com/consensus-algorithms-blockchain/

https://www.liteforex.es/blog/for-professionals/que-es-algoritmo-de-consenso-pow-y-pos/

https://101blockchains.com/es/algoritmos-de-consenso-blockchain/

https://blockgeeks.com/guides/proof-of-work-vs-proof-of-stake/

https://hackernoon.com/consensus-mechanisms-explained-pow-vs-pos-89951c66ae10

https://blockgeeks.com/guides/ethereum-casper/

https://hackernoon.com/how-pow-pos-and-masternodes-work-together-for-your-privacy-7dffd4aa351f

 

JromQXz.png

 

Keep spreading the Blockchain and crypto love

 G4rHB7r.png

 

Thanks for passing by!

How do you rate this article?

0


jadams2k18
jadams2k18

I'm a system engineer. I like to program and write about crypto and sci-fi stories.


jadam2k18
jadam2k18

I suppose cryptos have come to be part of our economy and means of sustenance. Especially for me. This is a new style of living. So, I create this blog to continue improving my writing skills and earning during my journey

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.