The Coinbase Transaction: The Anchor Guide to Bitcoin's Genesis Output
The Coinbase Transaction: The Anchor Guide to Bitcoin's Genesis Output
Executive Summary: The Coinbase Transaction is the first transaction in every block. It is the only transaction in the Bitcoin network that does not require an input from a previous transaction. Its primary purpose is to distribute the Block Reward—the combination of newly minted coins (Subsidy) and the sum of all transaction fees in the block. Because it creates new money "out of thin air," it is governed by the strictest consensus rules in the protocol, including a mandatory 100-block maturity period.
🔍 Why This Module Matters
The Coinbase transaction is the "Engine of Creation" for the Bitcoin economy. It is how every single bitcoin in existence was first born. If you don't understand the coinbase, you don't understand how Bitcoin prevents hyper-inflation or how miners are incentivized to secure the network. This module will deconstruct the Block Reward equation, explain the 2140 supply cap, and detail the "Maturity Rule" that prevents cascading failures during a blockchain reorganization.
🏛️ The Block Reward Equation: Mining Income
Miners are paid for their work through a two-part payout inside the coinbase transaction.
$$\text{Total Payout} = \text{Block Subsidy} + \text{Transaction Fees}$$
1. The Block Subsidy (New Coins)
This is the "Minting" process. For every block a miner successfully mines, they are entitled to create a specific amount of new bitcoin. This amount is fixed by the protocol and decays over time.
2. Transaction Fees (User Payments)
The miner also collects every single fee from the 2,000-4,000 transactions they included in the block.
-
The Calculation: $\sum (\text{Inputs} - \text{Outputs})$ for every transaction in the block.
-
The Future: As the subsidy approaches zero, these fees will become the 100% source of income for miners.
⚙️ The Halving Schedule: Enforcing Scarcity
Bitcoin's monetary policy is written in code, not decided by a central bank. Every 210,000 blocks (approx. 4 years), the subsidy is cut exactly in half.
| Epoch | Years | Subsidy | Total Coins |
|---|---|---|---|
| 1 | 2009-2012 | 50.0 BTC | 10.5M |
| 2 | 2012-2016 | 25.0 BTC | 15.75M |
| 3 | 2016-2020 | 12.5 BTC | 18.37M |
| 4 | 2020-2024 | 6.25 BTC | 19.68M |
| 5 | 2024-2028 | 3.125 BTC | ~20.34M |
The 2140 Deadline: Around the year 2140, the subsidy will drop to 1 Satoshi and then to 0. At that point, all 21 million bitcoins will have been minted.
🛠️ The 100-Block Maturity Rule: Preventing Chaos
Because the blockchain can occasionally "Fork" (split), newly minted coins are the most unstable coins in the system.
-
The Rule: A coinbase reward cannot be spent until it has been buried by 100 blocks.
-
The Reason: If a miner spent their reward in Block 101, but Block 100 was "Orphaned" (replaced by a different chain), the money they spent would suddenly vanish from history. This would cause a chain reaction of invalid transactions.
-
The Result: By requiring 100 confirmations (~17 hours), Bitcoin ensures that a coinbase spend is only possible once the block is deeply settled and irreversible.
graph LR A[Block Mined] --> B[Coinbase Output Created] B --> C[Block 1 Confirmed] C --> D[...] D --> E[Block 99 Confirmed] E --> F[Block 100 Confirmed] F --> G[Funds become SPENDABLE] style B fill:#f96,stroke:#333,stroke-width:4px style G fill:#9f9,stroke:#333,stroke-width:4px
💎 The "Coinbase Script": The Ledger's Graveyard
The "Input" of a coinbase transaction is unique. Since it doesn't spend a UTXO, it has a field called the Coinbase Script.
-
Arbitrary Data: Miners can put up to 100 bytes of any data here.
-
BIP 34: Modern rules require the Block Height to be included here to ensure the transaction hash is unique.
-
Culture: Miners often use this space to "sign" their blocks with messages, ASCII art, or political statements.
🎯 Learning Objectives for this Module
By the end of this module, you will be able to:
-
Identify the position of the coinbase transaction in a block.
-
Calculate the current block reward based on subsidy and fees.
-
Explain the "Halving" mechanism and its impact on Bitcoin's supply cap.
-
Describe the 100-block maturity rule and why it is necessary for network stability.
-
Understand the role of the coinbase script in ensuring transaction uniqueness (BIP 34).
🗺️ Module Roadmap: What's Next?
Now that we've born the coins, we will look at how they are refined:
-
Coinbase Inputs & Sig: The technical bytes of the "Generation" script.
-
BIP 34 Height Injection: How block height became a mandatory field.
-
Witness Commitments: How SegWit data is linked to the coinbase.
-
Python Reward Auditor: Writing a script to verify the math of any block reward.
🎓 Summary
The coinbase transaction is the "First Breath" of every block. It is the mathematical bridge between the expenditure of physical energy (mining) and the creation of digital value (bitcoin). By mastering the rules of the coinbase, you are understanding the very heart of Bitcoin's incentive structure and its unprecedented model of predictable, decentralized money.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: