A coinbase transaction is the first transaction in every Bitcoin block, the one that creates new coins out of nothing and pays the miner their block reward. It has no inputs (no coins being spent); it creates outputs from the protocol's emission schedule plus collected transaction fees.

What Is a Coinbase Transaction?

2 min read

The short version

The coinbase transaction is where new Bitcoin is born. Every other transaction moves existing coins between people. The coinbase transaction is the only one that creates coins from thin air, like a mint printing fresh bills, except the amount is fixed by protocol rules and halves every four years.

How It Works

The coinbase transaction is structurally unique: its input field contains no reference to a previous transaction output. Instead, the "input" has a special scriptSig field (up to 100 bytes) where miners can include arbitrary data, famously, Satoshi embedded a newspaper headline in the genesis block's coinbase. The outputs must not exceed the current block subsidy plus total fees from all other transactions in the block. Coinbase outputs have a special maturity rule: they cannot be spent until 100 additional blocks are mined on top (to handle potential chain reorgs).

Anatomy of block 840,000's coinbase transaction

Block 840,000 (the 2024 halving block) has a coinbase transaction creating exactly 3.125 BTC (the new subsidy) plus 37.6 BTC in fees (an unusually high amount due to Runes protocol launch). The miner (ViaBTC) included a message in the scriptSig: the text "halving" encoded in hex. The 40.7 BTC total output went to ViaBTC's payout address. Those coins became spendable only after block 840,100 was mined.

What People Get Wrong

  • Coinbase is related to the exchange Coinbase

    No. The exchange took its name from this Bitcoin concept, but coinbase transactions existed since Bitcoin's genesis block in 2009. The exchange was founded in 2012.

  • You can spend coinbase rewards immediately

    Coinbase outputs require 100-block maturity (~16.7 hours). This prevents miners from spending rewards on a chain that might be reorganized.

  • The coinbase transaction can be any size

    The scriptSig data is limited to 2-100 bytes. The outputs must exactly equal subsidy + fees, claiming more is a consensus violation that all nodes would reject.

Sources & Further Reading

Questions People Also Ask

What did Satoshi put in the first coinbase transaction?
The genesis block's coinbase contains the text: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks", a timestamp proof and commentary on the financial system.
Can miners put anything in the coinbase scriptSig?
Up to 100 bytes of arbitrary data. Miners commonly include pool identifiers, messages, or protocol-required data like the block height (required since BIP 34).
Why is the 100-block maturity rule needed?
If a chain reorganization occurs, the coinbase from orphaned blocks would disappear. The 100-block wait ensures the block is deeply buried before its reward can be spent elsewhere.

More in Bitcoin & Base-Layer Fundamentals

See all →
Was this page helpful?

Page last checked