What is Bitcoin Mining? | How does Bitcoin Mining work?

What is Bitcoin Mining?

In this article, we will tell you What is Bitcoin Mining? and How does Bitcoin Mining work? Before learning how does Bitcoin Mining works, we should know why is it called “Mining”. It is because Bitcoin is designed to have all the properties of gold. Because nobody should be able to create new bitcoin as easily as paper currency is printed. Plus, it should also have some scarcity. In order to get Gold, a human being has to work really hard. First, he has to figure out where there is a chance to find gold deposits, then he needs to spend a lot of money to buy huge machines, hire workers, dig the earth and bring the gold out. Even after such hard work, finally, there is no guarantee that gold will be found on earth. Because gold mining is a very costly affair and needs a lot of work. Proof for that time-consuming and costly work is the gold that the miners found.

So, how to implement the same mining concept digitally? Some scientists thought about it and they implemented a concept in Bitcoin called “Proof of Work” To explain what Proof of work is To obtain Gold, one has to do work or mining. In the same way, in order to get new Bitcoins, one has to do work or mining. Which means one has to run Bitcoin Mining software. For example: If this mining software is run by 100 different people in different countries, then how can one decide whom to award newly generated Bitcoins? That is why a competition sort of a thing is held among all those miners. That competition is about solving a mathematical puzzle. Whichever miner solves the puzzle first; he gets to send newly created bitcoins to his own address. So you might get a doubt whether these miners solve only these puzzles or if they do anything else? Miners do some other tasks also along with solving puzzles. Those are: Verifying all transactions in the Bitcoin network, grouping all verified transactions into a Block, and once a block is created, competing with other miners and solving puzzles.

What is Bitcoin Mining? | How does Bitcoin Mining work?
What is Bitcoin Mining? | How does Bitcoin Mining work?

How does Bitcoin Mining work?

These are the main activities performed by a Bitcoin miner. So let’s see what miners do for transaction verification. Anything in digital form can be easily sent to multiple people. Isn’t it? For example: If you have a word document on your laptop, you can easily send it to multiple people right? You can also make as many copies of that document as you want. This is applicable to anything that is in digital form. But, when we consider Bitcoin as money, this way of duplication shouldn’t be possible, right? Can you give the same hundred rupee note to two people? You cannot right? In the same way, it shouldn’t be possible to give the same bitcoin to two people. This is called the “Double Spending Problem”. So, miners are the ones who verify all transactions to make sure double spending doesn’t happen. In addition to double spending verification, miners verify if you have sufficient balance in your wallet to send the specified amount or not, if your destination bitcoin address is correct or not, etc. like this miner verify transactions according to a set of rules. Then, all the verified transactions are grouped and included in a block. Then they start solving the puzzle.

Now you might get a doubt as to what this puzzle is? In the Puzzle in every block, a hash of the previous block header is stored. So, to that previous block header hash, a number is added and hashed again. That number is called “Nonce”. Nonce and previous block header hash are combined and hashed together to get a resultant hash which is called “Current Block Header Hash”. But, the resulting hash cannot be any random hash. That hash has to start with a certain number of zeroes. That is called “Difficulty Target”. Or in technical terms, it is also called “nits”. Ok. Now in whatever WE just explained to you, Nonce is nothing but a Number. So, they keep on changing that number and hashing it along with the Hash of the Previous Block Header. They need to keep hashing like that till they get a hash that starts with a certain number of zeroes as per the difficulty target. For example: let’s say it should start with 4 zeroes. So, they need to keep hashing until they find a hash starting with 4 zeroes. So, no one knows how many combinations need to be tried before finding a hash with 4 zeroes. It is totally random.

Also Read: Top 9 South Remakes in Bollywood that Flopped and You didn’t Know\

Also Read: List of 7 Best Korean Movies on Netflix for You

Along with Nonce and Difficulty Target, a few other parameters are also added to the Previous Block Header Hash. As you are observing, in this way all miners take “Previous Block Header Hash” plus other elements along with Nonce and keep hashing. In all those inputs, they change only Nonce and continue hashing. They do this until they find a hash starting with the number of zeroes mentioned in the difficulty target. So, just like Gold Mining, it is a completely random process. Why because no one knows for which nonce they will find a hash that satisfies the difficulty target. They just have to keep changing the nonce and keep hashing. There are no other shortcuts. That’s why, in order to generate new bitcoins, miners have to do this work. Transaction Verification and Puzzle Solving.

Newly created Bitcoins are the proof that a miner has done that work. That is why this consensus algorithm is called “Proof of Work” In this way, a miner runs his mining hardware and software, solves puzzles faster than all others, and sends the newly created bitcoins to his own address. This type of transaction is called “Coin base Transaction”. So, the difficulty target that we discussed earlier doesn’t remain constant all the time. Because, if the difficulty target remains constant, then if anyone miner is using very powerful hardware and solving puzzles faster than all others, then blocks will get created faster and that miner will keep getting all the newly created bitcoin. That shouldn’t happen, right? That is why the Difficulty Target of the Bitcoin network keeps changing. For every 2016 block, which means for every 2 weeks, it resets.

