What is proof of work?
We are currently in the midst of a financial revolution. Enthusiasts can’t stop talking about it, banks are scrambling to get ahold of it and even your parents are thinking about investing in it.
Love it or hate it, Bitcoin is here to stay.
It has taken the world by storm and shows no sign of slowing. It’s a phenomenon that has changed the way people think about money.
Bitcoin started as an underground cypherpunk movement but has grown into something no one could have ever imagined, and the revolution is just beginning.
Though most conversations focus on investing in bitcoin, the real genius of this modern digital cash is the technology behind it. Blockchain. The buzzword of 2017. The tech that is set to completely transform entire industries.
So what makes the blockchain tick? And why is it so special?
Bitcoin’s blockchain, like several others, operates on a protocol called "proof of work" or PoW. It’s the system that protects Bitcoin’s health and integrity. Thanks to the PoW protocol, Bitcoin is truly immutable, meaning it is impossible to hack, modify or cheat in any way. Not only does the PoW system protect Bitcoin’s core functionality, it also gives it value.
But before we get ahead of ourselves, let’s see how it all began.
Long before bitcoin, gold and silver coins were used as a system of payment. These coins fit the basic characteristics of money. They acted as a medium of exchange, a store of value and a unit of account. They were also portable, durable, scarce and accepted as having value. But why did they have value?
The coins had value because they represented the efforts of a miner, refiner, smelter and forger. The work that went into producing these coins allowed them to be traded for real items, such as food.
This could be considered physical proof of work. The coins functioned well as money because they met these criteria. And they were proven by the efforts of others’ hard work.
The same can be said about modern cryptocurrencies. In the case of bitcoin, it also acts as a medium of exchange, store of value and unit of account – bitcoins are also backed by proof of work, only with a different kind of mining.
To mine bitcoin, users leverage computational power and electricity to have a chance at winning part of the ‘block reward.’ Currently, this reward sits at 12.5 bitcoins per block, with approximately 10 minutes between each block.
Satoshi Nakamoto explained in a Bitcointalk post: "Proof of work has the nice property that it can be relayed through untrusted middlemen. We don't have to worry about a chain of custody of communication. It doesn't matter who tells you a longest chain, the proof of work speaks for itself."
The idea of this digital proof of work didn’t begin with Bitcoin, however. In fact, it was first written about over 25 years ago by computer scientists Cynthia Dwork and Moni Naor in their paper "Pricing via Processing or Combatting Junk Mail". Their idea gave way to Adam Back’s Hashcash system, originally proposed in 1997. The system is still used as the proof of work algorithm in many cryptocurrencies including bitcoin.
Why use proof of work?
The proof of work protocol in Bitcoin and other cryptocurrencies allows users to verify transactions and establish trustless and distributed consensus, meaning users do not have to rely on a third party like Visa, PayPal, or banks to legitimize a transaction. Instead, the transactions are distributed, auditable and verified through miners’ work in creating and maintaining new blocks.
For their efforts, miners are rewarded through the issuance of new coins in the network.
The protocol also incentivizes miners not to cheat the system. Because of the high cost of hardware, energy and the potential loss of mining rewards, attacking the system would not be economically viable.
In fact, to attack the system, the bad actor would have to completely redo all of the computations between the block he or she wanted to attack and the current block. Moreover, he or she would have to make all of the changes before the next block is solved. And because blocks are created every 10 minutes, it would require an impossible amount of computing power to make the changes.
In addition to creating a trustless consensus and protecting the system from being altered, the proof of work protocol also prevents the system from malicious Denial of Service (DoS) attacks. For the same reason it is nearly impossible to alter the blockchain, it is also very difficult to perform DoS attacks on the blockchain due to the energy and hardware requirements needed to make such an attack.
How does proof of work actually work?
Miners participating in Bitcoin or other proof of work based blockchains compete with one another to solve complex mathematical puzzles. These puzzles are also known as cryptographic hash functions. In order to solve these puzzles, participants must use brute force, or guess every possible hash, typically resulting in the miner or miners with the most hash power or computational power receiving the reward.
Bitcoin’s proof of work protocol is designed to be easy to verify but difficult to figure out. In order to accomplish that, the protocol uses a "nonce" – a non-repeating number – in order to simplify the verification process while increasing the difficulty of the discovery process.
In the case of Bitcoin, the amount of hash power needed depends on the current difficulty of the network. In order to keep the block creation time at or around 10 minutes, the puzzle fluctuates in difficulty every 14 days. The idea is to fuel competition while maintaining feasibility. If it is too easy to receive a reward, the coin issued will not have value. If it is too difficult, the system will not operate as intended, resulting in slower transaction confirmations and higher fees.
These difficulty adjustments play a role in the larger design of Bitcoin. As a deflationary currency, only 21 million bitcoins will ever be mined. To maintain a steady stream of coins and the value of the coins, the reward for creating a new block is halved every 210,000 blocks. This system was created under the assumption that both hardware and electricity will become more affordable over time, allowing users to upgrade their mining rigs over time while maintaining a reasonable reward structure.
Other cryptocurrencies use proof of work protocols, as well, however, in a completely different way to Bitcoin.
Litecoin, for instance, uses a Scrypt proof of work algorithm, and while it shares a lot of similarities with Bitcoin, the number of litecoins that can be mined is significantly higher while the block creation is significantly faster.
Ethereum, too, uses another proof of work algorithm called Ethash, an algorithm specifically designed for Ethereum.
For both Litecoin and Ethereum, the proof of work algorithms were originally designed to be "ASIC resistant," harnessing not only miners’ computing power, but also their RAM. Though these projects previously allowed miners to utilize ‘regular’ computers to earn coins, technology has since caught up, with ASIC rigs designed specifically for both Litecoin and Ethereum.
Does the proof of work protocol have any flaws?
Though proof of work is a widely used protocol in the world of cryptocurrencies, there are two main critiques that are often used to advocate for other protocols.
The main critique of the proof of work protocol is its electricity usage. Currently, the average electricity used per year to maintain the blockchain network is approximately 73 terawatts. This makes the electricity usage greater than that of the Czech Republic, Chile and Austria.
Though its power usage is significantly higher than some of its competitors, advocates and Bitcoin maximalists say that it is not a problem, suggesting that the price is justifiable and with advancements in technology, the Bitcoin network will operate more efficiently.
Another critique is the Bitcoin network’s vulnerability to a 51 percent attack. A 51 percent attack is when one entity gains control over 51 percent of the network. At that point, the would-be attacker could choose how the network operates. Critics suggest that it is far easier to attack Bitcoin in this regard than other cryptocurrencies working on different protocols, such as ‘proof of stake.’
What are the alternatives to the proof of work protocol?
Though many cryptocurrencies successfully utilize the proof of work protocol, there is a growing debate centered on which is the best mining protocol. On one hand, there is proof of work which has an established history and a number of devoted followers. On the other, there is a growing call to move to what is known as a ‘proof of stake’ protocol. Even Ethereum brainchild Vitalik Buterin has announced plans to switch the Ethereum blockchain to a proof of stake protocol, Casper.
Proof of stake, like proof of work, solves the problems of double-spending, network security and consensus. Proof of stake does this in a vastly different way, however.
In the proof of stake protocol, new block creators are chosen not by solving equations but by the participant’s wealth, or stake, in the blockchain’s coin. This also means that there is no block reward. Instead, miners are incentivized by transactions fees. Obviously, their stake in the success of the blockchain also plays a role in a user’s desire to keep the network function, as well.
Not only is the proof of stake protocol cheaper and greener, some have even suggested that proof of work’s electricity-heavy requirements place downward pressure on cryptocurrencies due to the fact that electricity bills must be paid in fiat and therefore miners must sell their cryptocurrency for fiat in order to continue mining.
Though proof of stake offers new solutions to some of proof of work’s biggest problems, it’s not without its own naysayers.
One of the biggest criticisms of the proof of stake protocol is its potential for centralization. Because the participant holding the most cryptocurrency will determine the next block, they will have the opportunity to earn on the transaction fees, thereby increasingly their wealth which, over time, could result in that participant controlling the majority of the network.
Another criticism of the proof of stake protocol is that there is nothing to give the coins value. In the cases of gold, silver and bitcoin, there is significant work required to reach the reward. With coins created under the proof of stake protocol, there is no work required, suggesting to many that the coin does not have value.
Proof of work has been the cornerstone for some of the most valuable and widely used cryptocurrencies on the market, though as the debate heats up and new technology is revealed, the space is poised for a change. While it’s not likely that Bitcoin will change its mining algorithm anytime soon, Ethereum is already in the process.
It’s fair to say that, currently, no algorithm is perfect, but there are a number of experiments in process thanks to new cryptocurrencies testing the waters. Some of these include hybrid PoW and PoS algorithms, proof of burn, which requires users to ‘burn’ or destroy their currency, proof of use, and more.