The coinbase transaction is a special type of transaction that occurs in each block of the blockchain. These types of transactions are part of the system for putting into circulation new currencies that have never been spent.

Lthe first transaction that took place in Bitcoin it was not the result of a payment between two people. It was a special transaction of the genesis block that formatted reward transactions for miners. These reward transactions are called coinbase transactions. It is thanks to this type of transactions that the Bitcoin ecosystem began to have cryptocurrencies to make payments and exchanges of value. In a nutshell, they are the genesis of the currencies that we can handle today across the entire Bitcoin blockchain.

Coinbase transactions are also known as generating transactions. These are a fundamental part of the generation of Bitcoin currencies, since they are the ones that give rise to these new currencies. In other words, each coinbase transaction is responsible for transmitting the virgin coins to the miner who has resolved the block. Thus, the total base value of a transaction coinbase, contains only and exclusively new currencies that have never been in the blockchain.

Coinbase transaction within a Bitcoin block

Characteristics of these transactions

When a new block is generated on the blockchain, it has a list of verified transactions within it. Each of these transactions have been generated by the cryptocurrency users of said blockchain. Nevertheless, the first of those transactions corresponds to the coinbase transaction. The base value of this transaction is equivalent to the currently active reward for mining that block.

This means that the value of this transaction is linked to the reward of the current block and is affected by the halving that is currently active for said cryptocurrency. Let's remember that the halving, is an event that occurs in Bitcoin every 210.000 blocks. Of course, cryptocurrencies that follow Bitcoin's operating model also have their specific halving and reward system, as in the case of Litecoin. The functionality of this halving is to reduce the rewards in half and thus control inflation. In Bitcoin for example, the rewards started with a value of 50 BTC per block. Then they went down to 25 BTC and currently it is located at 12,5 BTC. With this The current value of a coinbase transaction is 12,5 BTC which are paid to the valid block miner or miners.

Coinbase transactions are created by miners and this gives it a curious peculiarity. Because it is the miner who builds this transaction, there is a possibility that he can manipulate it. But to avoid this situation, Coinbase transaction reward can only be spent after 100 confirmations. This ensures that the block meets all the requirements to be a fully valid block. This hedging element also serves in the event that the blockchain suffers a fork, thus protecting its cryptocurrencies.

What is its content?

Now surely you are wondering: How is a coinbase transaction formed? What makes it so special? Well, first of all This transaction consists of an entry.  This entry it is not associated with any other address. This entry is called Coinbase, and is responsible for generating the new currencies within the blockchain. To output them, there is an output called coinbase transaction. This transaction points to the Bitcoin address of the miner who has successfully mined the new block. In this transaction, the block reward is collected together with the commissions charged for each and every transaction included in the block. In this way, the miner collects the reward generated as well as the set of commissions collected for all the transactions verified in the new block.

All this information is stored within the block, occupying 100 bytes of data approximately. However, there is an extra space that miners can use however they want. That is, miners can inject the text they prefer in the rest of the space. During the mining of the genesis block, Satoshi Nakamoto He used this space to write the following:

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

In this way, miners can add information to each block to personalize it, sending a message that cannot be altered by anyone and guarded by the security of the blockchain.

Information and content of a coinbase transaction in Bitcoin

How do you get the value of a coinbase transaction?

However, these transactions go through a process that allows the error value to be calculated without errors. This process is as follows:

  1. First, the value of the inputs and outputs of each of the transactions validated by said block are included. This in order to calculate the total of the commissions that will be paid.
  2. Then take the height of the block that is being mined. This indicates what the applicable value of the reward will be, taking into account the halving relative to that block.
  3. Lastly, the miner creates the coinbase transaction to award the reward. This transaction includes the reward for the mined block and the commissions of the validated transactions.

After completing these three steps, the miner receives the value of the coinbase transaction and to spend it, must wait for at least 100 confirmations of the block it has generated to be fulfilled.

How much do you know, cryptonuta?

Can coinbase transactions be manipulated by miners?


Because the miners are in charge of making this transaction, there is a possibility that it may be manipulated by a malicious miner. However, to prevent this, miners cannot spend these funds until 100 confirmations are completed. This is done in order to prevent a malicious miner from carrying out such an act.

Curiosities of coinbase transactions

The forgotten transaction

One of the most curious things about coinbase transactions is related to the first one. With the mining of the first genesis block in 2009, Satoshi Nakamoto generated a coinbase that was paid to the bitcoin address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa. Since then, at this address there are 50 BTC that cannot be spent. In fact, despite all the time and the number of blocks mined since then, that coinbase strangely remains unconfirmed.

There are many sources that assure that the reason for this fact remains undisclosed. However, there is another perspective. Transaction confirmations serve to represent how complicated it is to delete a transaction from a block. In this particular case, the first coinbase transaction has zero confirmations. And this transaction is encoded in the source code of the genesis block, on which the entire Bitcoin blockchain is built. The concept of confirmations would not apply because this transaction could not be eliminated. In case of doing so, a different chain would be being built, fact that would not make sense.

Coinbase Madurity

Another curious fact about coinbase transactions is that they can only be spent when reaching a certain level of confirmations, to be exact, 100 confirmations. This fact is known as Coinbase Madurity or Coinbase Transaction Maturity. This feature is embedded in Bitcoin's operating protocol, so it cannot be mocked in any way. That is, when the miners generate a block, the reward of that block and the commissions collected from it, will only really be available when the coinbase transaction reaches a total of 100 confirmations.

This rule was created in order to protect the blockchain in the event of a fork that could negatively affect transaction confirmation and coin generation. This is because it may be the case that during a confirmation orphan blocks are generated with a coinbase, but said block, coinbase and transactions within the block would be invalid for the new history of the blockchain after the hard fork. This prevents miners from taking advantage of generating coins by means of a coinbase in a forked blockchain with little computing power.