All of us have heard that crypto is a ‘decentralized form of money.’ It is a peer-to-peer transaction. And if that’s the case, there is no one safeguarding your interests while you are transferring crypto. In a traditional banking ecosystem, you can reach out to the bank if there is an issue with your funds. However, there are no banks involved in the crypto mining world. So how does one ensure everything is working as expected?
Enter: Miners. Miners validate the transaction and get rewarded with the tokens (BTC, ETH etc.) in return for that effort. Since they are doing some work to get these rewards, the process is called ‘crypto mining.’
So in this article, we plan to talk about what is crypto mining and how it works. The term mining has undergone a paradigm shift ever since crypto came into picture. It is like creating a crypto token out of thin air. Let’s explore this in detail.
Blockchain is made up of blocks of data. These blocks are stacked on the top of one another, like Legos, hence forming a blockchain. However, a block cannot be added randomly to the blockchain. Before adding this block, all the transactions within this block have to be validated to ensure everything is fine. The process of validating these transactions to add the next block in the blockchain is what’s known as crypto mining.
With that explanation out of the way, the next logical question that comes to our mind is that how does one validate the transaction? What is really meant by validation? This cannot be a manual process for sure. You cannot expect a person to manually sit and calculate if these transactions are correct. So, what is happening in the background?
If you’ve already started venturing into crypto space, you must have come across this statement multiple times: ‘Miners solve a complicated mathematical problem to add the next block in the blockchain.’
This mathematical problem is based on a technical cryptography algorithm called SHA256.
Without going into too much detail, think of it as a game of guessing using nothing but all permutations and combinations. Here’s an example:
Think of it in the form of a simple equation like this: A+B = C
Miners are already aware of what A and C are. What they are trying to do is guess B. There is no way of guessing B without using numbers randomly from 0 to 1,2,3… and so on.
The one who solves this puzzle gets to win the rights to mine the next block and hence claim the rewards.
But anyone can set up a node and take part in the Blockchain maintenance and validation. There are multiple ‘nodes’ (individual computers) that would want to earn some crypto rewards. So how do we decide who gets to mine the next block?
Turns out that there are multiple ways of deciding the next miner.
A consensus algorithm is a procedure by which all the nodes in a network come to an agreement on the current state of the network. Simply put, it is the method by which everyone agrees to decide if the next block is worth stacking in a blockchain.
Now depending on the Blockchain, this task is carried out in multiple ways.
Back in 2008, when Blockchain technology emerged with the advent of Bitcoin, the consensus algorithm used was ‘Proof of Work’ or PoW in short.
Later a lot of Blockchains moved to something called ‘Proof of Stake’ or PoS. Currently, there are about 9 different consensus mechanisms being used across different blockchains that exist today. However, 80% of these Blockchains use either PoW or PoS.
Interested in understanding what is PoW and PoS? Well, you have come to the right place. Let us dig deeper.
In a proof of work consensus algorithm, all the nodes compete with each other to find the answer to the mathematical puzzle discussed above.
Think of it like a car race. Only one driver is going to win the grand prize (which in our case is the crypto). However, all of them try their best to win it. Who is the eventual winner, you ask? The fastest of them.
While the speed of the car has so many variables attached to it, for a Blockchain, it is rather simple. The node which can compute faster will reach the answer quickly. This solely depends on the processing power of the system deployed for mining.
This is why you would see a lot of mining rigs have multiple graphic cards stacked together to extract the maximum potential and ultimately mine faster than everyone else.
Some of the blockchains that use proof of mining consensus algorithms are Bitcoin and Ethereum.
If you are wondering how much reward we are talking about here, it is currently at 6.25 BTC per block for Bitcoin. This number gets halved roughly every four years. Back in 2008, this number was 50. (We would recommend you to not calculate the dollar value of this now as it will just hurt at this point.)
Another aspect that we wanted to highlight was around proof of work (BTC specifically) and environmental concerns.
By now, you might have guessed what this tussle is about. While multiple nodes gun for the rewards, giving it their best shot, only one of them stands a chance to win.
What happens to the computational power spent by all the other nodes? You guessed it right. It goes to a waste. If you are still unable to connect the dots, this computational power is generated through electricity and that is where the environmental concerns start rising.
With growing concerns over environmental problems with the proof of work consensus algorithm, the industry came up with an alternate way of reaching agreement. This time around the winner of the reward wasn’t the one who solved the problem, fastest.
In a proof of stake algorithm, only one node gets an opportunity to forge the next block. This means that there is no extra energy (electricity) being spent to validate the transactions.
But if only one node is solving the mathematical problem, how do we ensure that this node doesn’t dupe the network? More importantly, how is this node chosen?
Turns out, in order to take part in the proof of stake consensus algorithm, you need to stake some of the native crypto to become eligible to validate the transactions (mine). This amount is generally kept a little higher with an intention to onboard only the serious players. So, when you have a skin in the game, it is highly unlikely that you would cheat right?
The next miner is chosen on the basis of multiple factors like amount staked, time spent in the network, and an element of randomization.
Now this race is being run by a single node (car) and hence there is no need to rush and spend massive amounts of power to win it. But that doesn’t mean that a node can now take its own sweet time and commit mistakes while validating.
If anything goes wrong, the network levies a penalty on that node and chances of it getting selected for the upcoming blocks decrease significantly.
The image below will highlight the key difference between PoW and PoS:
Technically, there is no eligibility criteria for someone to become a miner. Anyone with technical knowledge can start mining. However, unlike older times when people used personal computers to mine, things have changed significantly now.
This is because the Bitcoin blockchain is made to evolve and adjust the difficulty of the mathematical problem every two weeks roughly. The more people who start mining (competition), the more difficult it gets to reach a solution.
Therefore, with the existing situation, it is very difficult to mine unless you invest in high power GPUs (Graphic Processing Units) which range from $500 to tens of thousands of dollars. Apart from that, one of these machines is probably not going to cut it.
Today, Bitcoin mining hardware is almost entirely made up of ASIC machines, which in this case, specifically do one thing and one thing only: mine for Bitcoins.
Well, lucky for us, mining is not the only way to make money off the cryptocurrency market. Trading, buying and holding, smart investing are multiple ways through which you can get started in this new age technology. Wondering what could be your first step? Here’s the hint you needed.