Introduction to the Proof of Work consensus algorithm
The topic we are about to explore is one of the main ones in our industry: the Proof of Work blockchain algorithm.
In the blockchain and crypto world, certain concepts are repeated again and again in videos, articles, and podcasts.
Newcomers especially can get confused: many of these topics are quite difficult to understand in the beginning. Among them, we find everything related to consent and approval of new transactions. Proof-of-Work is precisely part of this group.
Actually, if illustrated by avoiding too many technicalities, consensus algorithms are not that complex to assimilate. In the following in-depth study we will do exactly that: we will learn about Proof of Work in simplicity but without leaving anything out in the cold.
The mechanism we are about to talk about is the father of all others, as well as employed by the queen of cryptocurrencies: bitcoin. Understanding what it is and how it works is therefore a must-have for all crypto-investors.
Index
What is a consensus algorithm?
Before we delve into the details of Proof of Work, we need to understand what a consensus algorithm is and what its functions are.
As we know, blockchain is a particular database that is characterized by being decentralized. This technology is the basis for cryptocurrencies, smart contracts, DeFi and further industrial, corporate and institutional applications. In order to understand some of the steps that follow, we should have a good understanding of what a blockchain is.
In an environment without central authority, it becomes critical to ensure that the information in the database is correct. The consensus algorithm has this task: to coordinate the parties involved in the network and ensure that everyone agrees on a particular event. This last observation must apply even when someone thinks otherwise.
Let us try to understand it better.
In a decentralized environment, the people do not know each other (nor will they ever likely). Therefore, the scenario hosts parties that do not trust each other.
The database is distributed to all participants and not kept in one place. Therefore, everyone must own a copy of it, obviously identical to all others. If this were not the case, the blockchain could not exist: discordant information should have no place.
Therefore, the system is interesting but full of difficulties to overcome.
The consensus algorithm is what maintains the balance and ensures the smooth operation of the network.
The mechanism works like this:
- Each transaction does not happen immediately but needs validation.
- Anyone who wants to add a new block to the chain, authenticating the transactions in it, must put something into play. This can be an amount in cryptocurrency, spending in computational energy or something else. By doing so, one has an interest in proposing only valid blocks, free of manipulation and false information. Otherwise, what has been put on the line (stake) would be lost. In short, the advantages of malicious action would be less than the disadvantages.
- By proposing a new block, one gets a reward. This is why there is an interest in “betting” with the stake: there is a payoff to be achieved and pocketed.
The consensus algorithm is this: a system that incentivizes proposing only correct blocks through rewards. Conversely, those who would submit incorrect information would suffer the consequences, collecting economic and/or reputational damage.
We repeat that each block contains a set of transactions that occurred on the blockchain. In fact, the mechanism ensures that no one spends a certain amount more than once, or otherwise attempts to manipulate their own and others’ balances.
Thanks to the consensus algorithm, the database that is distributed is always correct. The ability to withstand malicious and erroneous actions is extremely high: for example, to pass a manipulated block on Bitcoin we would have to possess so much computational power that we would have to spend a huge amount of money on electricity (as well as on facilities).
Here we have explained in a few lines how it is possible to distribute a database to a potentially infinite number of people, avoiding centralization and still ensuring the accuracy of the data it contains.
What is Proof of Work?
Also known by the PoW acronym (PoW stands for Proof-of-Work), Proof-of-Work is the blockchain algorithm that involves what is called mining. As we said earlier, its job is to ensure the correctness of each transaction on the blockchains that employ it.
The most famous blockchain Proof of Work ever to rely on this algorithm is Bitcoin, the undisputed leader in the crypto industry.
So let’s find out how this important mechanism works.
The Proof of Work algorithm was first introduced by Satoshi Nakamoto in his 2008 Bitcoin Whitepaper.
The concept behind it is simple: you want to validate a blockchain? Well, then you need to prove your commitment to doing so, so that the whole network can be protected from malicious and unfair actions. From this somewhat earthy example comes the term Proof of Work.
Any node wishing to participate in the validation process must roll up its sleeves.
P OW asks miners to solve a complex probabilistic calculation; the first to succeed is the one who validates the new block (and gets the reward). To solve the calculation, successful miners use special computers called ASICs. These machines just continuously try combinations of numbers and letters (SHA-256 encryption) until the one below a certain limit is found, solving the proposed problem.
This mechanism is precisely to prevent tampering with the network: validation involves large expenditures in machinery and electricity, it would not be convenient to act maliciously, we would only lose money. The more computing power available, the better the chances of “winning the battle” against all other miners.
Upon validation of the block, the winner receives a certain amount of bitcoin as a reward, and the solution is distributed to the other nodes. This is where the system comes full circle and makes sense: the economic incentive drives participation.
Issuing a new block creates new BTC, an action known by the term mining because new specimens of the coin are actually mined.
Today, 91 percent of this cryptocurrency is already in circulation. Every four years, the phenomenon called halving halves the issuance. The last bitcoins will be mined in 2140.
So let’s recap the basic points of the Proof of Work algorithm:
- It requires as a stake computational power and, consequently, also some energy expenditure. Those who incur this expense have every interest in getting it right;
- Because of its construction, it ensures that no wrong transaction can get away with it;
- Upon validation of the blockchain, new bitcoins (or other PoW blockchains’ cryptos) are issued;
- Proof of Work is the most secure but also the least efficient consensus algorithm.
What are Proof of Work cryptocurrencies?
In addition to BTC, other coins use this mechanism, including Litecoin, Dogecoin, and Monero.
Until September 2022, the Ethereum blockchain was also based on this algorithm. After that, a switch to the Proof-of-Stake mechanism was sanctioned. A choice that has several reasons, including superior performance, a key aspect for this network.
Bitcoin, on the other hand, remains faithful to PoW: a bit slow and cumbersome, but with extreme security. Then, for higher performance, one can always rely on Lightning Network.
Mining, Bitcoin, energy and the environment
Proof of Work is often the victim of attacks by institutions, States and even ordinary people.
The reason lies precisely in its operation because the problems to be solved are complex and require computing power. In turn, it requires a lot of electrical power. This observation has given rise to currents that call Bitcoin (and PoW in general) polluting and having an excessive environmental impact. Is this true or is it being exaggerated?
Let us start with two considerations.
The first is that yes, indeed Proof of Work is a rather vampire algorithm in terms of energy. At the same time, however, we need to look at where this power comes from and how it is produced. If you burn thousands of tons of coal, gas or oil, you pollute; if you use renewable sources, you don’t have the problem.
Moving on to the second, anything has an impact. Air transport? It pollutes. Industry? Pollutes. The traditional banking system? It too pollutes.
The crucial issue is this: is the energy required (and the pollution produced) worth the candle? Is what this expenditure requires useful and beneficial? Or is it useless?
Air traffic is undoubtedly useful, as are industry and banking.
So are cryptocurrencies a waste or do they bring something positive? Focusing on the main ones, for us the answer is obvious: they are value-donating assets that could revolutionize the way we pay, receive money and do business. We probably shouldn’t even use the conditional.
In addition, blockchain and crypto would be able to save us so many costly actions, trivially: decreased transactions on standard circuits, less use of paper, reduced travel required to simply put a signature on a contract.
This does not take away from the fact that energy and environmental impact should be reduced as much as possible. However, many do not know, this is already being carried out. For example, since China banned crypto, mining has moved to countries that produce cleaner electricity, such as the United States.
Data from the Bitcoin Mining Council does not lie: Bitcoin is far more virtuous than the major States, watching is believing.
In some cases, however, mining contributes to energy supply challenges.
Even in these contexts, however, not everything should be blamed on cryptocurrencies: as this other chart from the Bitcoin Mining Council shows, it is often obsolescence and backlogs of lines and facilities that create power outages and shortages.
In short, Proof of Work provides maximum security but is not efficient, of which we are aware. In addition to consumption, blockchains that employ it are not scalable at all.
At the same time, however, it is incorrect to pass this consensus algorithm off as the culprit for all the planet’s energy and environmental problems: you are way off the mark.
Today, many blockchains leverage better performing algorithms, such as Proof-of-Stake. The main problem is related to security standards, which are lower than PoW but still quite robust.
Over time, we may see the migration of several networks to more scalable, rapid and cost-effective solutions. If well designed, these actions would certainly be positive.
We hope, however, that this will not happen because of unwarranted pressure: it should be a natural, shared and properly planned process.
"Often demonized, the Proof of Work consensus algorithm is not the evil of the whole world"
Proof of Work, the algorithm par excellence
There is very little to add: Proof of Work is the consensus algorithm par excellence.
Although it has weaknesses, many years after its conception it still remains the safest solution of all.
At the same time, this algorithm is also quite simple when compared to others.
Bitcoin is the iconic PoW network, and let’s face it, who doesn’t dream of mining coins like there’s no tomorrow?
Despite a few attacks from several quarters, Proof of Work is steadily with us. We look forward to having his company for many more years to come.