What is Bitcoin, and how does it work?
The concept of Bitcoin first came into existence in 2008 via a white paper written by a pseudonymous entity. In 2009, Bitcoin (BTC) went live on the web. The asset functioned more as a currency in its early days, gaining popularity and use through the years.
Though it started out virtually worthless in U.S. dollar terms, Bitcoin’s price rose through time to eventually be worth more than $50,000 per coin. The asset is now often viewed in the crypto industry as more as a vehicle of wealth storage than a currency.
Bitcoin runs on its own blockchain. When describing how the Bitcoin network functions, it is important to note that the system was created to solve a very particular set of problems around the role of trust in online trade. Before going into the details of how Bitcoin operates, one must first understand what may seem to be an underwhelming topic: accounting.
Ledgers in commerce
With the birth of commerce in society came the challenge of securing trust among buyers and sellers. How does Alice trust that Bob will follow through on an agreed transaction? The basic answer is through a ledger, a document that records transactions among various parties such that they can maintain a state of trade — who has how much and when?
For many years, single-entry ledgers were the norm. Each individual or household would maintain their own ledger of credits and debits. This system was highly prone to error or fraud because the responsibility of keeping the books fell solely on each person, and people are fallible.
Double-entry bookkeeping, often considered an innovation of the powerful Medici family in 14th century Florence, expanded on the system by creating a two-way connection between transacting entities and their respective ledgers. In a double-entry system, people share a common method of recording and auditing their debits and credits at any point in time.
The double entry refers to the two recorded fields for each entry: what is owned (assets) and what is owed (liabilities). Because each column on this balance sheet should be equal at all times, counterparties can audit the system and spot discrepancies resulting from simple mistakes or even fraud.
Fast forward to the current age of electronic banking: Double-entry is now the norm with banks and payment providers, as they provide the shared infrastructure for counterparties to transact with one another. A central authority also prevents double-spending (spending the same money in two different instances) because it can roll back payments should a dispute arise.
In the early 2000s, financial cryptographer Ian Grigg proposed the concept of triple-entry accounting as a solution for securing trade in digital commerce and issuing new digital assets such as money, stocks, bonds, etc.
In this framework, there would exist a neutral mechanism shared by Alice and Bob that would also digitally sign and record their transactions, producing a chain of verifiable transaction data around a particular contract. In effect, a digital asset would be a cryptographic receipt that references an accumulated chain of digital signatures. Sound familiar?
This framework faced a longstanding problem shared by past digital currency endeavors in that it relied on trusted third parties to administer the system. While a central authority can effectively counter double-spending, there would always be a single point of failure: the central authority.
A peer-to-peer electronic cash system
Bitcoin at its most basic is an autonomous public key cryptosystem that facilitates the exchange of digital value among peers via a sequence of digitally signed transactions rather than messages. The basic process flow of a Bitcoin transaction is identical to that of a sequence of encrypted messages that can be found in a schematic of public key cryptography and digital signatures. As Satoshi Nakamoto, the creator of Bitcoin, says in its white paper, “An electronic coin is a chain of digital signatures.”
This represents the basic means of issuing a digital currency, which numerous experiments have used since the eighties, in some variation or another.
Recall that the core failure of these early digital cash systems was the reliance on trusted third parties within the system in order to manage the central mint and prevent double-spending. In order to create a truly peer-to-peer, or P2P, transaction system, Satoshi had to devise a way to solve the double-spend problem in a manner that didn’t rely on trusted authorities operating centralized servers. This is where things get interesting...
Satoshi realized that for a P2P transaction system to work, all transactions must be publicly auditable via a shared database, or ledger, containing the history of all previous transactions.
Satoshi’s solution: a P2P distributed “timestamp server” shared in common throughout the network. This timestamp server works by continuously hashing blocks of information (messages, transactions, etc.), which are timestamped and published widely to the network. Each timestamp of a block references the hash of the previous block, creating a chain of cryptographically secure, verifiable data that is more secure with each subsequent block. This distributed timestamp server as described by Satoshi has come to be known popularly as “blockchain.”
Traditionally, the timestamp server would be a centralized system maintained by a trusted authority in the form of a bank or some other enterprise. This is where past digital currency efforts like eCash and E-gold ultimately failed. Even if a company uses the best, most secure technology available, there is always the risk of insider fraud. So, how do we secure a distributed timestamp server throughout a network of peers? This is where Satoshi’s innovation comes into play.
Proof-of-work mining and Nakamoto consensus
For this P2P transaction system to remain secure against malicious attacks and faulty nodes, there needs to be a method to counter Sybil attacks (when one entity fabricates many identities to compromise a network) and ensure consensus as nodes freely join and leave the network. To mitigate these risks, Satoshi implemented a proof-of-work, or PoW, system inspired by Adam Back’s Hashcash, which was also applied within Bitcoin precursors B-money and Bit Gold but with notable differences.
This process by which the network continuously validates broadcasted transactions and records them in the distributed ledger in the form of linked “blocks” of transaction data, producing a cryptographically secure, verifiable history of transactions over time, has since become known as mining, as this is how new Bitcoin is minted and put into circulation.
This is where Bitcoin’s design diverges from previous iterations of digital cash. While former proof-of-work tokens were issued and valued based on the work done to produce them or some other set of rules, the Bitcoin protocol rewards miners that solve a proof-of-work with a predetermined amount of Bitcoin in predetermined intervals, resulting in an autonomous, automated mint for BTC, whose value is intrinsic to the system rather than in relation to some other metric or resource.
The time, energy and resources put into securing the network and validating transactions is rewarded with the protocol currency and accumulated transaction fees, providing an economic incentive for miners to remain good actors despite particular groups possibly obtaining a majority of the hashing power and thus becoming capable of compromising the entire network.
Not only did Satoshi use the proof-of-work algorithm as a mechanism for issuing a currency, they also used it as a consensus mechanism, as the longest chain of confirmed blocks is always the leader. This has since become known as Nakamoto consensus.
This is the overall process flow for the Bitcoin network. Aside from the highly unlikely scenario of a widespread, globally coordinated effort to shut down and/or seize every single node around the world, this process will continue for years to come.
UTXOs: The anatomy of a Bitcoin transaction
“What is a Bitcoin?” This question seems simple enough given what was covered so far, yet it is not all that obvious on the surface. What is this asset we are transacting across this P2P global financial network? When looking at the BTC balance in a digital wallet, what does that number represent?
As we’ve established, the means by which the Bitcoin network facilitates the transfer of value is not as simple as Alice sending a single transaction to Bob’s account with a central server updating their respective balances. By looking under the hood, one can see what Bitcoin actually is...
The Bitcoin total visible in one’s public key address, or wallet, actually consists of multiple unspent transaction outputs, or UTXOs, of previous transactions received in the past that can be spent in the future. Recall Satoshi’s basic definition of an electronic currency as a “chain of digital signatures.” The amount of Bitcoin visible and accessible at a certain address is the sum total of the combined value of multiple chains of ownership implemented via digitally signed transactions.
UTXOs can be compared to pocket money, with various units of value — dollars, quarters, dimes, nickels, pennies, etc. — comprising the whole. Similarly, when one makes a Bitcoin transaction, these outputs become inputs of a new transaction signed off by the sender. By the time the transaction has been confirmed, the sender will receive “change” in the form of additional UTXOs to settle the balance (minus the transaction fees that incentivize miners to validate the transaction into the next block). Aside from the network fees and the lack of preset units of value, Bitcoin UTXOs are quite analogous to physical cash and coins. In short, UTXOs are an abstraction of electronic money.
The UTXO design of Bitcoin transactions is an implementation of Grigg’s triple-entry accounting in a proper peer-to-peer context, with the blockchain serving as the neutral mechanism of recording chains of ownership for the digital asset.
There are drawbacks to the UTXO model. For one, the inability of a user to adjust their UTXO set outside of a transaction context allows for more traceability of the chain of ownership. While the addresses are represented as public key addresses, blockchain analytics has advanced enough to effectively map the flow of transactions around an address, possibly linking its ownership to a particular service account or other identity
Second, data efficiency can become an issue, as the UTXO set becomes larger and larger as the size of the blockchain increases. Much of the development work around making Bitcoin transactions more efficient involves the optimization of UTXOs.
Bitcoin’s monetary policy
Much of the discourse around Bitcoin portrays it as a revolutionary technology attempting to separate money and state. However, if looking at the history of money, Bitcoin is also evolutionary. Money has always been a technological and social phenomenon crafted by and for people, so it makes sense that in a worldwide cultural trend of increasing digitization, money would eventually receive some systemic upgrade. In discussing Bitcoin’s novel monetary policy, it’s important to understand how and why the legacy monetary system operates as it does before examining Satoshi’s solution.
Current monetary systems are “fiat” systems, which means they are backed by the sovereign entity of the state through arbitrary decree. Such currencies have value because the state enforces their use as a medium of exchange, store of value and unit of account — the three qualities of money. The most obvious evidence of this enforcement is that the state requires taxes be paid in the national currency.
This relationship between state authorities and money goes back hundreds of years to when governments and empires stamped the visage of the current ruler of the territory into the hard metal currency. Today, fiat money takes the form of printed pieces of paper issued by a central mint overseen by a state department. This money is backed by the state rather than by any commodity.
The United States used to operate on a gold standard, with banknotes backed and redeemable for precious metal reserves, but the capital flight to a secure store of value in the form of gold during the Great Depression prompted the government to untether the dollar from its underlying commodity.
Gold was not without its limitations, however. The systemic challenges of a monetary system based on gold would have inevitably led to the state further abstracting the connection to the underlying resource to the point where the scaffolding would have become the building, in a sense. Fiat currency can be seen as a technical response in simplifying the management of money at great scale.
Since the government is able to print pieces of paper backed by nothing but the power afforded to it by it, people place a lot of trust and responsibility in the government to properly oversee the mint and avoid economic instability. If a government prints too much money, inflation occurs, sharply devaluing the value of the money in the economy.
Some governments have severely mismanaged the money supply, leading to hyperinflation. It’s not uncommon in such situations of volatility for the price of the dollar to swing up and down in price by exponential amounts, with the currency becoming more valuable as kindling or paper mache than a reliable medium of exchange.
Does this make the state a boogeyman that chains the populace into arbitrary financial systems that they can’t opt out of? There are certainly many proponents of Bitcoin who would support that claim, but one should look at the larger pattern. The reason why state-managed currencies gained prominence is that people agreed to the unwritten social contract behind the money, entrusting the state to manage the complexities of such a system. This issue of trust is paramount and is essential to understanding Bitcoin’s role in the story of money.
Pseudonymous cryptocurrency researcher Hasu has written on Bitcoin’s social contract, with the insight that Satoshi’s novelty was in the coupling of an automated, updated social contract with a protocol layer that effectively enforces it. In his essay, Hasu highlights the four core rules of this updated contract of money, as articulated by Eric Lombrozo:
- Only the owner of a coin can produce the signature to spend it (confiscation resistance)
- Anyone can transact and store value in Bitcoin without permission (censorship resistance)
- There will only be 21 million Bitcoin, issued on a predictable schedule (inflation resistance)
- All users should be able to verify the rules of Bitcoin (counterfeit resistance)
In this system, the vulnerabilities that abound in previous money systems are mitigated through a predictable, globally accessible software protocol that distributes trust and power outside of a single institution and into an open network of participants. This radical experiment in monetary policy and value exchange is ongoing, so we will see if this social contract and the technology that enforces it can endure the challenges that have beset systems past and present.
Unique properties of Bitcoin
As may have been noticed throughout the reading of this guide, Bitcoin is not a singular thing. It is a multifaceted system that can be viewed from various angles: computer science, distributed computing, finance, money, record-keeping, etc. In the following, the unique characteristics of the Bitcoin network will be explored, along with the design philosophy behind them and the challenges facing the network to maintain these properties.
Bitcoin newcomers may be confused by the distinction between the Bitcoin network and the Bitcoin currency. After all, the initial use case of the Bitcoin blockchain was to facilitate a digital cash system, and it is this application, in particular, that has become a global phenomenon. While they are inextricably linked by design, it can help provide a more comprehensive, whole-systems perspective to distinguish the two.
The Bitcoin network is an open-source, multistakeholder system that maintains and facilitates a global settlement layer and accounting system for borderless, peer-to-peer transactions. The stakeholders consist of miners, developers, merchants/companies and users all working in concert to provide security and up-time to the network, improve the protocol, build services on the network, and ultimately, use the network.
Miners are nodes that validate transactions broadcasted to the network and record them onto a distributed ledger of transaction data that is cryptographically secure and verifiable. This computationally expensive process not only secures the network from various attacks but also serves as the minting process of the Bitcoin currency in the form of block rewards.
Bitcoin Core is an open-source software project developed by numerous teams and individuals around the world. Some of these developers are paid members of established teams, while others contribute freely to the protocol. The Bitcoin Core development process mirrors the Request for Comments proposal system that built the protocols that comprise the internet today. Anyone can submit a Bitcoin Improvement Proposal and receive feedback from the open-source community. If there is clear social consensus that a proposal should be implemented, the developers will update the software accordingly at a future date.
Just as a host of companies have been built atop the bundle of protocols we call the internet over the years, many companies have formed to provide services to Bitcoin’s users. These services can range from wallets that allow users to transact Bitcoin through an intuitive user interface, exchanges that allow users to trade Bitcoin between fiat and other cryptocurrencies, Bitcoin-based escrow systems for P2P commerce, to secure document timestamping, and more. Businesses that utilize Bitcoin in their technical stack often face unique challenges and risks not shared by traditional tech ventures, such as asset custody, non-repudiation, data immutability and more.
Users comprise the above and everyone else, from the most die-hard cypherpunk hodler, to the day trader, to the newcomer simply wanting to see what all the fuss is about. All of these players are integral to the success of Bitcoin; therefore, it is critical that the incentives are aligned throughout the ecosystem. A cryptocurrency is incredibly useful in this regard.
Part of the innovation of Bitcoin is that it is a financial infrastructure in the form of globally accessible commons built, maintained and used by a network of peers. The economic incentives inherent in the system by virtue of it also being an autonomous network that mints the Bitcoin digital currency allow it to evolve and persist into the future
When talking about decentralization in the context of Bitcoin and other crypto/blockchain networks, this is not a singular concept. In many ways, it is simply the abstraction of an ideal state of affairs: a future in which the critical systems that sustain our lives, such as the current financial system, are not maintained by trusted administrators but by a resilient, capable network of peers. To many, it is the whole point of systems like Bitcoin and other blockchains — its raison d’etre.
Despite the abstract nature of the term, decentralization has become a core part of the messaging in the cryptocurrency industry and is often one of the first things a newcomer encounters when they explore the space. Yet, ironically or appropriately, there is lack of clarity and consensus regarding what the term actually means, in vision and practice. For the purposes of this guide, we’ll briefly unpack the complex notion and hopefully provide some useful context for the Bitcoin novice.
Firstly, it is important to establish that decentralization has both technical and social components, which can often be inextricably linked. For example, a thorough analysis of Bitcoin’s decentralization would have to assess the entire protocol stack, from top to bottom — the various subsystems within it, how the network adapts over time, the distribution of power among the various stakeholders, and the influence of external forces outside of the Bitcoin network like corporations and governments.
Evidence seems to indicate that Bitcoin is technically decentralized from a fundamental architecture point of view, given that the network has yet to be compromised since its inception. Socially, the network is quite resilient to overreaching internal or external influence. While many players have attempted to exert power or influence on the network for their own purposes, the system has remained credibly neutral and resilient throughout the years.
Externally, if any particular government or abbreviated agency really wanted to shut down the network, it would not be outside the realm of possibility to track the energy consumption of mining operations and outlaw the use of Bitcoin in commerce. Without a robust network of stewards to maintain the network and with the inability to use the currency as intended, the viability of it as a widely adopted monetary system would certainly be threatened. Yet despite the hypotheticals and the naysayers, Bitcoin has persisted. China has outlawed Bitcoin at least five times, yet a great percentage of the network’s hashing power originates from the country. According to 99Bitcoin’s curated list of Bitcoin obituaries, Bitcoin has died around 400 times.
There has yet to be a widely accepted model for quantifying the decentralization of these unique techno-social systems. In time, this will likely change not only for the benefit of having industry standards but also for defending Bitcoin and similar value networks from shifting regulatory frameworks. Whether in acknowledgment of or in spite of the regulatory structures of the world, the ongoing decentralization of Bitcoin is critical for it to persist in any meaningful way.
To create a peer-to-peer transaction system that does not rely on trusted third parties, Satoshi realized that nonrepudiable — i.e., nonreversible — payments had to be a core feature of the protocol. While such features are part of the established financial system in order to handle disputes between parties or resolve human or technical errors, the capability to edit a transaction record on the administrative side will inevitably be exploited. For a digital currency system without central authorities to be viable and resistant to confiscation, censorship and forgery, it must be immutable.
Bitcoin achieves this immutability using the ongoing proof-of-work consensus process. Once a transaction is processed by miners and appended to the blockchain data structure, every subsequent block reinforces the certainty and validity of that transaction by exponential orders of magnitude.
In an interview with Tim Ferriss, cryptocurrency pioneer Nick Szabo compares this process to “a fly trapped in amber” — the fly being the transaction and the amber being the accumulated proof-of-work. This relationship between time and transactional certainty is an important element to Bitcoin. While a new block is validated roughly every 10 minutes, it is considered in good practice to wait up to six additional block times for full confirmation of a transaction. This is also known as “finality.”
“When we can secure the most important functionality of a financial network by computer science rather than by the traditional accountants, regulators, investigators, police, and lawyers, we go from a system that is manual, local, and of inconsistent security to one that is automated, global, and much more secure.”
— Nick Szabo, “Money, Blockchains, and Social Scalability”
Security is essential for large-scale information and communication systems. The internet was originally conceived to be a communications network capable of withstanding nuclear war. While the geopolitical context and core intentions are quite different, Bitcoin was also designed to operate in an adversarial, unstable environment.
The network’s security model was inspired by decades of research and development around securing the integrity and uptime of distributed systems. Truly peer-to-peer computer systems present unique challenges and risks in this area because there are no central administrators that can be trusted to right the ship. Robust security is incredibly important for the Bitcoin network because it facilitates an entire monetary system with immense value at stake.
Bitcoin’s proof-of-work consensus system safeguards the network from Sybil attacks (the creation of numerous fake accounts to swarm and overwhelm the network) and intermittent or faulty nodes (from power outages or poor maintenance), resulting in a Byzantine fault-tolerant system.
Byzantine fault tolerance is the capacity of a distributed system to maintain consensus with imperfect information, partial network failure or even malicious agents. The term is a reference to the scenario articulated by Leslie Lamport, Robert Shostak and Marshall Pease in their influential paper “The Byzantine Generals Problem,” in which they use the example of a group of army generals coordinating in a battlefield environment with limited means of communication.
With imperfect information and situational awareness, how can the generals agree and execute on a shared strategy or even trust that another general will not turn traitor and single-handedly turn the tide of battle? Their conclusion: As long as at least two-thirds of the generals are loyal, the effort will not be self-defeating.
As discussed previously, Bitcoin’s decentralization is made possible by a clever alignment of incentives between the network’s stakeholders: miners, developers, merchants and users. Simply put, any concerted attempt to capture the network or reorganize the chain would result in the value of the currency plummeting, thus rendering any intended benefit completely worthless.
The cost of being a bad actor significantly outweighs any possible reward. Thus, it is in every participant’s best interest to simply play by the rules and collectively work toward the maturation and adoption of the Bitcoin ecosystem.
Since its launch in January 2009, the Bitcoin network has never been compromised at the base layer and has had effectively 0% downtime, making it one of the most secure computer systems on the planet.
One of Bitcoin’s core characteristics is that it forgoes the account-based model of identifying participants in the network and substitutes it for a public key cryptosystem where entities are represented by cryptographic key pairs rather than assigned names. Bitcoin addresses are strings of 26 to 35 alphanumeric characters that begin in either 1, 3 or bc1. While there are services that allow users to map names to their public key addresses to make them more user-friendly, the default user experience of Bitcoin involves interacting with these cryptographic key pairs.
Cryptographic keys are essential to privacy online and have been a fundamental building block of privacy-preserving systems ranging from digital cash, to email, to routing protocols such as Tor. They are omnipresent throughout the numerous information and communication technologies that permeate our lives, but many systems abstract the experience with the keys managed and coordinated by trusted third parties rather than directly by users.
This emphasis on cryptographic keys as a primitive for private communications and transactions online was heavily influenced by the cypherpunks. Timothy May’s manifesto, in particular, highlights the revolutionary capacity of giving individuals the ability to anonymously transact with and message each other on communications networks with digital signatures being the sole method of verification — no identities needed.
In the context of Bitcoin, cryptographic key pairs are not simply a substitute for identity but also an asset in and of themselves. Commonly referred to as wallets, as they allow one to send and receive Bitcoin between other public key addresses, these keys are digital bearer assets that grant the holder sole ownership of the underlying assets. As the motto goes: “Not your keys, not your crypto.” One of Bitcoin’s most revolutionary qualities is the realization of true ownership and management of one’s assets without relying on custodial services provided by trusted third parties.
But how does Bitcoin’s privacy model fares against modern-day solutions? While Bitcoin’s privacy has been one of the currency’s defining traits over the years and a frequent point of friction with regulators, data analytics of blockchains has advanced enough that casual use of Bitcoin has effectively become de-anonymized.
Because all transaction data is publicly available, applying sophisticated analytics techniques to a transaction graph can link public key addresses to various external accounts, including exchanges and other fiat on/off-ramps. Solutions for securing anonymity, such as cryptocurrency mixers, can help obfuscate the transaction flow and prevent linkage to external accounts and real-world identities, but these tools have begun to face active government shutdown. Much of the Bitcoin protocol’s forward development is focused on reinforcing its privacy features.
The Bitcoin newcomer may be thrown off guard by Bitcoin’s qualities as both a (mostly) privacy-preserving system and a transparent one. Aren’t these two characteristics mutually exclusive? Not necessarily. In fact, it is the equilibrium of these two qualities that makes Bitcoin and blockchain particularly effective and useful as an open financial system.
We’ve established that Bitcoin’s privacy model is founded by substituting names and accounts with cryptographic key pairs. These key pairs are the tools by which users transact with one another securely on the network via digital signatures. If we don’t know the identity of those we’re transacting with, then how do we trust that the record is true?
With blockchain, these transaction flows and the chains of ownership of these valuable bits are preserved in a shared ledger of cryptographically verifiable, secure data. The combination of a mutual ledger of secure yet open data and a consensus system that allows the peers on the network to continuously agree on the valid state of this ledger results in one of blockchain’s core value propositions: data verification.
If all the peers on the network share a transaction record going back to the genesis block and the cost of reverting previously timestamped transactions outweighs any benefits by an exponential degree, then participants in the Bitcoin network can trust the validity of the ledger rather than each other or a trusted third party.
While there is much emphasis on financial transactions on the Bitcoin network for obvious reasons, the blockchain has proven quite useful for other applications as well. The first nonfinancial application of the Bitcoin blockchain was proof-of-existence, a method of using the Bitcoin blockchain to timestamp documents and other digital files by associating the hash of a piece of data with an owner’s private key, denoting ownership, agreement or consent around a certain action or bit of information.
The use cases range from the documentation and enforcement of legal contracts, to the provenance of data surrounding a digital or physical asset, to the implementation of a global, automated notary public.
When we talk about Bitcoin’s speed, there is an important distinction to make. Are we talking about the number of transactions Bitcoin can process over a certain amount of time or the amount of time required to process a single transaction? These are related but distinct observations in assessing the value proposition of Bitcoin in relation to time.
A common measurement for quantifying a cryptocurrency’s speed and scalability is transactions per second. At the time of writing this guide, the Bitcoin network averages merely 4 tx/s, an incredibly small sum that pales in comparison to Visa’s roughly 1,700 tx/s. The discourse around Bitcoin’s scalability and viability as digital cash tends to refer to this number.
On the other hand, how long does it take for Alice to send Bitcoin to Bob? While this depends on the amount in transaction fees paid by Alice to incentivize priority validation by miners, the average block time is roughly 10 minutes, with transaction finality certain after 6 blocks, or 60 minutes.
While there is much room for improvement in Bitcoin’s transaction throughput and confirmation times, it is important to keep in mind that these are peer-to-peer transactions executed and secured by a global network operating beyond borders. This is key to understanding Bitcoin’s value proposition. While it is currently lacking in raw speed, Bitcoin foregoes the central clearinghouses necessary for processing Visa and ACH bank transfers in favor of an ultra-secure global settlement layer. Within an hour, millions of dollars in value can be sent across the world and verified with minimal fees and without the use of trusted third parties.
In the short to medium term, maturing layer-two scaling solutions like Lightning will provide a trust-minimized means for conducting high-frequency Bitcoin transactions off-chain with the security of the Bitcoin blockchain.