Why Proof-of-Work Works (in Theory)

Published:

Last Modified:

Proof-of-Work is the most important idea introduced in the Bitcoin Whitepaper. Many people we talk to (if not most) understand what Proof-of-Work is, and have some vague gut feeling that it’s in some way superior to Proof-of-Stake, but lack the conceptual lexicon to clearly explain why. The goal of this article is to close that gap.

Our starting point for this exposition is to suppose there is a ledger. A ledger is (in essence) a table that looks like the following:

AccountHolder       Balance
---------------------------
Alice               5
Bob                 88
Carol               33
...

It will be helpful in the context of this article to maintain a conceptual distinction between a ledger, which is the data of interest, and a blockchain, which is a system for changing the ledger.

Modern blockchains of course keep track of much more sophisticated data structures, but the principles remain. The ledger by itself is useless unless it can be changed. For instance, if the ledger cannot be changed, then Alice cannot withdraw her funds or spend them to Bob, because such an action would effect a change in the ledger.

The question is: who gets editing privileges over the ledger?

In the case of traditional financial institutions (e.g. a bank), the institution simply is responsible for keeping track of their own ledger. The institution has exclusive authority to modify their ledger at will. The institution may be subject to some sort of regulation or auditing procedures to ensure honesty, but fundamentally the model is that the institution is trusted to maintain an honest view of their own ledger.

This system works reasonably well in intra-jurisdictional contexts (transferring money from the US to Iran is quite a challenge) over finite time-spans (every currency in history has eventually been debased).

The concept of blockchain elucidated in the Bitcoin Whitepaper was originally to solve both problems at once:

Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non- reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.

A blockchain is a data structure which is used as part of an elaborate but fundamentally simple cryptographic scheme to address this problem of changing the ledger without requiring any trusted party to maintain the ledger.

The basic problem that arises in the absence of a single trusted party tasked with maintaining an authoritative view of the ledger is that of sequence, or in other words, the double-spend problem. The problem is as follows:

  • On January 1, Xavier (X) and Yolanda (Y) agree on a uniform view of the ledger.
  • Between January 1 and February 1, Xavier and Yolanda do not communicate.
  • During this time, each one updates their own copy of the ledger.
  • On January 1 (when Xavier and Yolanda agreed), Alice had 5 Bitcoins.
  • On February 1, Xavier and Yolanda meet again to compare their ledgers and agree on a new uniform view.
    • In Xavier’s copy of the ledger, Alice has spent her 5 Bitcoins to Bob.
    • In Yolanda’s copy of the ledger, Alice has spent her 5 Bitcoins to Carol.
  • There is no way to solve this problem except to pick arbitrarily between one view or the other.
  • If Xavier’s ledger is chosen, then Carol gets screwed.
  • If Yolanda’s ledger is chosen, then Bob gets screwed.

The Bitcoin scheme solves the problem of choosing between Xavier and Yolanda’s views of the ledger.

The basic unit of a blockchain is (surprise) a block. Notionally, a block is simply a list of atomic updates to the ledger:

Tx#     Sender      Recipient       Amount
------------------------------------------
0       MINT        BLOCK_MINER     1
1       Bob         Alice           37
2       Dave        Tom             84
3       Steve       Dave            107
...     ...         ...             ...

Let us suppose that Mike (M for miner) is interested in updating the ledger. In the Bitcoin scheme, Mike must present the solution to a mathematical problem which has the following properties:

  1. Solving the problem is hard.
  2. Checking that a candidate solution is correct is easy.

The definition of “hard” is very important: hard means that solving the problem requires a copious expenditure of physical energy, as in watt-hours (what you get billed for on your power bill).

Mike’s solution to the mathematical problem is part of the data structure of a block. Each block also depends on the previous block, ensuring a uniform sequence of transactions. Conventionally, the first transaction in a block is a mint transaction that rewards Mike with new Bitcoin.

The second piece of this puzzle is as follows: no signal is meaningful unless it is costly. This principle generalizes outside the confines of technology, and is found most abundantly and clearly in nature. For instance, human mating rituals suffer from a similar cost asymmetry problem: mating is very costly for females, and very cheap for males. To ameliorate this problem, it is common for candidate males to gift expensive and useless items (e.g. engagement rings) to candidate females in exchange for exclusive mating privileges. These purchases serve no purpose except to be visibly costly to the signal producer (candidate male), thus counterintuitively ensuring to candidate female that the signal is meaningful.

Male and Female Peacock Generated by ChatGPT

Thus, the cost asymmetry inherent in the aforementioned mathematical problem—it is costly to produce a correct solution but trivial to check one—allows a correct solution to said mathematical problem to serve as a visibly costly signal of the miner’s honesty. In other words, existing Bitcoins can be “priced” in terms of the watt-hours that were required in order to mine them, solving the problem of “why is Bitcoin valuable?” (almost).

The third piece of the puzzle is the second law of thermodynamics, which for our purposes ensures that Mike’s energy expenditure is irreversible.

