The user base for blockchain networks like Bitcoin and Ethereum has evolved in tandem with blockchain technology and applications over the last few years. This is fantastic news for adoption, and supporters of blockchain are able to point out that blockchain appears to have reached a tipping point in terms of public awareness and business usage. Blockchain is being incorporated into the business models of companies all over the world and in a variety of industries.
With the rise of blockchain adoption has come a surge in interest in providing the computing power behind the technology. It's become a tired cliche to read news stories and blog posts about how Bitcoin mining uses more resources than a lot of small countries. Since the prize for creating new blocks is so big, the competition is fierce. Every 10 minutes, thousands of dollars worth of Bitcoin are up for grabs as new blocks are mined.
All of this expansion poses a scalability and cost problem. The more transactions and nodes you connect to a network, the more difficult it becomes to fit all of them into a block and achieve global consensus. Since a blockchain has no controlling authority or central entity, the ledger is only updated when the entire network agrees.
Many people are beginning to doubt the basis of proof of work consensus as set out by Satoshi Nakamoto in the Bitcoin white paper in the face of this growth and transition. It not only consumes a lot of energy, but it also concentrates mining resources and incentives in the hands of institutions willing to spend millions of dollars on mining equipment and electricity. The hardware and electricity-based consensus model of proof of work is being challenged by proof of stake consensus. We'll look at both consensus mechanisms in this article, as well as their benefits and disadvantages.
Consensus
Record keeping is normally the responsibility of a third party in a traditional data management system. There is a single source of truth in the form of a central database of knowledge. In the case of financial transactions, this means that a bank maintains a transaction ledger and has the final say on your balance. You must trust gmail's servers, your insurance company's records, or your country's elections committee for other information exchanges.
Of course, centralized systems with a single source of reality often have a single point of failure. When a company's databases are compromised, we've seen countless businesses lose customer details. Bad actors may also infiltrate and alter data or influence outcomes in other situations.
Through making a copy of the data available to all on the network, blockchains resolve this flaw. Anyone on the network can see and check the public ledger's accuracy. Since it's a shared ledger, though, any changes to the record must be approved by everyone on the network. Consensus processes come into play here.
A good consensus algorithm ensures that the blockchain is in an agreed-upon state among the network's nodes. It normally does so by rewarding one node or a group of nodes for compiling a new block that is accurate and valid. The network will then decide whether or not to accept the new block, reward the maker, and move on to the next block.
Proof-of-Work
The first and most common consensus algorithm for blockchain applications is proof of work. Proof of work was created by Satoshi Nakamoto as a series of cryptographic puzzles that a computer must solve in order to construct a new block. Cryptographic hash functions are puzzles that can only be solved by guessing and checking, sometimes for computers. Before they can find a correct answer, the machines attempting to solve the puzzle must search trillions of incorrect answers. Even when thousands of computers are working on the same issue, it takes an average of ten minutes for one computer to come up with a correct answer.
The machine that discovers the solution is rewarded, but the thousands of other computers that worked on the issue were wasting their time and resources. This is the energy that is being wasted, as reported in the press. The entire network starts working on compiling a new block and solving a new puzzle as soon as a computer finds a correct answer and the network accepts it.
Of course, having the best or most computers (or both) increases the chances of getting the right answer and winning the prize. As a result, massive warehouses with hundreds of specially built computers known as ASICs mining Bitcoin at the same time have sprung up all over the world. Many of the mining incentives go to these large corporations, which means money continues to be concentrated. Over time, this may imply that Bitcoin is “run” by a centralized entity, jeopardizing the network's original vision and security.
Any other blockchain platform that uses proof of work faces the same problem. Although many of these platforms employ updated algorithms to reduce the effectiveness of specialized ASIC computers, they still face energy waste and other centralization issues.
Proof-of-Stake
Aside from wasting resources, the problem with proof of work is that there is no method for punishing bad actors. If anyone attempts to build a fake block or chain of blocks, the network will almost certainly reject it, but there is no way for the network to punish the bad actor and dissuade them from attempting again. We can't fry the costly equipment or increase their energy bill.
Proof of stake transfers the reward and punishment scheme completely within the blockchain to save resources and create a disincentive for bad behavior. Evidence of stake participants invest in the token itself rather than in costly hardware and energy. They set aside a certain amount of wealth as collateral, and the network selects someone to create the next block at random based on the amount of collateral they wager.
If a block builder builds a fair and legitimate block, they will be rewarded with a reward that will be vested over a period of time long enough for the network to validate the transactions inside the block. However, if the block builder is deceptive, they will forfeit their collateral, which will prevent them from participating in potential PoS rounds.
The Pros and Cons
Since it eliminates high-powered computation from the consensus algorithm, proof of stake is more energy efficient. As a result, it is more environmentally friendly. Proof of stake, on the other hand, is a more complex and difficult to secure device. Adding penalty and collateral to the algorithm introduces additional variables, all of which must be checked and could pose a security risk if the algorithm is not written correctly. For example, how much collateral should stakers be needed to put up? Should they immediately lose all of their collateral if they build an illegitimate block? What should the incentive for making a correct block be? To balance protection and platform durability with timely incentives, how long should the incentive be vested before stakers can withdraw it?
The answers to all of these questions have an effect on a proof of stake system's centralization and security. Higher collateral conditions, harsh penalties for defective blocks, and lengthy vesting periods all serve as stronger deterrents to bad conduct. They do, however, make it more difficult for the average investor to participate, restrict liquidity, and tend toward centralization, where only whales can afford to stake and vested large sums of money for longer periods of time.
There's also something to be said about the external locus of collateral for evidence of work. Proof of work miners purchase electricity in fiat currency and invest in mining machinery. Some argue that directing wealth outside the system undermines cryptocurrency's task. Using real-world value as an anchor, on the other hand, makes your cryptocurrency more safe. Despite the fact that proof of work systems have been around for a decade, they have yet to be successfully targeted.
Hybrid Consensus
Many people are already advocating for a hybrid consensus. Proof of work does not have to be the driving force behind any round of consensus to reap the benefits. One popular proposal is to use proof of work to secure one out of every ten blocks, whereas proof of stake is used for the other nine. Proof of stake combines the tried and true security advantages of proof of work with the energy and penalty restrictions of proof of work. It also means that blocks will be checked by two different groups of users (miners and stakers), making it more difficult to organize an attack.
Of course, such a move will significantly reduce the income currently enjoyed by miners. When you know that any transition to a blockchain network necessitates miners updating their software versions, the move becomes even more complicated. If a majority of miners decide that switching to proof of stake is not in their best interests, the move will not be implemented, and a hard fork of the blockchain will be required.
As you can see, the battle between proof of work and proof of stake is entwined with tradition, politics, and economics. Proof of stake is more energy efficient and gives bad actors more opportunities for punishment. That isn't to say it won't lose to a group of miners who have a lot invested in proof of work.