Today, we’ll delve deeper into the process of mining.
In this article, we’ll introduce briefly the concepts of Proof of Work (PoW) and Proof of Stake (PoS). We’ll talk about why Ethereum, the second largest blockchain, is planning to switch from the former to the latter and share some forecasts as to the outcomes this decision might lead to.
Let’s get to it.
Byzantine Generals’ Problem
Among his many breakthrough accomplishments, Satoshi, the mysterious founder of Bitcoin, is praised for coming up with a solution to what’s known as Byzantine Generals’ Problem.
The issue is basically this.
Suppose there’s a war. There’s an army that has a city encircled, but due to exhaustion of resources, the army’s generals are undecided whether it’s smarter to attack or to retreat. Suppose, also, that it’s the 15th century and the commanders, who are all in camps far apart, have no way of communicating effectively save for sending messengers.
How could these generals (let’s say there are 20 of them) reach a consensus?
Obviously, they’ll have to vote. If the majority (at least 51%) decides to move forward with a strategy (of attacking, or of retreating), the whole army will have to get behind their choice. That’s only fair and logical.
But then they’ll face another problem: how to ensure that no general involved in making a decision votes the wrong way on purpose, just to confuse things?
Well, in the world of blockchains, the generals are miners. And choosing a war strategy for them is agreeing on a set of rules, a certain view of the history of digital events that are posted on the network.
The way that Bitcoin enables reaching a distributed consensus and punishes, or rather discourages, bad actors for acting dishonestly is by using the Proof of Work (PoW) algorithm.
What is Proof of Work (PoW)?
Initially, PoW was proposed as means to protect network connections and systems from the denial of service (DoS) attacks. One of its first implementations was hashcash – the technology that is still being used to secure the mining process on Bitcoin and was engineered by Adam Back, one of Bitcoin co-developers.
Essentially, PoW is just a piece data that’s both hard to produce, computing wise, and easy to verify on the receiving end.
The PoW principle was first used to deter spam emails. A person had to solve a puzzle of some kind, i.e put effort, before sending an email, and then they had to attach a solution they’d come up with to the letter’s header so that the recipient could recognize it.
The main gist of the idea was making it difficult and time-consuming for a spammer to send bulk, trashy ads. All the emails without a proof of work were easily identifiable as spam, and, therefore, recipients never opened them.
On Bitcoin, Proof of Work is a miner’s responsibility. Whenever a new block with transactions appears on the network, validators start to compete in solving a mathematical problem (generating Proof of Work) attached to it. The winner, a miner who manages to figure out the cryptographic nonce first, gets to write to the blockchain’s history and is then rewarded by the network with a certain amount of crypto coins.
The blockchain adjusts the difficulty of these mathematical problems so that it takes a miner roughly 10 minutes to find a solution. Hence, we get the universal 10 minute block time on the Bitcoin blockchain.
What are the drawbacks of using Proof of Work?
The fairly high level of security provided by PoW comes with a cost. Some, including Ethereum’s founder Vitalik Buterin, consider the algorithm to be too wasteful and costly.
Here are some of the most typical concerns people have about Proof of Work:
- Millions of hashes that are generated by miners around the world do not really solve anything. The immense work and resources put into securing blockchains are not, in any way, useful to society. And after a computational problem is solved, miners proceed to solve the next one, throwing their previous efforts on the floor. From the environmental standpoint, server farms with powerful mining equipment that utilize vast amounts of electricity to do basically nothing, are not beneficial to our world.
- The process of resolving computational problems is complex and competitive and those with the most advanced mining hardware have an edge over those who don’t. This creates an arms race among miners, and makes the validators’ community more exclusive (there’s isn’t a whole lot of people willing to buy up equipment and manage substantial amounts of computing power). And exclusivity goes against the idea of decentralization – the key principle behind the blockchain technology.
- This leads to the most talked about PoW related concern that is the possibility of a 51% attack. While a mining pool that has a centralized control over the network can still play it fair, nothing would stop it from attacking a blockchain, invalidating legitimate transactions and double spending crypto coins.
To avoid facing these potential issues ever, the creators of Ethereum – the second largest blockchain in the world – are planning to switch from PoW to Proof of Stake (PoS).
What is Proof of Stake?
Proof of Stake takes labor work out of the mining process. Instead of time and electricity – the external resources validators are used to putting into generating PoW – the algorithm enables miners with most coins (internal resources) to write to a blockchain’s history. The underlying principle behind PoS is that the more invested a validator is in the network (the bigger stake they possess), the less likely they are to attack it, and, therefore, the more validating rights they should be given.
The only cryptographic calculations involved in PoS are those establishing if a miner owns a needed amount of cryptocurrency. On Ethereum, according to its developers, a person who has 5% of all ether will be able to mine 5% of all the transactions happening on the blockchain.
The system will decide whose turn it is to commit a block pseudo-randomly, weighing the selection toward miners with the most coins. And it will allow more people to participate in the validating process: there would no longer be a need to purchase expensive hardware to mine.
What benefits can PoS bring to Ethereum?
- The issue of unnecessary energy wasting will be forgotten about, as no mining, in its traditional form, will take place.
- No competition in solving computational puzzles will mean no demand for advanced mining hardware. Hence, more people will be encouraged to participate in the validation process.
- Despite reducing energy costs, by a lot, PoS will make attacks on the blockchain even more expensive. If anyone decides to buy up 51% of ether to try to alter transaction blocks, they’ll have to pay millions of dollars to get the coins (due to limited supply and increased demand ether price will be increased drastically) and then risk losing their money by destabilizing the very blockchain they’ve put their funds in. It’s hard to imagine a sane person doing that.
Besides assuming that a miner won’t risk their money to hack the blockchain, PoS offers a scenario of how malicious activities can be diffused, if they do occur. If a chain takeover happens, Ethereum community can simply hard fork the network and destroy the deposits of the attacking miners’, no matter how much coins, i.e. mining power, they might possess.
It would take some healing, a few days probably before the blockchain gets on tracks again. But, in the long run, no one except the offenders will suffer substantial losses. Conversely, the honest validators will end up richer as the crunch in supply of ether caused by the fork, will make the coins’ cost rise even more.
Want to learn more about Ethereum, Bitcoin and the Blockchain technology in general? Contact our expert for a free consultation.