Coinbase Transaction: Claiming the Block Reward

·

A coinbase transaction is the first transaction in a Bitcoin block. Miners create this transaction to claim the block reward, which consists of the block subsidy (newly minted bitcoins) and transaction fees from included transactions. Unlike regular transactions, coinbase transactions generate new bitcoins rather than transferring existing ones.

Key Characteristics of a Coinbase Transaction

Coinbase transactions differ from standard transactions in several ways:

Example ScriptSig Structure:

- **BIP 34 Block Height**: `OP_PUSHBYTES_3` (e.g., `03951a06` for block 400,021).
- **Custom Data**: Miners often include tags (e.g., `2f425443432f20` for "/BTCC/") or extra nonces.

Coinbase Transaction Requirements

1. Structural Rules

2. Upgrade-Specific Rules


Coinbase Maturity: When Can You Spend the Reward?

Outputs from coinbase transactions can only be spent after reaching 100 confirmations. This rule prevents issues during blockchain reorganizations:

👉 Learn more about blockchain security


Common Pitfalls and Notes


Frequently Asked Questions (FAQ)

1. Why does the coinbase transaction have a blank input?

The blank input signifies the creation of new bitcoins, as there’s no previous output to reference.

2. What happens if a miner doesn’t include the block height?

Post-BIP 34, blocks without the height in the ScriptSig are rejected by the network.

3. Can coinbase rewards be split among multiple addresses?

Yes. For example, block 829,513 distributed rewards across 17 outputs.

4. How does Segwit affect coinbase transactions?

Segwit requires a witness reserved value and a wTXID commitment in one output.

👉 Explore Segwit details


Key Takeaways

For further reading, refer to Bitcoin Developer Documentation.