How does Bitcoin Mining Work? Bitcoin and Crypto mining is the process in which you can obtain new digital tokens that are released. You can mine a block about every 10 minutes, the current return is 6.25 bitcoin per block. It currently takes significant computational power to mine bitcoin and that will only increase alongside the hashrate, which correlates with computational power needed to solve the mathematical formula to mine each new block.

Simply put, miners are another node that connect to the network. Generally they do everything a node does but with one specific task. Besides propagating transactions and blocks, miners create new blocks by adding transaction records to the public ledger of past transactions.

Mining Process:

Block hash algorithm – Bitcoin and most Crypto currency mining uses proof-of-work function. Miners combine several inputs and hash it to produce the desired output (Block header hash). When we achieve the desired output, the network rewards us with newly generated Bitcoin and transaction fees. New bitcoin generation has similar characteristics to gold. However, rather than spending resources on gold mining, resources are CPU power, time, and electricity. Once all 21 million bitcoins are generated, miners will still have an incentive for transaction fees. Furthermore, the transaction fees are inflation free.

Below are the Block header inputs they hash (from BitcoinWiki):to show how block hashing works

 

Desire Output:

The desired output is a 256-bit number that all Bitcoin clients share. The network accepts blocks with a SHA256 hash block header and is lower than or equal to the current target. In short the hash output value needs to have a certain number of starting zeros. The lower the target (the more starting zeros required), the more difficult it is to generate a block.

As you can see it is not a set mathematical problem, as the input changes. Some down to every few seconds and the inclusion of Nonce (Random Number), to be able to generate the right output is more like winning the lottery. The more hash power you have, the more attempts you have per second – like buying many lottery tickets.

Difficulty:

The difficulty in Bitcoin and Crypto Mining is the target. Ordinarily the network produces a new block every 10 minutes and the difficulty is adjusted every 2016 blocks. Usually it takes 2 weeks when each block is 10 minutes. After every 2016 blocks, the network compares the actual time taken against the 2 week benchmark, and adjusts the difficulty. When we mine blocks too quickly, the difficulty will go up and vice versa.

Block Creation Fees (newly generated Bitcoin per block):

The block creation fee changes at every 210,000 blocks. Before, Bitcoin mining started with 50 Bitcoin per block, then decreased to 25 Bitcoin per block. Currently – 6.25. This will eventually decreased to zero at block 6,930,000 where all 21 Million Bitcoin will be generated and in circulation. Subsequently miners will only earn transaction fees on creating new blocks.

*Difficulty, Block creation fee and Data structures etc are governed by Bitcoin Protocol Rules.

Transaction Fees:

If you add up the input and output on your transaction, you’ll notice there’s a difference. Namely the transaction fees the network pays miners for validation, doing the proof-of-work, and adding your transaction onto the blockchain. New blocks don’t have to include all of the outstanding transactions and miners can pick and choose what they include. The difference between all the inputs and all the outputs in the block is the transaction fees. In this case fees a miner earns on top of the newly generated Bitcoin for hard work and resources spent.

Therefore the higher the transaction fee, the more likely miner will include it (other words the higher the transfer). You can set the amount of fees you pay, some wallets decide for you. Lastly you pay transaction fees. It’s possible to pay nothing, however, it could take weeks, months, or possibly never be included in a block. I’m sure you’ve heard the saying “There’s no free lunch in this world”. Why would miners want to work for free on your transaction?

You can see the cost per transaction (in Bitcoin) in the Memepool here.

This link provides a good visual representation of the whole process from encryption, transaction, verification, mining, to block and bitcoin generation. (NOTE: this image is dated and number of bitcoin generated per block has dropped to 12.5)

Thanks for reading our article on How does Bitcoin Mining Work. If you found this helpful don’t forget to subscribe to our newsletter.

What is Impermanent Loss?

What is impermanent loss? With the increasing popularity of DeFi platforms, many of you probably have heard of Uniswap and other AMM platforms. The technology

Read More »

What is Reef Finance?

What is Reef Finance? The Problem What is Reef Finance? Well to start, let’s take a look at the problem their platform solves. With the

Read More »

What is PersistenceOne?

What is PersistenceOne? One of the biggest concerns that people face today is the increasing financial debt of many countries. A lot of people are

Read More »

What is UTU?

What is UTU? In Swahili “UTU” means humanity. It’s also the principle behind UTU the company, which puts people first in their platform that turns

Read More »
Newsletter