The problem of maintaining a uniform view of the ledger is solved by simply picking the longest available chain. The longest chain required the most watt-hours to produce, therefore it is the most trustworthy. (This is a simplification, but the essence of the statement is correct).

Circling back to our original distinction between ledgers and blockchains, we can see now that the ledger is whatever data is considered meaningful enough to burn energy over, and the Proof-of-Work blockchain is a means for mutually unknown and untrusting parties to agree on a uniform view of ledger.

“It’s the scale, stupid”: Why Proof-of-Work Failed in Practice

There are many reasons that Bitcoin has failed to deliver on its stated goal (“A Peer-to-Peer Electronic Cash System”). These reasons are intertwining and multilayered.

The most forcing reason is a fundamental law of distributed computing called the CAP theorem. CAP stands for consistency, availability, and partition tolerance. The CAP theorem states that at most two such properties can be true at any time; that is, the tradeoff is dynamic. At one second it can pick consistency and availability (CA), sacrificing partition tolerance (P). At the next second, the system can pick availability and partition tolerance (AP), sacrificing consistency (C).

An analogous trilemma presents itself in blockchains between the properties of security, decentralisation, and scalability. This is called the blockchain trilemma.

The basic problem that plagues Bitcoin is that the process of the entire planet agreeing on a uniform view of changes to the ledger is orders of magnitude slower than the underlying economic processes that would motivate people to change the ledger in the first place. Very bluntly: Bitcoin can’t scale.

Bitcoin has a global (theoretical) upper bound of 7 transactions per second (TPS), and the practical upper-bound is 3.5 TPS. This is roughly the scale required to serve a weekend farmer’s market in a moderately-sized city. By comparison, Visa claims a peak transaction rate of 65,000 TPS, and a resting rate of about 8,500 TPS.

Regarding the analogy between the CAP Theorem and the Blockchain Trilemma:

  • Availability is scalability. (Not quite, but it sounds catchy, doesn’t it?) By the CAP theorem, a blockchain that prioritizes scalability must sacrifice either consistency or partition tolerance.

  • Consistency is security. (This sounds way less cool). A blockchain that prioritizes security must sacrifice either availability or partition tolerance.

  • Partition tolerance is decentralisation. (Eh). A blockchain that prioritizes decentralisation must sacrifice either consistency or availability.

The scaling problem of Bitcoin is largely just a function of the choice to generally favor CP (security and decentralisation) at the expense of A (scalability).

The following paragraph is the most important paragraph in this entire article:

There is no “solution” to the Blockchain Trilemma. The Blockchain Trilemma is a fact of nature. Any project claiming to have “solved” the Blockchain Trilemma is a scam.

The Memetic Theory of Value

Ultimately, a currency is valuable if and only if people believe it is valuable and behave as such. This is called the memetic theory of value. It is crucial to understand that the memetic theory of value is true, to a point.

Typically, people believe a currency is valuable if it is exchangable for goods and services, which depends on the merchants’ willingness to accept said currency in exchange for said goods and services. Here lies the rabbit. The scaling problems of Bitcoin render it unusable for ordinary economic activity.

If the meme that X currency is valuable is not backed by an economy of real goods and services, then the memetic theory of value collapses to the cargo cult theory of value.

All that to say, the Americans (and later Germans) landed in the middle of a tribal area and built runways for their planes, brought in troops and buildings and crates upon crates of supplies. More food than the natives had ever seen, and exotic technologies from America that were completely new. They saw the destructive power of guns, chainsaws making noise and cutting through trees in seconds, the magical communication of radios and the loud flying birds carrying it all in and out.

The soldiers were seen as gods walking among men. Who could blame them?

Cargo Cult People

But here’s the most fascinating part: the islanders didn’t stop.

The war ended, the bombs had been dropped. Everyone packed up and the military presence in the area eventually wasn’t necessary any longer. The gods left as mysteriously as they appeared.

There was some correlation and causation cultural confusion that led to the cargo cults, this cacophonic campaign of convoy company came and carried on, the coasts and cottages combed for coffee and cockpit crashes but clearly conflict contracted, cultivating curiosity and clear-cut customs: they had to summon the gods back.

So they built runways and waited.

No response from the gods. No planes landed with food and goods.

They built radio towers from bamboo and airplanes to litter the ground, as if to attract the cargo back.

See, they didn’t realize the causation: runways don’t exist because the existence of radio tower structures summon planes down. The goods weren’t circling high in the sky and watching for bamboo binoculars and wooden chainsaws to bring them back. The old gods needed a sacrifice to take action, but the Americans weren’t even close to the area at the time. nothing the islanders did would bring the shiny birds back.

Bitcoin Maxis believe Bitcoin’s current US $2.4 T market cap can be sustained purely on the memetic value of Bitcoin. If we all just believe Bitcoin is valuable, then eventually everyone will be convinced, and the prophecy will be fulfilled. Make of that what you will.