What is a coinbase transaction?

Tara Annison
2 min readSep 18, 2019

--

On the bitcoin blockchain, a coinbase transaction (sometimes referred to as a generation transaction) is the first transaction in a block and used by the miner to claim the block reward and the transaction fees.

It only has 1 input (the coinbase), rather than UTXOs, and must be confirmed by 100 blocks. The input is typically of the format: a 32 byte null hash (since there are no UTXOs to reference), a sequence number (for time locking), the coinbase field (usually an extra nonce), the block height (mandated since BIP34), a script byte (max 100) and the index (0xffffff as no previous outpoint).

The outputs are the block reward and the total transactions fees within the block, and these can be sent to one or multiple addresses.

Interestingly, the first ever coinbase transaction, which was created by Satoshi Nakamoto in the genesis block, cannot be spent. This is because, although the transaction is visible on the blockchain, it was not placed with a transaction database and therefore cannot be spent. The coinbase field within this transaction was set to the now famous Times headline of:

The Times 03/Jan/2009 Chancellor on brink of second bailout for banks

Coinbase transactions are limited to 100 bytes and as such as usually written as a hash in hex format. They are often used by miners to signal support for protocol upgrades. They should not be confused with the well known exchange ‘Coinbase’ which allows users to buy and sell cryptocurrency.

--

--