We apologize but our blog is available only in English, Spanish and Russian.

# On the Merits of Proof of Work

Overviewing bitcoin's proof of work mining from an engineering perspective, with historical context and comparisons of the tradeoffs with proof of stake.

Published on Nov 15, 2021
Published on Nov 15, 2021

Amidst the concern over bitcoin mining’s energy usage, and the increased use of proof of stake (PoS) as a consensus mechanism for most new blockchains, popular rhetoric often concludes that proof of work (PoW) is outdated and wasteful. This position, however, is misguided as it usually stems from a lack of understanding for why proof of work exists, and the reasons it was designed to behave the way it does. This article will quickly explain why proof of work is a significant feature of the bitcoin protocol, and how it is unique from the numerous proof of stake networks that seem to emerge on an almost monthly basis.

## Historical Context

It may be surprising, but proof of work’s first application was not in solving for state consensus in a global monetary network. It has much humbler roots, where it was first applied to counteract spam. As Adam Back explains in this 2014 interview (Let's Talk Bitcoin - Episode #77) he first devised the scheme as a way to combat spam in Usenet and remailers, where spammers would abuse these forums by posting reams of irrelevant and useless junk.

As the cost to send messages was virtually zero, the economics were such that it was profitable to send spam to potentially reach millions of computers. Adam’s insight was to require a user’s CPU to perform a bit of work, in order to assign a cost to be able to send a message on the network.

His design set incentives such that the cost to normal users would not be prohibitive, but did not scale for users that were abusing the resources. He applied his knowledge of a phenomenon known as “birthday collisions,” adapted for a computer, wherein the computer would perform SHA1 hashes on an input until it found the desired output (the “collision”). These collisions could be estimated to occur after a predictable duration, on average. Each collision or event would mint a digital “stamp” that could be used as proof of postage paid, which represented the small amount of electricity and computing power required to produce the stamp.

This was the genesis of something he called Hashcash, and from the description provided, its relevance to bitcoin should be immediately apparent—the algorithm is essentially the same, and these stamps are the great ancestors of bitcoin itself.

## Bitcoin as a Communication Protocol

Through Adam’s contributions to the Cypherpunks Mailing List, the idea to use hashcash and proof of work in a digital payments network emerged. In retrospect, it should be clear why proof of work fits so perfectly here: the bitcoin protocol is itself a giant communication network.

The bitcoin blockchain has a ledger, composed of blocks, which comprises the data of the network. A block has finite space, and the system is designed to create a new block roughly every ten minutes. Given the constraints, the communication protocol has a natural limit on the rate of transactions per minute.

Consequently, if the cost to write to blocks were zero, then anyone who wanted to fill the network with bogus transactions could do so, and effectively prevent legitimate transactions from getting through. This would be a method of censoring the network, through a denial of service attack.

Additionally, if another consensus method were used, such as one address one vote, then these spammers could just create a large number of accounts to unduly influence the arrangement of transactions, and which ones get included in a block — all at essentially zero cost. This is what’s known as a Sybil attack.

Fortunately, writing to the bitcoin ledger isn’t free. Because of proof of work, miners must complete trillions of hashes to find a block, which expends energy, and thereby costs money to produce. Measured in time, block space—bandwidth, essentially—inherits a price to prevent abuse of the network, and to ensure that legitimate users are able to participate. Miners are rewarded for their service by the incentive of the block reward, in addition to fees paid by the users to get their transactions included in a block.

## Electricity and Bitcoin

Electricity is the highest grade energy available, and it is the currency of a digital world. When a block is secured, it can be measured in this base currency as the number of Joules (or kilowatt-hours) required to produce it. $$B_j$$ (Joules to produce a block) = N (miners) x H’ (avg hash exhaust rate in J / TH per miner) x G hashes (TH) required to produce a block. This J/TH efficiency is also what determines the mining profitability for any given mining rig, as shown in the cost to mine 1 BTC visualization below for an Antminer S9.

Evidently, utilities get paid in dollars, so you multiply $$B_j$$ by E (the electricity rate in \$/kWh) to get the cost to produce a block $$B_$$. Since the miners won’t produce blocks for free, they need to recoup a profit by a combination of the block reward (R), plus the user fees paid (F). That is, $$B_$$ < R + F.

After examining at this basic level, we see that the miners who offer proof of work on behalf of the network are merely engaging in the service of selling block space to the users. It just happens that block price is denominated in electricity, because this is what computers use. “Revolutionary stuff,” you may be thinking.

$$B_j = N x H’ x G$$

$$B_ = B_j x E$$

$$B_ < R + F$$

$$B_j * E < R + F$$

Takeaway: the energy expended will always be determined by the rewards available to the miners of the network, including fees for block space.

## The Morality of Bitcoin’s Energy Use

Is it wrong that the electricity consumed by the bitcoin network is significant? Frankly, no. As we showed in the previous section, the electricity used is directly related to the value that users place on its block space. As the demand for block space increases, so do the rewards for miners. This will cause its energy usage to increase as we saw during bitcoin’s bull run in 2020.

Clearly, there is demand for the monetary good that is bitcoin, and the block space on which it resides.

Rather than flinging indictments against bitcoin for its energy use—again, a proxy for the value moving across the network—it would be far more productive to question the sources of energy that produced the electricity that is consumed. Bitcoin uses electricity, and it is agnostic to the fuel source; whether it is carbon-intensive coal, or cleaner sources such as methane waste gas, hydro power, or renewables.

## Proof of Stake: a Better Alternative?

To explain briefly, proof of stake uses tokens that are locked up with a miner (“validator”). Instead of expending compute and energy resources for the right to produce a block, the validator is at risk of destruction of their stake (“slashing”) to prevent violations of the consensus protocol.

This would appear to be more efficient, since energy is not directly consumed in the activity of mining blocks. However, the staked tokens are ultimately traded for currency, which in itself is just the distillation of other economic activity. There is no guarantee that the provenance of the staked capital is any more clean than the energy that is expended in a proof of work mining network.

Additionally, the capital required to secure a proof of stake network is significantly higher than capital committed to PoW mining equipment (billions versus millions). However, a definite advantage for PoS is that, due to its low direct energy footprint, and concomitant reduced physical size, a proof of stake network may draw less negative attention. At the current time, PoS also has fewer perceived environmental externalities. It is more discrete, for sure.

One final consideration on PoS is that voting power in consensus is determined by the size of stake that a validator has. Due to the behavior of compounding, larger stakes will increase more quickly than smaller ones, which is a naturally centralizing force on the protocol. Left unchecked, a dominant stake will pose a risk to censorship resistance, which is already evident in the Ethereum 2 Beacon Chain, where the top 5 validators comprise over one third of the entire stake—enough to halt or impair the network.

## Conclusion

Proof of Work is a brilliant invention by Adam Back, and an essential component to the bitcoin network. It has roots in defeating Sybil attacks and denial of service, and is what makes bitcoin economically unattractive to attack. Proof of work in bitcoin establishes a pay-to-use communications network, and assigns a cost to block space (bandwidth) that is directly related to the value that its users place on the ability to transact, via fees. Bitcoin miners provide a service, which they consume electricity to provide.

Proof of stake is an alternative method of establishing consensus in blockchains, but the outsized capital required to secure the network may be derived from ecologically costly means, and it has inherent centralizing forces that pose risks to the protocol over time. For bitcoin, proof of work has proven to be an ingenious solution that is both durable and reliable, despite frequent social, political, and even economic attacks.

You can view the changelog also in our documentation.
See the full changelog