Bitcoins are discovered rather than printed. Computers around the world “mine” for coins by competing with each other.
Bitcoin mining is the process of discovering new blocks, verifying transactions and adding them to the Bitcoin blockchain.
Each time a new block is discovered, the successful miner is granted the right to fill that block with new transaction data.
In return for dedicating time and resources to performing this task, winning miners receive a free amount of newly minted bitcoin known as a “block reward” as well as any fees attached to transactions they store in the new blocks.
The process of giving successful miners newly minted bitcoin is exclusively how new coins enter circulation.
In order to validate and add new transactions to the blockchain, miners must compete with each other using specialized computing equipment. They use their equipment to generate fixed-length codes known as “hashes” (see below.) In order to discover the next block, miners must generate a hash that has an equal or higher number of zeros in front of it than the “target hash.”
The target hash is a 64-digit hexadecimal code (comprising numbers 0-9 and letters A-F) all miners are trying to get below in order to discover the next block.
As a starting point, all miners take the data from the previous block, known as the “block header”– which contains things like a timestamp of the block, the hash of the previous block data, and an empty space known as a “cryptographic nonce.” Most of the data in the block header is fixed, meaning it cannot be changed, apart from the nonce. A nonce means “a number only used once” and is the part of the previous block header that miners are allowed to tweak. Remember, just changing a single bit of the input produces a totally different hash.
The tricky part is, hashes are generated completely at random, meaning it’s impossible for miners to know what the hashes will be before they generate them. So it’s simply a case of trial and error until someone finds the right nonce value – known as the “golden nonce.”
This is why miners have to invest in energy-intensive computers, particularly application-specific integrated circuit (ASIC) miners, that can generate trillions of hashes per second.
An easy way to think of bitcoin mining is to imagine each new block is a treasure chest with a combination lock on it. To get the free bitcoin block reward inside and win the right to add new transaction data into it (and collect the associated fees) you have to keep turning one of the number wheels on the lock (the nonce) until you crack the combination (the target hash.)
For every new block added to the blockchain, the protocol – a set of rules programmed into Bitcoin – releases a fixed amount of newly minted coins to the successful miner. This block reward system doubles as the distribution mechanism for Bitcoin.
As part of the programmed measures introduced by Satoshi Nakamoto to steadily decrease the number of bitcoins released over time, the coins awarded to miners are slashed roughly every four years, or 210,000 blocks, in a process known as a “Bitcoin Halving.” In 2009, the block reward was 50 BTC. This figure was reduced to 25 BTC in 2013. The most recent halving occurred in 2020, and saw block rewards fall from 12.5 BTC to 6.25 BTC.
Note that bitcoin has a 21 million maximum supply cap, and we already have 18.9 million coins in circulation. Block rewards will no longer be distributed once 21 million BTC has been released to the market. Once this happens, miners will only be able to earn rewards in the form of bitcoin transaction fees.
Even with this combination of two revenue sources, not every miner generates profits. To make ends meet, a miner’s earnings must exceed the amount spent on electricity and the purchase and maintenance of mining rigs. Also, as mining difficulty increases, large mining operations are forced to expand or upgrade their equipment to maintain a competitive edge. For most average miners who cannot afford to invest in expensive equipment, there’s an opportunity to combine their resources with other miners around the world. Each miner agrees to share rewards according to the contributions of each miner. These networks of miners are called “mining pools.”