What is Bitcoin Mining? | How does Bitcoin Mining work?

In the last two weeks, depending on the average time (number of minutes) it took for a block to be created, the software automatically sets the difficulty target for the next two weeks. In the last two weeks, if the average block generation time is less than 10 minutes, then the difficulty target increases and if it is greater than 10 minutes, the difficulty target decreases. This means, in the Bitcoin blockchain, difficulty target sets in such a way that a block will get created approximately every 10 minutes only. Ok? So, when Bitcoin started, Difficulty Target was only 1 zero. Currently, do you know what that Difficulty Target is? 18 zeroes!!! This means, when Previous Block Header Hash + Nonce + Other elements are hashed, the resultant hash should start with 18 zeroes. They have to keep hashing until they find such a hash. Whichever miner could compute a hash with 18 zeroes first, that miner would be awarded newly created Bitcoins. If we take a miner who was recently awarded newly created Bitcoins, do you know how many hashes he is trying? 6 Exa Hashes per second (6EH/s) Which means when he is computing 6*(10^18) hashes per second, he is finding one hash in 10 minutes that satisfies the difficulty target. This means he is finding a hash that starts with 18 zeroes. So, just think about how much computing power is necessary to solve the puzzle. This is how does bitcoin mining works.

Now, when the Bitcoin network first started, which is, when Satoshi Nakamoto mined the first block on January 3rd, 2009, First Bitcoin was created. That first Block is called the “Genesis” Block” At that time the mining reward used to be 50 Bitcoins. This means, for every 10 minutes, 50 Bitcoins used to be generated. But, at that time, there was no value to Bitcoin. It was almost zero. That is why no one can claim that Satoshi mined all Bitcoins initially for his own profits. So, this mining reward, for every 210,000 blocks which means approximately for every 4 years, gets halved. It was hard-coded like that in Bitcoin software. So, the first halving happened in 2012. Then the mining reward decreased from 50 Bitcoins to 25 Bitcoins. Then in 2016, the second halving happened. Then, the reward decreased from 25 Bitcoins to 12.5 Bitcoins. So, now we are in the same phase. Then the reward that Bitcoin miners get will decrease from 12.5 Bitcoins to 6.25 Bitcoins.

What is Bitcoin Mining? | How does Bitcoin Mining work?
What is Bitcoin Mining? | How does Bitcoin Mining work?

So, a lot of experts in the Crypto industry are predicting that Bitcoin price will rise exponentially after halving. So, if a miner verifies transactions, mines a block, and adds it successfully to Bitcoin Blockchain, the number of Bitcoins he will earn are 12.5 which means, based on the current Bitcoin price its value is $128,750. Which is equivalent to Rs 90,12,500. Like this, for every 10 minutes, one or the other miner is earning 12.5 Bitcoins or Rs. 90 lakhs Plus along with the mining reward, miners also get the transaction fees that users pay for every transaction in the Bitcoin network. This means, whichever miner added the last block successfully to the Blockchain, that miner will be given the fees charged to all the transactions in that block as a reward. So, a successful miner will get two things as a reward for his services. First one: Newly created Bitcoin Second one: Transaction Fees.

So, even that transaction fees are in considerable amount. For example recent block – Block Number: 592040. If we look at the miner’s transaction fees who solved this block, it is 0.124 BTC. This means, Almost $1,277 or Rs 89,404 Already a miner is getting Bitcoins as a reward, so, why are they giving even transaction fees to a miner? That could be your doubt. It is because, as WE told you earlier, this bitcoin reward keeps halving every 4 years. So, after a few years, for example: after 12-15 years if less than 1 bitcoin is given as a reward, then miners might not show any interest right? So, then, who will verify the transactions? The whole network security might get into trouble. That is why, even if this Bitcoin reward is reduced, as the Bitcoin network becomes more popular and as more and more people use it, transaction fees to miners will increase and will enable them to run their mining hardware continuously. That is why even the transaction fees are given as a reward to miners.

So, we know that in order to solve this mathematical puzzle faster all miners compete against each other. So, let’s see, what kind of hardware do these miners use in order to solve this puzzle. In 2009, these miners used to be very few people. So, using even normal computers – We.e. the computers that we use on a daily basis, they were able to solve these puzzles. But, as days passed by and as people realized the value of Bitcoin, more and more people started mining. And to solve this puzzle even faster, GPUs – which means – Graphics Processing Units were started being used. Because, when compared to our normal CPUs, GPUs have more processing capability, and at the same time they can create more hashes. Like this, a lot of miners started using multiple GPUs and solving puzzles faster. These are called “GPU Rigs”. Because of mining using these GPU Rigs, block generation time started decreasing. which means, in Bitcoin Blockchain, blocks started getting created in less than 10 minutes. So, as we discussed earlier, what happens when block generation time falls below 10 minutes? Yes, Difficulty Target will increase So, like that, after GPU mining started, the Difficulty target kept on increasing every two weeks. But, these GPUs used to consume a lot of electricity. And, as competition in mining further increased, thereby increasing the difficulty target, the cost of electricity started rising.

