Block Reward

Incentive for miners to mine blocks

Diagram showing the height of a block in the blockchain as its distance from the genesis block.
Most Recent Block Reward:
Height: 841,071
Block Subsidy:    3.125 BTC
Transaction Fees: 0.45299246 BTC

The block reward is an amount of bitcoins that a miner can collect for mining a block.

It is claimed via the coinbase transaction, and provides an incentive for miners to mine new blocks on to the blockchain.

Source

Where does the block reward come from?

Diagram showing the block reward being collected by a coinbase transaction and as the sum of the block subsidy and transaction fees in the block.

The block reward consists of two parts:

  1. Block Subsidy
  2. Transaction Fees

1. Block Subsidy

Current Block Subsidy:
3.125 BTC
Height: 841,071

The block subsidy is a set amount of new bitcoins that a miner is allowed to send themselves for mining a block.

The size of the block subsidy is based on the height of the block.

See halving section for a full table of past, current, and future block subsidies.

2. Transaction Fees

Most Recent Transaction Fees:
0.45299246 BTC
Height: 841,071

The block reward also consists of all the fees from the transactions included in the block.

A transaction fee is an amount of bitcoin that doesn't get "used up" in a transaction, and a miner is able to claim these "left over" bitcoins as part of the block reward too.

Miners fill their candidate blocks with transactions from the memory pool that contain the highest fees on them to maximize the amount of bitcoins they can claim from the block reward. Therefore, setting a high fee on a transaction acts as an incentive for miners to include your transaction in their next block.

The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction.
Satoshi Nakamoto, Bitcoin Whitepaper

The block reward will be made up entirely of transaction fees when there's no more block subsidy left.

Purpose

What is the purpose of the block reward?

The block reward serves two purposes:

1. Incentive

Diagram showing a miner collecting the block reward as compensation for the cost of mining a block on to the blockchain.

As already mentioned, the block reward provides an incentive for miners to add new blocks on to the blockchain.

It requires energy to try and mine new blocks on the blockchain, so the block reward compensates miners for the processing power they use during mining.

And if the block reward is substantial enough, it encourages more miners to join the network to help build the blockchain, which in turn makes the blockchain even more secure (as it would require more energy for a single miner to attempt to rewrite the blockchain).

2. Distribution

Diagram showing an interval of 10 minutes between new block rewards being issued, and the block rewards as the source of bitcoins in new transactions.

The block reward (well, the block subsidy) is used to distribute new bitcoins in to the network.

Bitcoin is a decentralized currency, which means there's no central "bank" to control the amount of new bitcoins that enter the network, or who they get sent to. Therefore, new bitcoins enter the network via the mining process, which means that new bitcoins are issued are regular intervals, and any miner can be in with a chance of claiming them.

The [block subsidy] provides a way to initially distribute coins into circulation, since there is no central authority to issue them.
Satoshi Nakamoto, Bitcoin Whitepaper

Halving

What is "the halvening"?

The block subsidy started at 50 BTC, and it halves every 210,000 blocks (roughly every 4 years).

This creates a fixed supply of bitcoin, where the issuance of new coins diminishes over time until it reaches zero.

Table

This table show the dates and amounts for previous and upcoming Bitcoin halvings. The current block subsidy is highlighted.

Current Height: 841,071

