top of page

Bitcoin Mining

BItcoin Mining.png

Bitcoin Mining is like a giant lottery where the ticket is computing power and electricity. If you participate, your computer will be trying to generate a hash that matches the current difficulty of the network. That hash is generated using double SHA-256 by adding a set of information in the block header and hashing it. Miners compete to find a hash below a target value, requiring significant computational power and energy. The first to solve it broadcasts the solution, and if verified by the network, they earn a block reward (newly minted bitcoins plus transaction fees). The difficulty adjusts every 2,016 blocks to maintain a ~10-minute block time. PoW secures the network, ensuring Bitcoin’s decentralised, trustless operation by making attacks computationally expensive.

SHA-256 is a one-way function of 256 bits (32 bytes), give it data and it will spit out a 64-character output. It can be either decimal (0-9) or hexadecimal (16 symbols: 0-9 and A-F).

That output cannot be used to recover the original input.

The number of possible outputs is 2^256, which is almost as many atoms as there are in the universe (2^266).

The Block Header

This is a decoded version of the block header from block

00000000000000000000442ec33b694ec198ecce81ec54fb00156022e1838e3f at height 924, 444:

Below is the hexadecimal version. This is what got hashed as binary bytes twice with SHA-256. This one met the difficulty requirement to win the block.

Try it yourself by copying the block header and use the double SHA-256 calculator below:

00e00220c729a477609bb8ee47eddc43bd0fc5c2602e0b8c1ba200000000000000000000b91457ba322b3ed5b556b969f4dd2808995fa983054233946a0a1c42a5f53462f0471f6936d901171a2435ce

The Big-Endian result (leading zeroes) is what will be displayed on all the blockchain explorer as the block ID. The Little-Endian result (trailing zeroes) is what is processed internally within the software.

Finding the right hash

The goal of a miner is to find the right hash that corresponds to the current difficulty of the network. The difficulty adjusts every 2,016 blocks to maintain a ~10-minute block time. This is to ensure that the new Bitcoin supply remains predictable, like the halving every 210,000 blocks (or roughly every four years), and the last fraction of Bitcoin to be mined around the year 2140.

The difficulty is set by a target value (lower = more difficult), or put it simply, how many leading zeroes in the 64-character hash.

A new block added to the blockchain.

When a miner finds the right hash that meets the current difficulty by hashing the block header, all the rest of the information gets added to that block, that is, the transaction count and the list of transactions.

From there, Bitcoin nodes all around the world will verify that the block is valid and follow the rules. If it does, it will be added to the blockchain, therefore granting the Coinbase transaction to the miner, making him the owner of the full block reward (subsidy and transaction fees). If the miner doesn’t follow the rules, the nodes will reject his block, therefore loosing his reward after spending an enormous amount of resources. The nodes operate independently and are very cheap to run; this is to allow for wide decentralisation as seen in the chapter “The Blockchain”.

Bitcoin mining is worldwide.

People mine Bitcoin all around the world because all you need is internet, computing power, and electricity to start mining a global currency that no one can temper with or seize. The financial incentive allows for global mining adoption as miners chase cheaper electricity and Bitcoin-friendly countries to host their mining rigs. 

When a country decides to ban Bitcoin, they simply move to a different country. The only thing that could stop Bitcoin mining is a worldwide power or internet outage, but if that ever happens, we will have bigger problems on our hands than Bitcoin mining. Even then, it will simply resume as normal when power or internet comes back.

Security through Proof of Work (PoW)

Mining Bitcoin demands substantial computational power and energy, making it costly for malicious actors to attempt attacks like double-spending or rewriting the blockchain. To alter a block, an attacker would need to control 51% of the network’s hash rate, an economically prohibitive feat due to the decentralised network of miners.

Even if a miner gained 51% of Bitcoin’s network hash rate, launching an attack (such as double-spending or rewriting the blockchain) would be economically irrational. Such an attack would erode trust in Bitcoin, crashing its value and rendering the miner’s rewards worthless. The massive capital invested in specialized ASIC miners, which are purpose-built for Bitcoin mining and useless for other tasks, plus the enormous electricity costs, represent a sunk investment. Destroying Bitcoin’s value would ruin the miner’s business, as their infrastructure relies entirely on the network’s success, making cooperation more profitable than sabotage.

In summary, PoW ensures Bitcoin’s integrity, immutability, and trustless operation, safeguarding the network against tampering and fraud.

Is Bitcoin mining worth it for you?

Bitcoin mining’s worth depends on electricity costs, hardware efficiency, and Bitcoin’s price. High energy prices and competition from large-scale miners with advanced ASICs make it unprofitable for small-scale miners unless electricity is cheap (below $0.05/kWh). Efficient hardware like the Bitmain Antminer S19 can still yield profits in low-cost regions, but upfront costs (us$2,000-$5,000) and halving events reducing rewards (currently 3.125 BTC per block) shrink margins. For most individuals, mining is less profitable than buying Bitcoin directly, but it can support network security and decentralisation if done strategically.​​

You can use a mining calculator such as CoinWarz to work out if mining can be profitable for you depending on the miner you're looking to buy.

Solo Mining

Solo mining with low-power lottery miners like Solosatoshis offers an alternative to pool mining for those with high electricity costs. These compact devices use minimal energy, costing just a few dollars monthly, while still contributing to Bitcoin’s network decentralization. Unlike pool mining, where rewards are split, solo mining gives a slim but real chance to win a full block reward (currently 3.125 BTC plus fees), making it a low-cost, high-reward gamble for supporting the network. I personally use a Bitaxe Touch and find it amazing.

Check out their website by clicking on their logo below.

SOLO SATOSHI LOGO

Links to more mining equipment:

Just click on the images below to visit their website.

bottom of page