<p>Both the block reward and the fees are collected via a "coinbase transaction", which is the first transaction in the block.  It has no inputs, and the total value of its outputs is allowed to equal the sum of the block reward plus all the fees from the block.  The miner can then set the outputs of this transaction to pay the total to their own address(es).</p>

<p>In particular, it is <em>not</em> necessary for the miner to explicitly list which fees are being collected from which transactions.  It's assumed that all fees from all transactions in the block can be collected, so this determines the allowable amount for the coinbase transaction.</p>

<p>The "after 100 blocks" rule is enforced by requiring that none of the next 100 blocks is allowed to contain a transaction which spends this block's coinbase transaction.  I guess it's a matter of semantics whether the reward "happens" with this block or 100 blocks later.</p>

CC BY-SA 3.0
2018-01-11T23:53:31.413Z
2018-01-11T23:53:31.413Z
Nate Eldredge
<p>If a miner creates a block including an appropriate hash value, then he sends it to all nodes, and each node verifies if this is correct or not and add it to the previous block chain if this is chosen to be a correct one.</p>

<p>I read here that after 100 more blocks are added to the previous block chain (actually it is written that after 100 depths, but I think this means what I am saying here), a miner gets rewarded.</p>

<p>When a block is created, a miner puts informations like “I take 0.05BTC from transaction A for the mining fee” to get transaction fees. However, as far as I know, a miner get 12.5BTC newly created bitcoins in addition. How does a miner put this information in a block?</p>

<block><mining-reward>
How is a “reward” encoded in a block?
Rubertos
# How is a “reward” encoded in a block?

(Asked by: username_0 on 2018-01-11)

If a miner creates a block including an appropriate hash value, then he sends it to all nodes, and each node verifies if this is correct or not and add it to the previous block chain if this is chosen to be a correct one.

I read here that after 100 more blocks are added to the previous block chain (actually it is written that after 100 depths, but I think this means what I am saying here), a miner gets rewarded.

When a block is created, a miner puts informations like “I take 0.05BTC from transaction A for the mining fee” to get transaction fees. However, as far as I know, a miner get 12.5BTC newly created bitcoins in addition. How does a miner put this information in a block?

**Tags:** block, mining-reward


---

## 1 answers

### Answer by username_1 on 2018-01-11. Score: 2 | Accepted answer

Both the block reward and the fees are collected via a "coinbase transaction", which is the first transaction in the block. It has no inputs, and the total value of its outputs is allowed to equal the sum of the block reward plus all the fees from the block. The miner can then set the outputs of this transaction to pay the total to their own address(es).

In particular, it is *not* necessary for the miner to explicitly list which fees are being collected from which transactions. It's assumed that all fees from all transactions in the block can be collected, so this determines the allowable amount for the coinbase transaction.

The "after 100 blocks" rule is enforced by requiring that none of the next 100 blocks is allowed to contain a transaction which spends this block's coinbase transaction. I guess it's a matter of semantics whether the reward "happens" with this block or 100 blocks later.


---