What is Bitcoin Mining? | How does Bitcoin Mining work?
What is Bitcoin Mining? | How does Bitcoin Mining work?

So, what miners did after that is, FPGAs Field-Programmable Gate Arrays, were modified and used for mining. The advantage of these FPGAs is that they consume very little electricity than GPUs. So, in 2011, the use of FPGAs for mining has increased a lot. After that, some miners figured out devices that can work much faster, and consume less electricity than FPGAs. They are ASICs. Application-Specific Integrated Circuits. Miners started using them for mining. The specialty of these ASICs is that they do only one specific task. For example: here it is solving the Bitcoin mining puzzle faster. These ASICs cannot do anything else other than this one task. But, that one task, will be done so much faster than CPUs, GPUs, and FPGAs. That is why a lot of miners started using ASICs for Bitcoin mining. That is how mining has transformed from an individual hobby to an Industry.

Now, these ASIC machines are manufactured by big companies like Bitmain, Bitfury, Halong Mining are manufacturing them in huge volumes. And now mining is done by big corporations who purchase thousands of ASIC machines and reduce electricity costs by moving into countries where cheap electricity is available. For example Countries like China, or to reduce cooling cost, moving into cold countries. For example Canada, Iceland, and Switzerland. And setting up big warehouses and mining. These are called “Mining Farms” So, Bitcoin Mining is no more activity of an individual. This means people like you and me doing Bitcoin mining are a waste! By using the computers that we have, based on the current difficulty target, if we have to find a hash that starts with 18 zeroes, it will take a MILLION years! Which means, it is almost impossible. That is why miners who used to use GPAs and FPGAs plus individual miners who used to mine using ASIC machines realized that mining Bitcoin individually is a waste and a bunch of miners came together to form a group, pooled all their equipment, and started mining together.

What is Bitcoin Mining? | How does Bitcoin Mining work?
What is Bitcoin Mining? | How does Bitcoin Mining work?

These kinds of setups are called “Mining Pools” Currently, if you look at the Bitcoin Block Explorer, and analyze for every 10 minutes which miner is creating blocks, and which miner is getting 12.5 Bitcoins, you will see that 80-90% will be mining pools. In mining pools, BTC.com, AntPool, SlushPool, F2Pool, ViaBTC can be considered as the top 5 mining pools. The main advantage of these mining pools is: Because everyone’s equipment is pooled together and used for mining, based on the mining capacity that you have contributed, the mining reward won by the pool will be distributed to you too. If you are eager to participate in Bitcoin mining, then you can buy an ASIC machine and join any mining pool that you like.

Finally, let’s learn what is the use of mining in the Bitcoin network First use is: Security Main motto of mining is verifying whether all the transactions happening in the Bitcoin Network are correct or not, and providing security to the network. You might ask, how will it provide security? It will because, the more miners the network has, the higher the difficulty target will be. And, for hackers to hack this Bitcoin Network becomes that much more difficult. If you observe, the entire mining power of all miners in Bitcoin Network is currently 76 Exa Hashes per Second. which means, almost 76 Billion Giga Hashes per Second. That means, if any hacker, using mining equipment tries to hack Bitcoin Network, by changing transactions in its ledger, then he has to buy at least 7 lakh highest-powered ASIC machines available in the market today That means, one has to spend almost 2 Billion Dollars to hack this network for 10 minutes.

The second use is: Incentives Because Bitcoin Blockchain is distributed, no one organization controls it, and because no organization provides mining equipment to these miners and pays their salaries, the miners who provide security to this network need to have some incentive right? So, that is why through this mining, new bitcoins that are created every 10 minutes, will be given to successful miners as a reward. So that, because of the incentives, miners will keep mining continuously and the network will remain secure. There is a reason why they say: “Incentives are everything”!

What is Bitcoin Mining? | How does Bitcoin Mining work?
What is Bitcoin Mining? | How does Bitcoin Mining work?

Ok, so those were the full details regarding Bitcoin Mining. So, now you know, What is Bitcoin Mining, and how does Bitcoin Mining work? Why do miners mine Bitcoin? and whether ordinary people like us can mine Bitcoin profitably or not?

Also Read: How to Get Orders on Fiverr? Best Tool for Fiverr Gigs

Also Read: List of 10 Best Interior Designers in India (2021)

Also Read: How to Play Business Game (2021): Rules of Business Game

Leave a Reply

Your email address will not be published. Required fields are marked *