What is Bitcoin Mining and How Does it Work?
Introduction to Mining
Bitcoin mining is the act of using computer processors to solve cryptographically complex puzzles as a means of validating transactions.
It is called mining because every time a certain type of cryptographic puzzle is solved a new set of Bitcoin is found and distributed to the miners as a reward. Mining is a core part of Bitcoin and its decentralized technology.
These Bitcoins are essentially unearthed from the Bitcoin network, meaning that they always existed in the technology but were just not obtainable until mined. Every Bitcoin which is used for transactions was once mined for.
The Bitcoin network states that there are a total of 21 million Bitcoins which can be mined. There are about 17 million of those Bitcoins have already been mined to date.
Essentially it is the job of the miner to bring these remaining 4 million Bitcoins to the forefront. Miners are rewarded in newly found Bitcoins after they help to validate transactions on the Bitcoin network by placing them on the blockchain. Miners are rewarded in both the new Bitcoins and the transaction fee used.
Using Mining Nodes
To mine Bitcoin, you need to have a mining node. Nodes are computers which run the Bitcoin network on them with an updated version of the blockchain.
Their purpose is to broadcast to the world all changes to the blockchain by connecting with other nodes; they are a huge element of making Bitcoin decentralized.
Mining nodes do not just broadcast changes to the blockchain, but also make their own changes. They group together as many non-validated Bitcoin transactions as possible and place them into a block which is put on the blockchain; thus validating and confirming them.
To be able to place the transactions in a block, the mining node needs to solve a complex cryptographic puzzle and then include the answer within the block.
The answer it is looking for is a number between 0 and 4,294,967,296. The Bitcoin protocol randomizes the answer so the best method of finding it is by taking numerous guesses.
To find the answer, mining nodes (or simply ‘miners’) take a guess at a number and apply a security tool called the ‘hash function’ to both the guessed number and all the data in the block.
If the number is correct then the block will be placed on the blockchain and the miner will be rewarded. The miner then broadcasts the updated blockchain to the world. The reward for such an action is a set of freshly mined Bitcoins. There is no way to predict what the solution will be, as all numbers give excessively different results with little similarity.
The current reward for solving a puzzle and placing a block on the blockchain is 12.5 Bitcoins, which is worth above $125,000 right now. This will change in the future as the reward number gets halved after a total of 210,000 blocks have been solved.
It is estimated that the next time the reward will halve is on June 3rd, 2020 and that there are 123,121 blocks left to mine before that happens.
The reward price will then be 6.25 Bitcoins. While this does sound like a significant amount of money, anybody considering mining as a career needs to consider the costs. To start you will need to buy a specialized piece of hardware called an ASIC miner.
Most good ASIC miners cost upwards of $3,000, with the AntMiner s9 (the most efficient miner to date) at around $4,200. Then, you need to consider the electricity costs as all-powerful miners drain electricity at an excessively fast rate.
For many people, the electricity cost will be more than the mining reward. You also need to factor in the cost of keeping your ASIC miner cool.
One additional thing to remember is that solving these puzzles is a game of luck, and you will be competing with every other miner to solve them. The more powerful your mining setup is the more guesses you can perform, therefore giving you a higher chance of success.
How Hard are the Puzzles?
The Bitcoin developers decided that solving these puzzles should be challenging, but they also decided that it should not take longer than ten minutes to find the answer and place a block on the blockchain.
They agreed that one block every ten minutes was enough to keep the Bitcoin network functional, usable, and fast. The difficulty of each puzzle is often altered for this purpose.