PoW as part of a blockchain protocol is a complex (and rather genius) process that guarantees that nodes (computer systems operating the blockchain) can reach a consensus on which data is correct. [1] It’s based on a simple, yet effective principle; “work” that is difficult to perform but easy to check, with a balance of risk and reward. [2]

PoW is often referred to as a consensus mechanism. This is not correct. PoW is a principle that forms part of a consensus mechanism, but not the mechanism itself. A consensus mechanism is all rules, principles and processes that, together, guarantee consensus. [3]

Proof-of-Work explained

PoW was originally designed to combat spam emails. The idea was to force an email client to solve a simple math problem (work) and attach the solution to the email (proof) before an email could be sent (reward). Let’s say this would take the average computer about 1 second. Not a lot of time/work when you’re sending an email about an important business meeting. However, when you consider how most spammers operate, trying to send millions of emails at the same time, this becomes a different story. [4]

The core principle on which PoW is based is the tradeoff between work and reward. If the reward does not outway the work, it becomes pointless to do it. For example, if a spammer tries to send 10.000.000 emails from an ordinary computer. It would take 10.000.0000 seconds = 115.74 days before all emails are sent. To speed this up, the spammer has to purchase expensive hardware that can generate more computing power to be able to send all emails quickly (work) and scam people out of their credit card credentials (reward). In other words, the idea of PoW was to offset the work/reward ratio in such a way that it was no longer lucrative to send spam emails and so guarantee honesty. 

Let’s illustrate this with an example. Due to the introduction of PoW, the spammer/scammer cannot use his simple desktop anymore and has to spend $10.000 in hardware upgrades and another $5.000 in energy to send the 10.000.000 emails. Now let’s say that the estimated revenue of the email scam is between $12.500 – $17.500. So, $15.000 in costs and an estimated revenue between -$2.500 and +$2.500. Would you take that risk? Tipping the risk/reward balance in such a way that it becomes unrewarding to be dishonest is the core concept of PoW.

Proof-of-Work and blockchain

Satoshi Nakamoto, the illustrious founder of Bitcoin, saw another use case for PoW. He used it to create a so-called “trustless network”. Trustless meaning that participants of the network don’t need to trust each other. A mechanism is in place to guarantee that the participants are honest. Not having to personally trust other participants is vital for a decentralized system (a system where participants don’t know each other). [5] So, how does PoW create this trustless network? 

Proof-of-Work on the Bitcoin Blockchain

A Bitcoin miner takes new transactions and combines them into a new block. Miners race to be the first to add a block to the blockchain in order to “mine” the reward locked in it. However, before a block is accepted on the network, it will be validated by the other Bitcoin nodes (computers that run the Bitcoin software). One of the validation checks is proof that the work was done. The work consists of the miner having to solve a computational puzzle. This puzzle can only be solved by trying trillions of different combinations. In turn, this requires huge amounts of computing power (work). [6] To generate this computing power, the miner needs to spend large sums of money on electricity and expensive hardware. [7]

When the puzzle is solved, the miner will add the missing puzzle piece to the block (proof of work) and propagate the new block to the network. The new block will now pass through the network of nodes. Each node will check if the block is valid. This is a rapid, almost effortless process. As explained, validation includes checking if the correct puzzle piece was added to the block but also checking if the transactions of the block are legitimate. A total of 25 checks are performed in a fraction of a second. If a node deems a block invalid, the block is rejected and not accepted onto the blockchain (meaning that the transactions in the block won’t go through). The block is only accepted onto the blockchain when enough nodes consider the block valid (consensus is reached) and only when the block is added to the blockchain will the bitcoin locked inside of it be awarded to the miner (reward). [8]

Let’s zoom out and reflect on this mechanism. On the one hand, we have miners who can earn rewards by working hard to add valid new blocks with transactions to the blockchain. On the other hand, we have nodes who can almost effortlessly check if this process was done properly. And now think again of the work/reward ratio. Let’s say a miner tries to cheat the system and ads a false transaction of 10 bitcoin to an address he/she owns. If the miner wants to stand any chance of getting this block through, the miner must prove the work has been done by adding the correct puzzle piece. Which means the miner has to spend a huge amount of computing power. Let’s say the block gets to the first node and passes the puzzle-piece check. However, the second check, scanning the transaction for legitimacy, is an immediate fail and the block is rejected. The result? The bogus transaction doesn’t go through and no reward is given for the block. In other words, a financial loss for the miner because the costs of computing power and hardware cannot be recovered. However, if the miner doesn’t add any bogus transactions and does the work properly, he/she gets the reward locked inside the blocks.

It’s a common misconception that it’s possible to cheat the Bitcoin blockchain by creating transactions out of thin air. A block containing bogus transactions will always be spotted by other nodes and simply rejected. However, attackers can try to fork the blockchain in an attempt to double-spend their cryptocurrencies in a so-called consensus attack. 

To summarize, Proof-of-Work (PoW) helps to ensure the security of the Bitcoin blockchain by making it expensive for miners to submit false blocks. If there were no PoW mechanism, miners could easily try to add false blocks to the network without any consequences. However, with PoW, submitting false blocks requires a significant amount of computational effort, making it not worth the risk for miners. As a result, the network remains trustworthy and secure, with only valid blocks being added to the blockchain.

51% Attack

Are there still ways that bad actors can try to cheat the PoW system? In theory, yes. These so-called “consensus attacks” occur when participants of the network try to cheat the system to wrongfully enrich themselves (double-spending) or try to stop a blockchain from working (denial of service attack). The most notorious consensus attack is called a “51%-attack”, where a powerful network participant uses his/her might to overpower the network for illicit benefits. 

Environmental concerns

Bitcoin has been in the news repeatedly for the fact that it causes environmental issues due to its huge power consumption. To put this in perspective, the Bitcoin blockchain consumes roughly the same amount of power as the entire country of Malaysia. [9] Due to the PoW model, this power consumption is inherent to the functioning of the Bitcoin blockchain. The PoW model requires computing power to be spent on the work that needs to be performed and computing power requires energy. In other words, immense power consumption is necessary for the Bitcoin blockchain (or any other PoW blockchain for that matter) to function properly. Without switching to a different model, such as Proof-of-Stake or Proof-of-Authority, there is no way around wasting humongous amounts of energy. [10]

SOURCES

  1. Ethereum.org: Proof-of-Work (PoW)
  2. Medium Blessing Adesiji: How preventing spam emails led to proof-of-work | Author: Blessing Adesiji.
  3. Ethereum.org: Consensus Mechanisms
  4. Back, Adam. (2002). Hashcash – A Denial of Service Counter-Measure available via ResearchGate.net
  5. Bitcoin.org: Bitcoin: A Peer-to-Peer Electronic Cash System | Author: Satoshi Nakamoto
  6. Mastering Bitcoin: Chapter 8. The Blockchain | Author: Andreas M. Antonopoulos
  7. River Financial: Buying or Building a Mining Rig? What You Need to Know
  8. Mastering Bitcoin: Chapter 8. The Blockchain | Author: Andreas M. Antonopoulos
  9. Cambridge Bitcoin Electricity Consumption Index: Comparison
  10. MIT Center for Energy and Environmental Policy Research: The Carbon Footprint of Bitcoin | Authors: Christan Stoll, Lena Klaassen and Ulrich Gallersdorfer