AI disclosure: drafted by Basis Desk's AI newsroom and machine-checked against the primary sources listed below — how we use AI. Originally published on Basis Desk.
Bitcoin's fixed supply is central to its economic model. We explore the software rules enforcing the 21 million limit, the math behind block subsidies, and how the network will secure itself once the last coin is mined.
Key points
- Bitcoin's protocol strictly limits the total supply to slightly under 21 million coins through a scheduled reduction of block rewards.
- The precise theoretical maximum supply is 20,999,999.97690000 bitcoins, due to decimal truncation in the software's code.
- Lost private keys mean the effective circulating supply available to the market is significantly lower than the coded maximum.
- Around the year 2140, miners will transition to a security model funded entirely by transaction fees as the block subsidy reaches zero.
Bitcoin's monetary policy is defined by a rigid set of rules encoded into its software, culminating in a strict supply cap of 21 million coins. This hard limit contrasts with traditional fiat currencies, which central banks can expand indefinitely based on macroeconomic objectives. The cap is enforced by a decentralized network of nodes, making it practically impossible to alter without overwhelming consensus.
Monetary Policy Written in Code
When Satoshi Nakamoto launched Bitcoin ($BTC) in 2009, the software established a predictable issuance schedule. New bitcoins are created exclusively through a process called mining, where network participants expend computational power to bundle pending transactions into blocks. In exchange for securing the network and processing these transactions, the miner who successfully appends a new block to the blockchain receives a reward, known as the block subsidy, along with the transaction fees paid by users.
The genesis of the 21 million cap lies in the programmed decay of this block subsidy. Initially, the network rewarded miners with 50 bitcoins per block. However, the protocol dictates that this subsidy must be cut in half every 210,000 blocks, an event that occurs roughly every four years. This mechanism is central to the protocol's design, gradually reducing the rate at which new coins enter circulation. The Bitcoin Halving: How the Protocol Enforces Digital Scarcity outlines how this disinflationary schedule mimics the extraction of finite natural resources like gold.
Because the block reward halves periodically, the total supply follows an asymptotic curve. It approaches a maximum limit but reduces the rate of approach over time. By halving the reward every 210,000 blocks, the total mathematical sum of all block subsidies converges on 21 million. This schedule creates a predictable inflation rate that continues to drop, shifting the network's economics from supply expansion to fixed scarcity.
The Math Behind the 21 Million Limit
The 21 million figure is often treated as an exact cap, but the underlying code dictates a slightly different reality based on how the software processes fractional units. The primary unit of account within the Bitcoin software is not a full bitcoin, but rather a satoshi. One bitcoin is divisible into 100 million satoshis.
In the protocol's source code, the function responsible for calculating the block reward uses a bitwise right-shift operation to halve the subsidy. Due to the way the software handles decimal division using a 64-bit integer, the smallest unit of bitcoin cannot be split. When the block reward halves to the point where it equals less than one satoshi, the software truncates the decimal and rounds it down to zero.
The exact theoretical maximum supply, dictated by integer truncation via bit-shifting in the code, is 2,099,999,997,690,000 satoshis. This translates exactly to 20,999,999.97690000 bitcoins. Furthermore, technical anomalies in the network's early days, such as duplicate coinbase transactions and unclaimed mining rewards where miners intentionally or accidentally claimed less than the maximum allowed subsidy, mean the actual circulating supply will never even reach this theoretical maximum. The strict enforcement of this upper bound is not managed by a central authority but by every full node on the network verifying that no miner claims a block reward higher than the current valid subsidy.
Lost Coins and Effective Supply
While the theoretical cap rests just under 21 million, the effective circulating supply available to the market is significantly lower. Bitcoins are secured by cryptographic private keys. If a user loses access to their private key, and lacks a backup of their seed phrase, the bitcoins associated with that key remain indefinitely locked on the blockchain. They are technically part of the supply, but economically inert.
Blockchain analytics firms estimate that millions of bitcoins fall into this category. Early adopters who mined or acquired coins when they held negligible market value often discarded their storage media or misplaced their keys. Additionally, the coins mined by Satoshi Nakamoto during the network's infancy, estimated to be around 1.1 million bitcoins, have never moved from their original addresses. This persistent loss of private keys introduces a deflationary counter-force to the network's programmatic inflation.
As the issuance rate drops and approaches zero, the rate of accidental loss may eventually surpass the rate of new creation. Consequently, the highly publicized cap of 21 million represents a ceiling on creation, not the practical reality of accessible liquidity. The market often prices in this lost supply, understanding that a portion of the ledger is permanently immobilized.
Mining After the Last Bitcoin
The schedule of halvings dictates that the block subsidy will drop to zero around the year 2140. At that point, the network will reach its hard cap, and no new bitcoins will be minted. This transition raises questions about the network's security budget, which currently relies heavily on the block subsidy to incentivize miners to dedicate energy and hardware to the network.
Once the subsidy disappears, miners will rely entirely on transaction fees. Every bitcoin transaction includes a fee paid to the miner for including that transaction in a block. Currently, these fees constitute a smaller portion of miner revenue compared to the block subsidy, though they spike during periods of high network congestion.
The long-term viability of a fee-only security model is an active area of economic study. For the network to remain secure against attacks, the cumulative transaction fees per block must be substantial enough to compensate miners for their energy expenditures. This requires either a high volume of transactions paying small fees or a smaller volume of high-value transactions paying significant fees. If the fee market fails to generate sufficient revenue, the aggregate compute power securing the network could decline, potentially making it vulnerable to 51% attacks where a single entity gains control of the majority of the mining power.
Developers and economists suggest that future layers built on top of the base protocol, such as the Lightning Network, could aggregate millions of small transfers into larger settlement transactions on the main chain, allowing the base layer to function purely for high-value, high-fee final settlement.
Common Misconceptions
- The cap can be easily changed by developers. The 21 million limit is enforced by a consensus mechanism distributed across tens of thousands of independent nodes. A developer proposing a code change to increase the supply would create a software fork. Unless the vast majority of node operators and economic actors choose to run this new software, the original network with its 21 million cap will persist, while the altered version would function as a completely separate and likely valueless network.
- Exactly 21 million coins will exist. As detailed above, integer truncation in the halving logic limits the absolute maximum to 20,999,999.97690000 bitcoins. Further, unrecoverable private keys mean the usable supply will permanently remain much lower than the theoretical ceiling.
- The network stops working when the last coin is mined. The cessation of the block subsidy does not halt block production. The protocol will continue to process transactions and append blocks exactly as before, with miners deriving their compensation purely from the transaction fees attached to user transfers.
What to Watch
As the network undergoes consecutive halvings, the economic dynamic shifts progressively toward transaction fees. Analysts closely monitor miner revenue structures to assess the health of the security budget. Periods of low block space demand can compress miner margins, leading to fluctuations in the network hash rate. Conversely, innovations that increase demand for base-layer block space can drive fee revenue higher, testing the viability of the eventual fee-only model.
The implications of a static supply cap on asset pricing remain a focal point for institutional adopters treating the asset as a digital store of value. The market's response to supply constraints continues to evolve, as seen when Bitcoin slips 2.0% to $81,542 during macroeconomic shifts, demonstrating that a fixed supply does not insulate the asset from short-term liquidity cycles and broader financial conditions.
FAQ
Can the 21 million cap be increased?
Changing the cap would require modifying the protocol's core rules, which requires near-unanimous consensus from the thousands of independent nodes running the network. Without this consensus, any attempt to change the cap would simply result in a separate network fork.
When will the last bitcoin be mined?
Based on the halving schedule occurring every 210,000 blocks (roughly every four years), the block subsidy will round down to zero around the year 2140.
What happens to lost bitcoins?
Bitcoins stored in wallets where the private keys have been lost remain locked on the blockchain permanently. They can never be recovered, effectively reducing the active circulating supply.
Sources
- Bitcoin Developer Documentation: Block Chain — Bitcoin.org
- Bitcoin Core Source Code: Consensus Validation — Bitcoin Core
- Bitcoin Whitepaper: A Peer-to-Peer Electronic Cash System — Bitcoin.org
Basis Desk is a source-verified crypto newsroom. Market data, a free MCP server for AI agents and JSON APIs: basisdesk.news/developers. Not investment advice.
Top comments (0)