On first hearing the term Bitcoin mining, our mind may construct a dark dungeon embedded with glittering gold or diamond, reckoning with the sounds of ‘thud-thud‘ by pickaxes. As amusing as this may look, the practice of Bitcoin mining is far from this imaginary scenario. The only similarity albeit lies in the process of uncovering bitcoin resources, just like unraveling natural resources in the conventional mining practices.
Bitcoin mining is the process of verifying transactions and adding blocks in the distributed public ledger of the Bitcoin blockchain, by solving a unique puzzle. Each member (or connected computer) in the Bitcoin Network is referred to as a node, and the nodes indulging in mining are called miners. Though it might sound like an easy and a simple practice, the process can be fairly complex to grasp. Before we dive into the ins and outs of the process, let’s see why Bitcoin mining is essential.
- 1 The Significance of Bitcoin Mining
- 2 How Does Bitcoin Mining Work?
- 3 Rewards For the Miners
- 4 Challenges in Bitcoin Mining
The Significance of Bitcoin Mining
- Bitcoin mining is the backbone of the Bitcoin Network. The miners are responsible for checking the transactions occurring and securing the network from any malicious attack.
- Broadly, there are 3 main ways of getting bitcoins:
– Buying them from an exchange.
– Earning them via business transactions, and
– Mining bitcoins
- Bitcoin mining generates new bitcoins that are added in the cryptocurrency’s network. The network is designed in such a way that only 21 million bitcoins can ever be mined. So with every mining operation, miners try to uncover what’s left of fewer and fewer new bitcoins to come.
How Does Bitcoin Mining Work?
As introduced earlier, ‘Bitcoin mining is the process of verifying transactions and adding a block in the distributed public ledger of the Bitcoin Network by solving a unique puzzle’.
Let’s break this sentence into parts and look at each.
#1 The Process of Verifying Transactions
A transaction occurs when anyone receives or gives bitcoins to another Bitcoin user. The miners ensure that the participants of the transaction are not engaging in any kind of ‘double spending‘. For each block formation, miners verify transactions worth 1MB(megabyte).
In the crypto world, double spending is a malpractice involving usage of the same bitcoin amount for multiple transactions. Just like counterfeit money harms our economic system in the real world by throwing in currency that never exists, double spending is its digital equivalent. In a network (like Bitcoin) where there is no central authority, who’s to check how many coins you own? You could spend them repeatedly if supervision was lacking. This would lead to inflation as the currency experienced devaluation, and people would lose their trust in the system. Fraudsters commit double spending in the following ways:
- Quickly sending two conflicting transactions in the network to go undetected.
- Before a block is made public, a transaction is pre-mined into a block and the very coins are used in a bid to invalidate the transaction and still utilise the same coins.
- Under a 51% attack (more on this, later), schemers can wield autonomous control of the network, empowering them to create and spend money unchecked.
The former two practices are called Race attack and Finney attack respectively and necessitate a need for a transaction to be verified multiple times. In a decentralized network like Bitcoin, this can occur unless you have everyone else verifying your wallet and transactions. When a majority of the network reaches a consensus on the status of your wallet, it can be taken as your wallet’s legitimate state. When scaled up to every user in the network, the network can function properly without a central intermediary like a bank or regulator.
By verifying the transactions the miners keep the Bitcoin Network secure and free from fraudulent practices. They then become eligible to participate in the race of solving the unique puzzle. Among other items, this involves ensuring you have an adequate number of bitcoins for your transaction to take place.
#2 Adding a Block in the Distributed Public Ledger
The miners then compute these transactions to form a block. A block contains a number of verified transactions, picked by the miner. The newly formed block is then added to the blockchain network of the Bitcoin and is publicly available and accessible to each node in the network after solving a unique puzzle.
#3 Solving a Unique Puzzle
Now comes the play of consensus algorithms to work. Consensus algorithms govern the protocols through which a block is added in the chain. The Bitcoin Network employs ‘Proof of Work (PoW)’ to verify the legitimacy of the block being added. Under PoW, the miners have to solve a complex computational numeric problem. They have to guess a 64 digit hexadecimal number, called hash, which is less than or equal to the target hash of the block in consideration. The miners involved continue to guess the target hash till anyone of them first gauges the solution.
Why would anyone want to mine bitcoins though? Aside from the altruistic incentive of helping secure a network, why would anyone want to spend considerable resources on continually guessing hashes?
Because there’s more than just altruistic incentive involved. Since the blockchain is cryptographically encrypted (or hashed), and miners are spending their computing power trying to decrypt this blockchain, they’re rewarded in the same way most investments would reward users – with a higher return – in Bitcoins.
Rewards For the Miners
Miners are rewarded with bitcoin tokens in exchange for their service of adding a verified block of transactions to the network. It’s what encourages people to mine Bitcoins – the chance of gaining a substantially higher reward in exchange for their investment of resources.
A crucial aspect to keep in mind is that this reward, called block reward, is awarded only to the miner who first guesses the correct hash. If multiple miners simultaneously get this right, the miner winning the reward is decided by a majority consensus – 51% of all the miners.
The block reward for adding a block is halved every 4 years:
- In 2009 when Bitcoin was introduced to the world it was 50BTC.
- Then it was halved to 25 BTC in 2012 and 12.5 BTC in 2016.
- From May 12 India time, each miner successfully adding a block to the chain received 6.25BTC as the reward point.
This halving is critical, since the total number of Bitcoins is capped at 21 million. The halving event progressively reduces the rewards until we get to zero at the time of the 21st millionth Bitcoin.
The 2020 ‘halving event’ witnessed an exodus of some miners from the network because of low to no profit left in the game. But how can this network leave no profit for a miner, in the context of Bitcoin’s soaring rates? The answer to this question lies in the next segment of our discussion.
Challenges in Bitcoin Mining
The process of Bitcoin mining might appear as an easy and fun activity to engage in. But the process is infested with a key number of protocols and conventional problems that makes it challenging.
#1 Hash Difficulty
The hash difficulty refers to the chance of producing a hash below the target hash. The current difficulty level is in the range of 16 trillion. This means the probability of achieving a hash below the target hash is 1 in 16 trillion. The difficulty level is reformed after every 2016 blocks with an aim to keep the rate of mining constant. With an increase in the miners competing, the difficulty level also increases.
#2 High Competition and High Computational needs
Since mining presents a way to receive Bitcoin and being the most popular cryptocurrency in the industry, Bitcoin mining has attracted a large number of people since 2009. These miners employ cutting edge hardware, in some cases – supercomputers and fairly sophisticated computing technologies to beat other miners and claim rewards. The most popular of these being Application-Specific Integrated Circuits (ASICs) and advanced GPUs. As a result, it’s become practically impossible for individuals with low powered devices like desktop computers or even high performance GPUs, to mine a block.
#3 Rampant Resource Exploitation
The aforementioned high and superior technology equipment requires huge amounts of electricity to operate. Along with this, the need to keep them away from overheating requires powerful cooling systems that also consume enormous energy resources. Companies and organisations concentrated solely on Bitcoin mining setup mining rigs which utilise conventional resources in bulk to operate. The Bitcoin Energy Consumption index puts the annual electrical energy consumption from Bitcoin mining on par with the entire consumption of Bangladesh!
#4 The 51% Attack
Multiple miners combine their computational devices to earn rewards out of the Bitcoin mining process. The rewards are then equally distributed within a group. Such setups are called mining pools. The mining pools along with depriving other miners of the rewards, present a situation of 51% attack.
A 51% attack is a situation in which more than 50% of the miners get together. With the numbers in their favour, these miners have the power to alter and manipulate the existing system and keep all the rewards for themselves. Such an attack has yet never occurred in the Bitcoin econetwork, but multiple crypto assets have suffered such attacks.
Of course, there’s more to Bitcoin than just mining. But as you can see, it’s a fairly complex and exciting world to explore!