Explainer

What is a coinbase transaction?

A coinbase transaction is the first transaction in a Bitcoin block. It creates the block subsidy, collects transaction fees and cannot spend an earlier output.

2 min readGlossary
What is a coinbase transaction?

The short answer

A coinbase transaction is the first transaction in every Bitcoin block. A miner creates it to claim the block subsidy and the fees left by the block's other transactions. It is unrelated to Coinbase, the company.

Ordinary transactions spend earlier outputs. A coinbase transaction does not. Its input uses a special null reference because this is where newly issued bitcoin enters the ledger.

What it contains

The miner chooses one or more outputs that receive the reward. The total cannot exceed the subsidy allowed at that block height plus the fees from the other transactions. The subsidy began at 50 BTC and is cut in half every 210,000 blocks. Bitcoin Core 31.1 still calculates it from the block height in GetBlockSubsidy.

The special input also carries the block height. BIP 34 made that height the first item in the input's script. Miners may place additional data after it, which is why pool names or short messages sometimes appear there.

Why the reward waits

A normal confirmed output can be spent immediately. A coinbase output cannot be spent in a block until 100 block heights after the block that created it. Bitcoin Core 31.1 records this consensus rule as COINBASE_MATURITY = 100 in consensus.h.

The delay matters because a recent block can be replaced during a chain reorganisation. If that happens, its coinbase transaction disappears with it. The maturity rule prevents a miner from immediately building further payments on a reward that may cease to exist.

How to recognise one

Open a block in a block explorer and select its first transaction. Its input should be labelled coinbase rather than pointing to a previous transaction ID. Its outputs show where the miner directed the reward, but they do not prove which individual operated the mining equipment. A pool can receive the reward and account for participating miners separately.

The name describes a transaction type, not an exchange account. The reward describes the subsidy and fees together, not newly created bitcoin alone.

Newsletter

Bitcoin, without the noise

What happened in Bitcoin, what it actually changes, and the sources so you can check us. One issue at a time, straight to your inbox.

  • One email per issue, never a drip campaign
  • No tracking pixels and no shared addresses
  • Unsubscribe from any issue in one click

Get the next issue

One email per issue, no tracking pixels, and unsubscribe from any of them. We do not share your address. Privacy policy