Despite serving as the backbone of the Bitcoin ecosystem, the “mining” process remains one of the more challenging aspects of Bitcoin to grasp.
To be fair, the concept is not exactly an easy one. It involves intertwining several sophisticated subjects, each of which are difficult to explain standing alone. Still, its bedrock importance to the Bitcoin network makes it a worthy topic to explore. Reader beware (or be relieved): This is not an effort to explain the technical aspects of mining. Rather, it is more of an effort to explain the “why” of mining, and to understand the “pipes and the plumbing” only from a very high level.
After all, how familiar are you with the technical steps that brought you to this site from your computer or mobile device?
Perhaps you don’t question it because it simply works. And because you know why you want it to work. This post endeavors to explore why you might want Bitcoin – and the underlying mining process – to work.
So let’s make a start.
In a nutshell, Bitcoin mining is responsible for three things: (1) Securing the network against attack; (2) validating transactions; and (3) issuing currency. It accomplishes the first two tasks by preventing “double spending” on the network and guarding against other fraud-based attacks. The third task, issuing the currency, is part of the incentive system devised by the creator of Bitcoin, Satoshi Nakamoto, as a way to reward those who undertake the effort associated with carrying out the first two pivotal tasks.
So what is double spending, exactly?
Double spending, a form of counterfeiting, is detrimental to any economic system. The issuers of the money we use today – nation states and central banks – go to great lengths to prevent counterfeiting and mete out severe punishments against perpetrators. The reason for this is simple: Counterfeiting devalues the currency and shakes the users’ collective faith in it.
But Bitcoin purports to be a genuinely open and sovereign digital monetary ecosystem. One where there are no supreme third parties to monitor or secure the currency in the way governments and central banks do with our current money supply. Instead, Bitcoin relies on a purely voluntary process called “mining” to do the job. Before attempting to understand how mining works, it’s important to understand why it is necessary in the first place.
Why does Bitcoin need mining?
To address this question, it’s helpful to first consider the nature of electronic data generally. You probably don’t think about what occurs when you send someone any type of data over the Internet, like an e-mail or text message. But understanding the basics of that process is critical to understanding why Bitcoin needs mining.
Essentially, when you produce an electronic message, you attach any relevant data, click “Send,” and it instantly transfers to a designated recipient. In many ways, this action appears to largely mirror sending traditional mail through the postal service, except its digital qualities make it faster and cheaper to do. But in reality, the analogy is not as neat as it appears.
When you send e-mails or texts, you’re not actually sending a message. Rather, you’re sending a copy of a message while the original remains stored on your device or some server you’re accessing. And this works reasonably well for the purpose of communicating data that doesn’t need to be destroyed once sent. But this quirk, which is common to all digital information transfer, is fatal to a digital economic system like Bitcoin where one is attempting to transfer data that also serves as a representation of value.
Think about it. If users can simply copy a representation of value and transmit it to another, the value could hardly be considered transferred at all. Indeed, any so-called “digital value” based on our traditional internet transfer protocols is immediately rendered worthless because its supply has no limit.
The success of Bitcoin, therefore, depended upon solving the thorny problem of creating “digital scarcity” in a system that nobody controls, while using a medium that is geared to unending duplication of data.
Out of the Infinite: Digital Scarcity
For a long time, the way to work around the problem of infinite data in digital money systems was to appoint some central authority — typically a bank or a third-party company devoted to digital payments (like PayPal or Venmo) — to monitor and secure digital transactions by ensuring that on one end a transaction is debited from an account and on the other end an account is credited.
This works well enough if you’re okay with relying on central third parties, but it undermined the goal of a truly independent, autonomous, internet-based currency. To this end, Bitcoin mining offered a unique solution to a longstanding problem.
To better understand why it is worth adopting the labor intensive process of mining over the centralized third party model, we have to consider the underlying purpose of Bitcoin. If its sole purpose was merely to facilitate digital payments, the trouble of bringing Bitcoin into your life – along with all its inherent volatility and generally poor (though gradually improving) user experience – probably would not be worth it.
But a message Satoshi attached to the first Bitcoin block during the height of the Great Recession of 2008 offers a glimpse behind the veil of the true value proposition of the protocol:
“Chancellor on Brink of Second bailout for banks.”
In this brief message, Satoshi articulated Bitcoin’s offering to the world: It could be a sovereign, digital currency, wholly separate from the legacy system that so often lets the world down. One that is not linked to, controlled by, or dependent upon any national government, central bank, or corporation.
Put differently, Bitcoin can be described as the first currency in history that is of the people, by the people, and for the people.
Satoshi explained this concept in more detail through an early post describing Bitcoin:
“The root problem with conventional currency is all the trust that’s required to make it work. The central bank must be trusted not to debase the currency, but the history of fiat currencies is full of breaches of that trust. Banks must be trusted to hold our money and transfer it electronically, but they lend it out in waves of credit bubbles with barely a fraction in reserve. We have to trust them with our privacy, [and] trust them not to let identity thieves drain our accounts…”
How then, could Bitcoin achieve this break from legacy monetary systems and the disadvantages associated with trusting so many disparate and often unaccountable actors? Satoshi turned, in part, to the process of “mining.”
Think again to the double spending issue.
Satoshi needed to develop a process so that, unlike email and digital data transfer generally, the Bitcoin currency could not be copied. If he could not, the currency would prove worthless. And any time it arbitrarily gained any value, it would be repeatedly copied until that value was erased.
So, how did he do it?
The How of Bitcoin Mining
Bitcoin mining blends a series of prior cryptographic breakthroughs to create a system whereby any transaction on the protocol would require a certain amount of computing time and energy to verify. To accomplish, this the protocol requires each update to the ledger to be accompanied by what is effectively an elaborate puzzle solution. Satoshi selected military grade encryption algorithm, SHA-256, to create these elaborate puzzles.
He also designed the system so that every willing participant on the network could (and should) hold a copy of every transaction that ever occurred. Although this act of creating an unending log of transactions had no name at the time Bitcoin launched, today we know it as a blockchain.
Utilizing this method was the only way, to Satoshi’s mind, that a truly open and independent economic system could track transactions and prevent double-spending in the absence of a controlling party. Otherwise, a central authority would need to be appointed, which would rob Bitcoin of its independence, and subsequently, its value.
Combining the public transaction log (blockchain) with the SHA-256 update requirement served to make it economically and logistically infeasible to defraud the Bitcoin blockchain. Sure, it would be nice if Bitcoin could simply rely on the honesty of its participants, but humans are naturally self-interested creatures. They would find ways to alter the transaction log dishonestly and to their own benefit.
Satoshi understood that he could not do anything about natural self-interest, and instead chose to channel those impulses so that they might enhance the Bitcoin protocol rather than destroy it. So he introduced mining as a requirement that must be attached to every transaction log update, forever.
In order to successfully confirm a transaction on the network and update the log, mining requires the participants to go through a series of steps. Not only would they verify that the sender had their account debited and a corresponding amount was deposited with the recipient, but before doing so the transaction updater (miner) would also have to solve a cryptographic puzzle using the SHA-256 algorithm. Solving this puzzle takes time, energy, and computing power.
While this process may seem trivial, or perhaps even wasteful, requiring this solution before the transaction log could be updated meant that the miner would need to spend value (through time, energy, and computational power). This expenditure of value makes it economically costly to lie about the transaction. If another participant discovered the dishonesty, they could simply decline to follow the transaction update, and go about their own update, thus robbing the dishonest participant of the value they expended solving the mining puzzle.
In short, Bitcoin discourages rogue users from attacking the protocol through fraudulent spending by making it extremely expensive to lie, and very easy to be caught.
As an added protection, Satoshi designed the protocol so that when computers were solving puzzles too quickly (either because they became more advanced or because more participants were joining the network), the difficulty level of the puzzle would increase. Conversely, if puzzles were solved too slowly, the difficulty would decrease. The result being that blocks are added at a predictable rate (roughly every ten minutes), and the security of the network increases as more participants join.
This was a good start, but more was needed than just “the stick,” to incentivize honest behavior. Satoshi needed a carrot.
To accomplish this, Satoshi devised a reward system that would grant the successful miner (i.e. the one who solved the puzzle first and updated the transaction log) newly minted Bitcoin and transaction fees for securing the network and confirming the transactions. Beyond rewarding the miner for their efforts, this had the added effect of acting as an unbiased, predictable way to issue new currency into the ecosystem without relying on some central supreme currency issuer. Satoshi put it this way early on:
“[I]ndeed there is nobody to act as central bank or federal reserve to adjust the money supply as the population of users grows. That would have required a trusted party to determine the value, because I don’t know a way for software to know the real world value of things. If there was some clever way, or if we wanted to trust someone to actively manage the money supply to peg it to something, the rules could have been programmed for that.“
As we look around the world today and see nations and central banks manipulating their currencies in a frantic attempt to establish some sort of artificial monetary equilibrium, the wisdom of this decision by Satoshi to remove currency control from a human third party is becoming more apparent.
Thus, through the process of Bitcoin mining, Satoshi was able to prevent double-spending for the first time without any central authority controlling the ledger of transactions. On top of that, he also instituted a programmatic monetary policy and issuance rate that cannot be altered.
Marking what is arguably the first (and only) successful purely digital monetary system in history, mining finally removed the need for national governments and central banks to shepherd currency through complex and often shortsighted policy whims, opting instead to place the future of money in the unflinching hands of code and human self-interest.