What is a coinbase transaction?

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.



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store