A guide to understanding Bitcoin mining in ten minutes

bitcoin mining

How is new bitcoin generated, and what steps are involved in the process? Take ten minutes to understand what is Bitcoin mining and unearth the story of how Bitcoin is really created.

The Bitcoin network is maintained by the Bitcoin miners, unlike classical miners such as gold or coal miners, form part of a deeply interconnected global distribution network that runs on computational power.

Contrary to popular belief, the term Bitcoin mining does not refer to an individual who exerts physical labour. Rather, Bitcoin miners run a special software (Bitcoin source code) on purpose-built devices and lend CPU power to the process. These electronic devices independently solve complex algorithms, which form the basis of Bitcoin’s consensus-based model.

The Bitcoin source code limits its supply to about 21 million coins, which ensures that unlike fiat currencies, bitcoin is resistant to inflation. It’s projected that by 2140, the maximum amount of bitcoin will have been mined. From that point on, miners will receive only transaction fees as compensation for their work. Yet for now, the process of Bitcoin mining continues at different rates of difficulty and, over time also generates changing amounts of rewards on top of the transaction fees received by miners.

Bitcoin mining has become quite competitive as more people continue to engage with the network. As a consequence, many people joined mining pools instead of mining individually to increase their chances of receiving part of the block reward (profit).

Nodes

Bitcoin is a decentralised, peer-to-peer cryptocurrency meaning that there is no central authority involved in the issuing of new bitcoin. The network is distributed across various electronic devices called nodes that run special software. A node is an electronic device (hardware) maintaining the full Bitcoin blockchain, finding the correct proof of work (also PoW) for new blocks of the chain (mining), or providing wallets.

Full nodes are the gatekeepers of Bitcoin’s consensus model since they retain an entire copy of the full Bitcoin blockchain, complete all node functions and support the existence of other nodes. They play a crucial role by validating transactions and securing the network. In May 2019, there were 9577 active Bitcoin nodes participating in Bitcoin mining.

The top six countries with the highest number of nodes as of 21st May 2019.

top six countries with nodes

Blocks

Bitcoin’s protocol includes various steps within its consensus mechanisms to ensure the validity of transactions added to the blockchain. Below, an excerpt of the Bitcoin whitepaper that lists the network’s main steps.

The steps to run the Bitcoin blockchain as put forward in the Bitcoin whitepaper released by Satoshi Nakamoto in 2008

steps to run the blocks

Once a block is found, it is circulated around the network for nodes to confirm it before it is added to the blockchain. The verification of the block by all nodes ensures that only valid blocks are added to the chain. Once the confirmed transactions are bundled together into a block and verified, the bitcoin can then be transacted by its new owners. The network processes a single block of Bitcoin transactions approximately every ten minutes.

Graph showing the average number of Bitcoin transactions per block between May 28, 2018, to May 27, 2019.

transactions per block

Proof of work (PoW)

Bitcoin mining expends a large amount of computing power to find the correct hash (as the solution of the PoW problem) of a block, and a block can only be changed if such a large amount of computing power is gathered to break the previous consensus.

Therefore, it is not only time-inefficient, but also very costly to attempt to override the Bitcoin network. Miners engage in a competition to solve the proof of work algorithm, and accordingly may earn a reward for their work to add to and maintain the Bitcoin blockchain. The application of proof of work maintains Bitcoin’s security-oriented mathematical consensus-based model. Successful miners receive not only newly created bitcoin, but also the transaction fees associated with the transactions associated block they found.

Halving

Importantly, the amount of new bitcoin generated and rewarded to miners is halved every 210,000 blocks (approximately every four years). Halving acts as a control on the rate of issuance of new bitcoin and balances the reward received by miners as bitcoin’s price increases and fluctuates. The first mined blocks of the Bitcoin blockchain created block rewards of 50 bitcoin each, but by 2016, the block reward had reduced to 12.5 bitcoin.

Difficulty

The difficulty is a number that demonstrates how easy or hard it is for Bitcoin miners to find the correct nonce. The more active miners in the network, the higher the difficulty, to ensure the block time of ten minutes. Bitcoin is programmed in a way that every 2,016 blocks, the difficulty is re-synchronised by all nodes to ensure the correct level is met.

Graph showing the rise in difficulty between May 2018 - May 2019.

rise in diffiuculty

Critics

Bitcoin mining is elemental for the network. Its structure empowers the network to be both decentralised, and maintain adequate control mechanisms. However, Bitcoin mining is not without its critics. The amount of energy consumption required to obtain the bitcoin network accounts for almost as much energy consumption as the whole of Switzerland. As of May 2019, the estimated energy consumption is around 63 TWh.

Other cryptocurrencies such as Peercoin have introduced alternative consensus models like proof-of-stake (PoS) or delegated proof-of-stake (e.g Lisk), which require less electricity and operate with different principles of decision making.

Bitcoin mining has shifted towards a more centralised set-up, in which miners group together in pools. Pools combine computational power to position themselves with a higher chance of profiting. However, this implies that about 7-8 major pools create the majority of blocks. This could potentially be misused to drive a 51%-attack, actually manipulating the Bitcoin network.

Discover how to easy it is to buy and sell Bitcoin directly from your bank account. Start your Bitwala journey here.

Create your free account with Bitwala

Bitwala is the easiest way to buy and sell bitcoin. Get started in just a few minutes.