Written by Kel Green

Technical Writer/ Blockchain Journalist / Advisory Board Member at NGO Xchange
April 23 2018

Bitcoin Mining 101

Bitcoin Mining 101

Ranked number two in Google’s world news search in 2017, most have heard of Bitcoin (BTC), yet remain puzzled by the concept of Bitcoin mining. Recent headlines illustrate Bitcoin miners hacking computers through YouTube ads, being banned by state governments, and overcharged by electric companies. Yet, it is entirely understandable if you are still asking yourself,

“What the heck is Bitcoin mining?”

The Concept

Bitcoin mining is an activity which adds bitcoin transactions to the blockchain ledger.

The operational significance of mining is that it may just be the foundation of trust within Bitcoin’s ecosystem.

Enthusiasts trust Bitcoin because unlike traditional fiat currencies, which are printed, Bitcoin blocks are mathematically “mined.”

Mining is a part of Bitcoin’s protocol which contains decentralized checks and balances within its code. Mining entails a proof of work system; its purpose is to prevent counterfeit currency, AKA double spending.

The Process

The process of mining verifies and creates hashes to authenticate bitcoin transactions and finalize blocks in the Bitcoin blockchain.

In addition to verifying transactions, miners are also creating new coins. There are currently more than 16.8 million mined BTC. The digital currency has a cap of 21 million BTC.

Once all 21 million coins are mined, no more can be created.

Bitcoin mining, like gold mining, establishes a base value for every coin. On top of creating value, mining ensures transactions are not replicated. In exchange for verifying transactions, miners get block rewards in BTC.

Currently, miners are rewarded with 12.5 BTC, which is worth around $125,000 USD, for each block mined. Initially, the block reward was set at 50 BTC in 2009. This number has been halved twice so far, about once every 4 years, and is configured to decrease again to 6.25 BTC in 2020.

Proof of Work, explained

How do miners create “proof of work?” Unlike traditional mining, which involves explosives and drilling, Bitcoin mining incorporates proof of work by having miners solve mathematical problems: creating hashes. Miners must find a special number that results in a block hash that meets certain parameters. It’s a mathematical puzzle.

Hashes are usually expressed in hexadecimal, a base 16 system. Bitcoin hashes in hexadecimal have 64 digits.

Our normal decimal system, with the Greek prefix deci for ten, uses ten figures: 0–9.

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Hexadecimal’s extra prefix, hexa, is Greek for six. Hexadecimal uses 16 figures: 0-f.

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f

So “f” is the equivalent of 15 in decimal form, and “10” is the equivalent of 16 in decimal form. “1f” is the equivalent of 31, “20” is the equivalent of 32, “21” is 33, and so on.

Hexadecimal numbers are often preceded by “0x” to signify that they’re not in decimal form.

To prevent duplicate transactions or “double spending,” miners are presented with a target hash. The job of the miner(s) is to come up with a special number to add to each block that makes the block’s hash lower than or equal to the current target hash, which sets the current Bitcoin mining difficulty.

All hashes must contain at least eight zeroes and no more than 63.

Example:

Target hash, with 16 leading zeroes:
0x000000000000000051ABA2000000000000000000000000000000000000000000

Hash for proposed solution #1, also with 16 leading zeroes:
0x000000000000000068ACF200000000Cb0000000000000000000000000000000e

Solution #1 would be considered wrong because the solution hash is a greater number than the target hash.

Hash for proposed solution #2, also with 16 leading zeroes:
0x000000000000000050ABA2340000000000000000000000000000000000000000

Solution #2 qualifies as an acceptable hash, since it is lower than the current target hash, which sets the current difficulty.


Miners consolidate recent BTC transactions into blocks, determine their validity, and compete to be the first “finish” the block in such a way that it produces an acceptable hash.

To get credit for mining Bitcoin, you must be the first to meet the target hash. The more miners who are actively competing to predict hashes, the lower each miner’s chances of success.

For example, if there are 100,000 miners on the network, there is a 1-in-100,000 chance of being the first to correctly solve a block.

Mining pools have been developed to turn this lottery system into more stable income: every participant attempts to solve each block on behalf of the mining pool, and when someone in the mining pool is first, the reward for solving the block is split up among the mining pool’s members.

In addition to the block reward, Bitcoin users can pay a small transaction fee to incentivize miners to include their transactions into blocks more quickly. Through block rewards and transaction fees, miners are encouraged to secure the network by dedicating more computing power to it.


Perspective

Bitcoin mining is a productive method to incentivize multiple parties by providing value simultaneously. The incentive for miners is earning BTC. The benefit for the Bitcoin platform is an authentication process which blocks double spending and fraud on the blockchain.

The proof of work protocol, though somewhat laborious, offers protection against bad actors, creating a process that generates hashes for new blocks also creates an atmosphere free of inflation.

In contrast to fiat currencies, bitcoins cannot be fabricated or manifested for no reason. Bitcoins are mined into existence for the benefit of the whole network.

Topics: Bitcoin, Bitcoin Mining, Cryptocurrency Mining, Cryptography, Proof Of Work