The Engineering of Bitcoin
H.T. Person Distinguished Lecture
September 29, 2023
by Caitlin Long, 2023 University of Wyoming Distinguished Alumni
University of Wyoming College of Engineering & Physical Sciences
Money in this internet age is an engineering problem, and Bitcoin is the engineered solution to it.
Today I’ll discuss the engineering of Bitcoin as an IT system that is also a digital money system, and then spend a few minutes on the implications of Bitcoin as a risk management tool for balancing power grids.
This talk is designed for a general audience but with an engineering emphasis. It draws heavily from – and salutes the work of – the many engineers who have taught me how to understand Bitcoin through an engineer’s lens. Special thanks go to engineers Lyn Alden, Andreas Antonopolous, Jameson Lopp, Michael Saylor, the engineering & product teams at Custodia Bank, and especially to the OGs who created the crucial building blocks that laid the path for Satoshi Nakamoto to build Bitcoin: Adam Back, Nick Szabo, and the late Hal Finney.
And, of course, I salute Satoshi Nakamoto—perhaps the greatest inventor of our age.
I. The Engineering of Bitcoin as a System That Became Money
Satoshi didn’t invent anything new, per se, in 2008; rather, Satoshi combined existing building blocks in a way not previously combined. Bitcoin was a “path dependent” advance in computer science, and its building blocks spanned multiple disciplines—especially math (i.e., cryptography), computer science (i.e., proof-of-work systems that expend computational and energy resources to generate a digital token) and economics (i.e., game theory).
For the computer science field, Satoshi solved the Byzantine Generals Problem—a problem that the field had tried to solve for decades and considered unsolvable. Satoshi solved it by using game theory, which was Satoshi’s real genius.
What is the Byzantine Generals Problem? In simple terms, it’s this: how would generals fighting on a Byzantine battlefield know that messages they received from other generals during a battle weren’t tampered with during their journey across the battlefield? The problem of ensuring that data in transit was not tampered with while in transit was considered by many to be an unsolvable problem in distributed systems, but Satoshi solved it—by applying game theory.
Satoshi used asymmetric incentives to augment existing tools from math and computer science in a beautifully and carefully balanced system. For example, Satoshi designed Bitcoin so that it’s expensive to add transactions to the Bitcoin ledger, but it’s cheap to verify them once added. It’s prohibitively expensive to attack the Bitcoin network—it would cost an attacker billions just to re-write this morning’s transaction history, for example—but it’s cheap for anyone with a laptop to participate in the network by simply downloading the software and running it.
It took a true polymath—what I call a “systemic thinker”—to concoct such a beautifully-balanced system. There’s a lesson here for all of us: solutions to problems in our fields might lie outside our fields. Perhaps if distributed systems engineers had spent more time talking to game theorists all along, the Byzantine Generals Problem might have been solved much sooner!
Indeed, the security of Bitcoin as a system is remarkable. It is almost surely the most secure IT system ever built. The protocol itself has never been hacked successfully, and today it secures more than $0.5 trillion in value. It lives in the wilds of the internet, unprotected by a firewall, and attackers constantly probe but fail to penetrate it. How is it so secure? Remember: Bitcoin is a beautiful balance of technology and economic incentives—hackers would need to spend a lot more money to attack it than they would gain from doing so.
As a piece of software, Bitcoin is also remarkable—its network uptime in the past decade is 100%, and all network upgrades are backwards-compatible by design. Bitcoin’s governance as a distributed system is “pull not push”—because node operators cannot be pushed to update the Bitcoin code they run. This means the tens of thousands of node operators around the world choose which version of the code to run and, as a consequence, the node operators really control Bitcoin. To ensconce this decentralized governance model, Bitcoin nodes by design are lightweight and simple enough to run on an old laptop with standard internet bandwidth. This feature distinguishes Bitcoin from most cryptocurrencies, of which the same is not true. And to protect Bitcoin’s decentralization, the Bitcoin community successfully fought a bitter, internecine war in 2017 that could have tipped Satoshi’s beautiful balance in favor of large, powerful elites. Thankfully, it did not. And it’s becoming easier and easier to run a Bitcoin node because data storage, computer processing and bandwidth are improving at a rate faster than the requirements to run a Bitcoin node are increasing. This means the Bitcoin network is becoming even more decentralized and attack-resistant with time.
Satoshi’s beautiful balance—i.e., the engineering that makes Bitcoin money for the internet age because it can securely move scarce value at the speed of light—is a combination of five factors I’ll introduce now and discuss more momentarily: (1) proof-of-work + (2) the longest-chain rule + (3) difficulty adjustment + (4) the ease of running a network node + (5) Bitcoin’s code changes are always backwards-compatible.
Bitcoin is already a juggernaut; the real question is this: how big will Bitcoin eventually become as money?
Let’s dig into that question, examining what makes Bitcoin “the first engineered monetary system,” in the words of Michael Saylor—an engineer who, quite rightly, views money as an engineering problem.
A. What Pushed Money Into Becoming An IOU, For Which Bitcoin Is The Solution
Money is one of the most misunderstood concepts in society. Money is simply a commonly accepted good through which humans exchange value with each other. The good that humans chose to use as money has changed its form throughout human history—it has variously been cowrie shells, wampum, Rai stones on the Island of Yap, cigarettes in prisons, and, of course, gold and silver. Humans evolved to choose such goods as money mostly because of their inherent physical scarcity—either they could not be counterfeited easily, or could not be counterfeited at all. Their scarcity made them collectibles, and their commonly accepted use in exchange made them money.
Like other collectibles that became money, Bitcoin is a collectible—but it’s a digital collectible that can be exchanged at the speed of light.
A big problem with using physical goods as money is that they are transported at the speed of matter. But data can move at the speed of light. In the financial system historically there has been a speed gap—transaction data has been able to move at the speed of light since the second half of the 19th century (when intercontinental telecommunication systems were deployed), but physical money couldn’t move that fast. Engineer Lyn Alden observes: “This speed gap opened a massive arbitrage opportunity for banks and governments to use, because it gave them custodial monopolies over fast long-distance payments.”1
Alden uses physics terms—data moving at the speed of light vs. money moving at the speed of matter—to describe a problem I’ve long described in operational terms, but it’s really the same problem: settlement risk. When the data and money legs of a transaction don’t settle at the same time, somebody carries an IOU until the money leg settles. This means the financial system is inherently built on credit.
Kids trading baseball cards know how to settle both sides of a trade simultaneously: both kids simply hold onto both baseball cards, and at the same time they both let go of one card to settle the trade. But the financial system can’t do this because it inherited that speed gap. To deal with the speed gap, over decades the financial system created layers of abstractions away from the physical money (i.e., gold) to speed final settlement. The U.S. dollar itself is a good illustration: the U.S. Constitution (Article 1, Section 10) initially defined the dollar as physical gold or silver coins, but then came the first abstraction—the dollar became an IOU redeemable for that physical gold, and finally the dollar became just an IOU redeemable for another IOU. There are layers upon layers of further abstractions in the financial system, each one an IOU. For example, when Wall Street began to transition from paper to digitization in the 1970s, processing power and storage was expensive—so financial institutions batch-processed transactions and settled only the net IOU with a bigger clearing firm, which then batch-processed more transactions and settled only the net IOU with an even bigger clearing firm, and so forth up the chain. But all these abstractions are forms of credit. Still today, when you send money on Venmo or Zelle, for example, you may think your payment settles instantly but it doesn’t; you’re seeing the data moving at the speed of light, but behind the scenes you don’t see that money leg settles far more slowly. Most U.S. dollar payments are really just credit that settles in 1-3 business days (through the ACH system), and stock trades are also really just credit that settle two days after the transaction date.
Here’s the key point of this section: the structure of this IOU-based financial system gradually pushed money itself into becoming an IOU. That financial systems evolved to become entirely based on credit is what makes them inherently unstable systems, prone to periodic financial crises.
Quoting again from Lyn Alden:
“Credit-based transactions over telecommunication systems only require simple data like Morse code to occur, and thus could be performed in the 19th century. Settlements of scarce value over telecommunication systems require far more complex computation, data structures, bandwidth and mathematical proofs…If I were to describe in one paragraph why money has been broken around the world for so long while almost everything else has improved substantially (energy abundance, technology abundance and so forth), it’s due to this gap between transaction and settlement speeds that the telecommunication era created. For a century and a half, the world has been stuck in a local maximum that has required and incentivized ever more complex forms of centralized abstraction to bridge that gap.”2
These “ever more complex forms of centralized abstraction” have proven themselves not only unstable but also susceptible to capture by powerful elites that benefit from the continued existence of this settlement gap, and which block the adoption of new technologies by capturing the regulatory system to protect incumbents.
Alden sheds light on these troubling trends by reviewing monetary history from an operations engineering perspective: “The international gold standard [began in the 1870s and] worked for several decades during peacetime but was inherently flawed from the start due to how many [IOUs] it enabled to exist on such a small monetary base of actual gold, and it failed its first test as soon as war broke out between major powers in Europe [in 1914]. The [post World War II] Bretton Woods system was even more flawed due to even greater levels of abstraction and managed to fail [in 1971] in less than a decade and a half after full implementation. The modern system of 160 different ever-devaluing fiat currencies loosely tied to one world reserve fiat currency [the U.S. dollar] is highly flawed due to having no inherent grounding in scarcity. The invention of Bitcoin as an open-source fast settlement network with its own scarce units provides the first credible way to close that gap between transaction and settlement speeds…”3
Borrowing again from physics, Alden explains the implications of the status quo financial system’s instability: “Entropy is the law by which physical systems inevitably become more disordered over time, because the disorder imposed by friction and heat loss only moves in one direction. A similar sort of financial entropy has built up in our system, as fiat credit can only move in one direction (higher) without the whole highly leveraged system collapsing.”4
Bitcoin stands in stark contrast. It settles scarce value at the speed of light, with no settlement gap at all.
Bitcoin also decisively flushes entropy from its system every 10 minutes, such as any attempted fraudulent double-spend or credit-type transactions, when the network comes to consensus about the state of the ledger. A good example actually happened this week at block height 809478, when a miner mined a block that contained an invalidly ordered transaction (trying to spend funds from a transaction that hadn’t been processed yet), and Bitcoin node operators swiftly rejected it. This caused engineer Jameson Lopp to observe: “Bitcoin is an impenetrable fortress of validation. No double-spending allowed!”
As a system Bitcoin is stable, while fiat currency systems inherently are not.
Yes, the price of bitcoin is volatile compared to the U.S. dollar (for now), but despite that volatility bitcoin already is less price-volatile than some of the world’s other fiat currencies.
Three other properties of Bitcoin are worth noting in a monetary context:
- First, the supply of bitcoin today grows at less than 1.8% annually, which approximates the annual inflation rate of gold—i.e., the amount of new gold mined every year is approximately 1.6% of the total already in existence. In April 2024, the Bitcoin supply growth rate will programmatically fall by half, to below 0.9%, and then it will fall by half again to approximately 0.4% in 2028, and so forth every ~four years. In other words, while bitcoin’s inflation rate today approximates that of the hardest money used in human history (gold), 7 months from now bitcoin will become the hardest money ever used by humankind.
- Second, unlike every other form of money used in human history, growth in the value of bitcoin doesn’t cause more bitcoin to be produced. Growth in the value of gold causes people to mine more gold, and growth in the value of oil causes people to drill for more oil. But growth in bitcoin’s price ONLY makes the network more secure, thanks to one of Satoshi’s creations to enforce scarcity by ensuring that no more than 21m bitcoins will ever be mined: the difficulty adjustment. Hold that thought; we’ll revisit it shortly.
- Third, bitcoin to some users is “freedom money” because it cannot be confiscated. Any individual on the planet can store the fruits of their labor in censorship-resistant, globally portable, scarce money by memorizing a 12-word seed phrase. Someone living in an oppressive regime can simply memorize that 12-word seed phrase and then escape to a regime that respects property rights, restore their bitcoins from the 12-word seed phrase, and begin their life anew.
Let’s next dive deeper into the engineering of Bitcoin to understand how Bitcoin accomplishes all this.
B. Nakamoto Consensus: Proof of Work, Longest-Chain Rule, and the Difficulty Adjustment
Nick Szabo coined the term “unforgeable costliness” to describe what secures Bitcoin. This is an apt term because bitcoins are indeed costly to produce—and this costliness, which cannot be forged, is a fundamental feature that gives Bitcoin its security. One way to think about Bitcoin is as a decentralized database with a changelog that cannot be forged because it’s too expensive to forge it. Without this unforgeable costliness, humankind would not be capable of moving scarce value—emphasis on scarce—at the speed of light and thereby solving the monetary problems we just discussed.
Bitcoin is costly to produce, both in computational resources and the consumption of energy. Both factor into Bitcoin’s consensus mechanism, which is frequently called “Nakamoto Consensus,” and which consists of proof-of-work plus the so-called “longest-chain rule.” Indeed, the longest-chain rule enabled Bitcoin to succeed where previous attempts to create cryptocurrencies using proof-of-work alone failed.
But Nakamoto Consensus requires the use of energy, and Bitcoin’s use of energy is one of its most controversial characteristics. Why does Bitcoin use so much energy? After all, aren’t there multiple ways to create Byzantine fault tolerant (BFT) consensus mechanisms in distributed systems, not all of which require a substantial expenditure of energy? Indeed, and some cryptocurrency protocols have moved away from energy intensive proof-of-work (most famously, Ethereum moved to proof-of-stake last year).
But Byzantine fault tolerance alone is insufficient to guarantee security; proof-of-work plus the longest-chain rule are necessary to guarantee security, and proof-of-work requires energy.
The longest-chain rule guarantees that any participant’s node may join or re-join the Bitcoin network at will and always be able to catch up to the consensus ledger without relying on any centralized authority to tell it which is the consensus ledger. That is another fundamental difference between Bitcoin and pretty much all other cryptocurrencies: Bitcoin is truly decentralized because Nakamoto Consensus allows each node to determine on its own which is the longest chain (namely, the chain with the greatest cumulative proof-of-work difficulty), and to “catch up” on its own when it joins or re-joins the network. That is not true of partially decentralized systems, such as proof-of-stake, which rely on a trusted arbiter to varying degrees and thus tend toward centralization and the greater risk of being co-opted by elites.
Whether Bitcoin’s consumption of energy resources for proof-of-work exceeds or falls short of the amount necessary to provide sufficient security and decentralization is a topic for another day. The key takeaway is that Bitcoin’s energy consumption is not wasted because users are voluntarily paying for that level of security and decentralization, every minute of every day. “If people find that electricity is worth paying for, the electricity has not been wasted, ” as economist Saifedean Ammous observed.
To establish trust today in the traditional financial system, we use an army of controllers, auditors, accountants, trustees, lawyers, transfer agents, registrars, county clerks, custodians, regulators, and myriad other forms of third-party validators, and sometimes we throw in a central counterparty to stand in between, and then we duplicate and reconcile the very same data across each of these parties. A foreign exchange transaction will likely flow through six different banks or central banks before it is finally settled, for example, which means that very same transaction data would hit six different data centers. It’s a tremendously inefficient and resource-intensive way to create trust.
But few people think twice about the consumption of electricity to secure the banking system or a country’s defense. Yet, when we look at electricity usage by the banking system and by governments, it turns out they’re by far the biggest users of electricity. Dan Held took a crack at estimating the total cost of all those various pieces through which the banking system tries to establish trust, as well as the total power used by governments, in his 2018 paper, “PoW Is Efficient:”
- Banking system uses 2,340m gigajoules
- Governments use 5,861m gigajoules
Bitcoin uses 436m gigajoules, using a September 26, 2023 update converted to gigajoules.
Here’s another comparison: the Bitcoin network today consumes about 8% of the power consumed by our always-on electronic devices.
To estimate Bitcoin’s future power usage, engineer Lyn Alden built a projection model. In one scenario in which Bitcoin has a $5-10 trillion network value, hundreds of millions of users and a per-coin price of $250k to $500k, Bitcoin’s electricity use would represent 0.3% to 0.5% of global energy usage, up from less than 0.1% today. And in an upside scenario, with a network value of $20 trillion or more, billions of users and a per-coin price of $1 million, Bitcoin would represent 0.6% to 1.0% of global energy usage. At that point, she surmises, Bitcoin would be big enough to replace a material quantity of the energy used by the global banking system. In that upside scenario of billions of Bitcoin users, it would consume roughly the same amount of energy as the aluminum industry consumes today.5
But Satoshi designed a balancing feature into Bitcoin that indirectly adjusts up or down its energy use. Called the “difficulty adjustment,” it programmatically adjusts up or down the computation necessary to complete Bitcoin’s proof-of-work. Bitcoin’s difficulty is a measure of how difficult it is to “mine” a Bitcoin block by winning the race to generate a fixed-length code (known as a hash). Every 2,016 blocks (approximately 2 weeks), the Bitcoin protocol programmatically adjusts mining difficulty to ensure that Bitcoin blocks are discovered every 10 minutes on average. When more hashpower joins the network and Bitcoin blocks are produced more frequently than every 10 minutes on average, the protocol adjusts difficulty upward at the next adjustment to keep the average block time at 10 minutes; and vice versa.
The difficulty adjustment is a critical part of the beautiful balance of Bitcoin’s system design, because it helps rate-limit the energy usage based on the real demand for network security and decentralization. It also affects Bitcoin’s use as a monetary system. In the words of economist Saifedean Ammous, “Difficulty adjustment is the most reliable technology for making hard money and limiting the stock-to-flow ratio from rising, and it makes Bitcoin fundamentally different from every other money.”
In certain areas of the digital realm, we want interactions to be frictionless; but in others—especially when securing a ledger of scarce and highly valuable digital property—we need friction to guarantee security, scarcity, and incorruptibility. For Bitcoin, Nakamoto Consensus provides that friction; someone expended energy to produce every single bitcoin that exists. Energy use is a key part of what makes Bitcoin secure, and the fact that people choose of their own free will to pay for it shows it is not wasted.
Next, let’s turn to a discussion of the impact of bitcoin on power grids.
II. Bitcoin As A Risk Management Tool For Balancing Power Grids
When defining bitcoin “mining” earlier, I used air quotes because the term is a misnomer. A better term, again crediting Lyn Alden, is “interruptible data processing.” Why? Because bitcoin miners can shut off their machines without hurting the Bitcoin network when power prices spike. This helps grid operators balance both temporary fluctuations in demand and supply as well as the intermittency of supply inherent to renewables. Bitcoin miners are not only the ideal candidate for demand response programs run by grid operators to ensure that critical services like hospitals and first responders keep power during supply shocks, but they are also helping grid operators justify developing new green energy projects because bitcoin miners help grid operators handle the intermittent supply.
As Nic Carter and Shaun Connell explain it, “What the miners do is provide a load resource which eagerly gobbles up negatively priced or cheap power (everything on the left side of [a power price distribution] chart), while interrupting itself during those right-tail events [such as a winter storm or a heat spell that causes power prices to spike temporarily].” And it’s not just theoretical: during a winter storm that hit Texas last year, Bitcoin miners “returned up to 1,500 megawatts to the grid, enough to heat over 1.5 million homes or keep 300 large hospitals fully operational,” according to Dennis Porter of Satoshi Action Fund, citing Texas Blockchain Council member data collected by Lee Bratcher.
Bitcoin miners have strong economic incentives to search out cheap power since bitcoin mining is a thin-margin, cyclical business, which is why they are known as the “buyer of last resort for all electricity.” We see that here in Wyoming, with bitcoin miners powered by gas that oil producers would otherwise have flared. As Nic Carter explains: “[The Bitcoin network casts a] global energy net [that] liberates stranded assets and makes new ones viable. Imagine a 3D topographic map of the world with cheap energy hotspots being lower and expensive energy being higher. I imagine Bitcoin mining being akin to a glass of water poured over the surface, settling in the nooks and crannies, and smoothing it out.”
In 2021 a midwestern utility itself began to mine bitcoin as a means by which to avoid ramping down production from its “peaker” power plants when demand is low and ramping up again when demand is high—which, counterintuitively, wastes energy and stresses the plants. The key is that it takes more energy to fire up a power plant than to keep it running on low output, which is why energy companies themselves are starting to mine or strategically partner with bitcoin miners. When I first saw this news in 2021, it struck me how these arrangements can be win-win-win—for the bitcoin miner and the power producer, as well as for the utility’s end consumers—and that this is the beginning of a trend of vertical integration of bitcoin mining into the energy industry. Nic Carter agrees: “Bitcoin mining is converging with the energy sector with amazing rapidity, yielding an explosion of innovation that will both decarbonize bitcoin in the medium term, and will dramatically benefit increasingly renewable grids.” This convergence is attracting some of the best engineering talent, including hyper-scale data center engineers, to the bitcoin mining industry. I’m fortunate to have had a seat in the arena to watch the professionalization of bitcoin mining and to witness miners deploying load-balancing software that optimizes their power costs—including balancing out the intermittency of renewables.
III. CONCLUSION
I can’t close this speech without paying homage to the engineer who had the greatest impact on my life—my late father, Francis Long. He was an electrical engineering professor here at UW for nearly 40 years. Oh boy, do I wish he were alive to talk Bitcoin! The grid balancing characteristic would have been of special interest to him, since one of his early professional achievements was helping the City of Seoul rebuild its electrical grid after the Korean War. After serving in the U.S. Army Corps of Engineers he stayed in Seoul after the war, and as special recognition for his work the utility awarded him the ring I’m wearing in his memory today.
And last, special thanks go to UW. In 2018, its Computer Science Department partnered with a few of us Wyoming Blockchain Coalition folks to create the first-ever hackathon in Wyoming. Now in its 6th year and overseen by Steve Lupien, the event brings hundreds of software developers and company sponsors to UW’s campus every year—and one or more billionaires have attended each year. This event is a win-win-win for UW, Wyoming, and the blockchain industry. It has helped put UW on the map globally, helped spur UW to become the first U.S. university to offer its students a minor in blockchain, and has raised $3.1m for UW in its 6 years—which, for UW, is meaningful size. The hackathon punches far, far above its weight class in prize money available for competitors, thanks to UW generously providing the venue at cost.
The whole effort at UW is now interdisciplinary, just like Satoshi’s beautiful interdisciplinary invention. But at the core of it is engineering.
And with that I’ll close with a final observation from engineer Michael Saylor: “Humanity advances by engineering – civil, chemical, biomedical, metallurgical, mechanical, nautical, electrical, aeronautical, astronautical and now monetary. #Bitcoin”
- Alden, Lyn. Broken Money. Timestamp Press, 2023, p. 300. ↩︎
- Alden, Lyn. Broken Money. Timestamp Press, 2023, p. 301. ↩︎
- Alden, Lyn. Broken Money. Timestamp Press, 2023, pp. 301-302. ↩︎
- Alden, Lyn. Broken Money. Timestamp Press, 2023, p. 292. ↩︎
- Alden, Lyn. Broken Money. Timestamp Press, 2023, pp. 385-389. ↩︎
Founder/CEO Custodia Bank. #bitcoin since 2012. 22-yr Wall St veteran. Not advice; not views of Custodia Bank!
Disclaimer
This web site is limited to the dissemination of general information, investment-related information, publications, and links.
Please consult important additional information and qualifications HERE.
View Privacy Policy and Terms of Use
Connect with me on Social Media
Search Posts
Categories
Recent Posts
- The Engineering of Bitcoin October 1, 2023
- Here Come The Fintech Banks!! July 21, 2023
- Why Defending The Right of States to Charter Banks Without Federal Permission Is Critical April 17, 2023
- Why Can’t We Just Have Safe, Boring Banks? March 21, 2023
- Shame On Washington, DC For Shooting A Messenger Who Warned of Crypto Debacle February 17, 2023