Crypto

How Bitcoin Works: Blocks, Miners and the 21 Million Limit

Bitcoin is a shared ledger kept by thousands of computers, with no central operator. Here is how transactions are recorded, what mining does, and why the supply is capped at 21 million.

A golden bitcoin coin on a table

This is general information about how a technology works. It is not investment advice, a recommendation to buy or sell any asset, or a prediction about prices.

Bitcoin is often described through its price, which moves a great deal and attracts most of the attention. The more interesting question is how it works at all: how a network of strangers can agree on who owns what without a bank, a company or a government in the middle. The answer involves a public ledger, a competition to add to it and a fixed schedule for creating new coins.

The problem Bitcoin was built to solve

Digital files are easy to copy, so any digital money needs a way to prevent the same unit from being spent twice. Traditional systems solve this with a trusted intermediary that keeps the books, such as a bank. Bitcoin, described in a 2008 paper by the pseudonymous Satoshi Nakamoto and launched in January 2009, replaces the intermediary with a distributed system in which many participants keep and check the same record.

The blockchain: a shared ledger

The record is a blockchain: a long chain of blocks, each containing a batch of transactions. Every block includes a reference to the one before it, so changing an old entry would require redoing the work for every block that followed. The ledger is public, and anyone can run software, called a node, that downloads it and independently checks every transaction against the network’s rules. Those rules include that coins can only be spent by their owners and cannot be spent twice.

Ownership is based on cryptography. A user has a pair of keys: a public key, from which addresses are derived and which others can see, and a private key, which must be kept secret and is used to sign transactions. Whoever controls the private key controls the coins. The ledger records balances and transfers, linked to addresses, not names, which makes the system pseudonymous. It is not truly anonymous, because the entire history is visible and addresses can sometimes be linked to people.

What miners do

New transactions wait in a pool until they are included in a block. Miners are participants who gather them into candidate blocks and compete to publish the next one. To win the right, a miner has to find a number that, combined with the block’s data, produces a hash, a kind of digital fingerprint, below a target value. There is no shortcut, so miners try enormous numbers of guesses using specialized hardware. This is called proof of work.

The first miner to find a valid solution broadcasts the block, and other nodes verify it quickly. If it follows the rules, they build on it. The winning miner receives newly created bitcoin, called the block subsidy, plus the transaction fees paid by users in that block.

The network adjusts the difficulty of the puzzle about every 2,016 blocks, roughly every two weeks, so that blocks arrive on average about every ten minutes regardless of how much computing power joins or leaves. Because each block makes earlier ones harder to alter, a transaction is usually treated as more secure the more blocks have been added after it.

Why does the supply stop at 21 million?

The software limits the total number of bitcoin that can ever be created to 21 million. The mechanism is the halving: the block subsidy started at 50 bitcoin and is cut in half every 210,000 blocks, roughly every four years. Halvings have occurred in 2012, 2016, 2020 and April 2024, which reduced the subsidy to 3.125 bitcoin per block. Because each halving shrinks the amount created, the supply asymptotically approaches the cap, and the last fraction is projected to be mined around the year 2140.

When subsidies shrink, miners rely more on fees. How the network will be secured in the long run as the subsidy disappears is a subject of continued discussion among developers and economists.

Who controls the rules?

No one owns Bitcoin. The software is open source, and changes happen through a process in which developers propose updates and node operators, miners and other participants choose whether to adopt them. Changes to the core rules are rare and contentious, since a disagreement can split the network. This conservatism is part of why supporters say the 21 million cap is credible, and part of why critics say the system is slow to change.

The real trade-offs

Supporters point to the open, global and censorship-resistant design. Critics and regulators raise other issues:

  • Volatility. Prices have swung widely, which makes bitcoin a risky store of value or means of payment in the short term.
  • Energy use. Proof of work consumes large amounts of electricity, and the environmental impact is debated, including how much comes from renewable sources.
  • Irreversibility. A transaction sent to the wrong address generally cannot be undone, and a lost private key means the coins are gone.
  • Scams and crime. Fraud and ransomware payments have used Bitcoin, though blockchain transparency has also helped investigators trace funds.
  • Scalability. The base layer processes a limited number of transactions, and other technologies are built on top to handle more.

Regulation and taxes in the U.S.

Several agencies are involved. The Commodity Futures Trading Commission has treated Bitcoin as a commodity, the Securities and Exchange Commission oversees related investment products, including spot bitcoin exchange-traded products it approved in January 2024, and the Treasury enforces anti-money-laundering and sanctions rules. For taxes, the IRS treats it as property, as explained in how the IRS taxes crypto. Questions about who holds the keys, and the risks of each approach, are covered in exchange custody versus self-custody. A related type of token that aims to avoid price swings is the subject of stablecoins explained.

Sources: Bitcoin whitepaper; Bitcoin Core project; U.S. Securities and Exchange Commission; Commodity Futures Trading Commission; Internal Revenue Service