TeachMeBitcoin

The Coinbase Transaction: The Anchor Guide to Bitcoin's Genesis Output

From TeachMeBitcoin, the free encyclopedia Reading time: 5 min

The Coinbase Transaction: The Anchor Guide to Bitcoin's Genesis Output

IMPORTANT

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 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.

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.


🎯 Learning Objectives for this Module

By the end of this module, you will be able to:

  1. Identify the position of the coinbase transaction in a block.

  2. Calculate the current block reward based on subsidy and fees.

  3. Explain the "Halving" mechanism and its impact on Bitcoin's supply cap.

  4. Describe the 100-block maturity rule and why it is necessary for network stability.

  5. 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:

  1. Coinbase Inputs & Sig: The technical bytes of the "Generation" script.

  2. BIP 34 Height Injection: How block height became a mandatory field.

  3. Witness Commitments: How SegWit data is linked to the coinbase.

  4. 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.

☕ Help support TeachMeBitcoin

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:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!