Halving Height Subsidy (BTC) Date Total Mined (BTC)
0 0 50.00000000 0.00000000
1 210,000 25.00000000 10,500,000.00000000
2 420,000 12.50000000 15,750,000.00000000
3 630,000 6.25000000 18,375,000.00000000
4 840,000 3.12500000 19,687,500.00000000
5 1,050,000 1.56250000 17 Apr 2028 (estimate) 20,343,750.00000000
6 1,260,000 0.78125000 14 Apr 2032 (estimate) 20,671,875.00000000
7 1,470,000 0.39062500 11 Apr 2036 (estimate) 20,835,937.50000000
8 1,680,000 0.19531250 09 Apr 2040 (estimate) 20,917,968.75000000
9 1,890,000 0.09765625 06 Apr 2044 (estimate) 20,958,984.37500000
10 2,100,000 0.04882812 03 Apr 2048 (estimate) 20,979,492.18750000
11 2,310,000 0.02441406 01 Apr 2052 (estimate) 20,989,746.09270000
12 2,520,000 0.01220703 29 Mar 2056 (estimate) 20,994,873.04530000
13 2,730,000 0.00610351 26 Mar 2060 (estimate) 20,997,436.52160000
14 2,940,000 0.00305175 24 Mar 2064 (estimate) 20,998,718.25870000
15 3,150,000 0.00152587 21 Mar 2068 (estimate) 20,999,359.12620000
16 3,360,000 0.00076293 18 Mar 2072 (estimate) 20,999,679.55890000
17 3,570,000 0.00038146 16 Mar 2076 (estimate) 20,999,839.77420000
18 3,780,000 0.00019073 13 Mar 2080 (estimate) 20,999,919.88080000
19 3,990,000 0.00009536 10 Mar 2084 (estimate) 20,999,959.93410000
20 4,200,000 0.00004768 08 Mar 2088 (estimate) 20,999,979.95970000
21 4,410,000 0.00002384 05 Mar 2092 (estimate) 20,999,989.97250000
22 4,620,000 0.00001192 02 Mar 2096 (estimate) 20,999,994.97890000
23 4,830,000 0.00000596 01 Mar 2100 (estimate) 20,999,997.48210000
24 5,040,000 0.00000298 27 Feb 2104 (estimate) 20,999,998.73370000
25 5,250,000 0.00000149 24 Feb 2108 (estimate) 20,999,999.35950000
26 5,460,000 0.00000074 22 Feb 2112 (estimate) 20,999,999.67240000
27 5,670,000 0.00000037 19 Feb 2116 (estimate) 20,999,999.82780000
28 5,880,000 0.00000018 16 Feb 2120 (estimate) 20,999,999.90550000
29 6,090,000 0.00000009 14 Feb 2124 (estimate) 20,999,999.94330000
30 6,300,000 0.00000004 11 Feb 2128 (estimate) 20,999,999.96220000
31 6,510,000 0.00000002 08 Feb 2132 (estimate) 20,999,999.97060000
32 6,720,000 0.00000001 06 Feb 2136 (estimate) 20,999,999.97480000
33 6,930,000 0.00000000 03 Feb 2140 (estimate) 20,999,999.97690000

Total Supply: 20,999,999.9769 BTC

Code

Here's some simple Ruby code for calculating the block subsidy based on block height.

# function for calculating the subsidy for a given height (in satoshis)
def subsidy(height) 
  # calculate how many halvings there have been based on the height
  halvings = height / 210000 # halving is every 210,000 blocks

  # set the starting block subsidy
  subsidy_initial = 5000000000 # 50 BTC in satoshis

  # calculate the current block subsidy based on the height
  subsidy_current = subsidy_initial >> halvings # bit shift right for every halving
  # TIP: A right bit shift is a quick and easy way to divide by 2 (rounded down)

  return subsidy_current
end

# get block subsidy for a specific height
puts subsidy(300000) #=> 250000000 sats

The actual code for the halving can be found in validation.cpp (search for GetBlockSubsidy)

Bit Shift

The halving is actually a right bit shift.

This is pretty much the same as dividing by 2, except the result of division is rounded down if the starting number is odd.

You can see what I mean by entering 5000000000 (the initial block subsidy in satoshis) in to the decimal field of the base converter tool below, and then removing the rightmost bits from the binary field (which is equivalent to performing a right bit shift):

So instead of calling it "the bitcoin halving", it could be more affectionately referred to as "the bitshift righting".

Examples

Here are few examples of block rewards from previous blocks in the blockchain:

Spending

When can you spend the block reward?

The block reward can only be spent by a miner when the block reaches over 100 blocks deep in the blockchain.

See coinbase maturity.

Notes