What is Bitcoin mining?
What sets Bitcoin (and the majority of cryptocurrencies) apart from the banks or money remittance systems like PayPal is the fact that it is decentralized. Here’s what it means.
When you transfer the money from one bank account to another, the financial institution carries out the transaction. While the money is on any bank account or is being sent from one user to another, one single company controls it and approves the transaction. Technically, it has all the power to deny you access to your funds at any given moment. Of course, that would damage its reputation, so a bank doesn’t do it. The point is that it can do it.
The same is true for all centralized money storage and remittance systems, all the banks included.
Bitcoin is different. It doesn’t have a single organ that approves transactions. Instead, it allows any of thousands of miners to approve them. Mining process also ensures that the network is fully secure. Read on for a detailed explanation of how all of this works.
Functions of Bitcoin mining
Bitcoin mining is crucial for the world’s biggest cryptocurrency both from the economical and technical point of view. It has three main functions:
- Transaction validation
- New bitcoin creation
- Securing the network
Here is how mining ensures all these functions work correctly.
The goal of miners is to include transactions published on the blockchain in the blocks, thus validating them.
An aspect users should pay close attention to is transaction confirmation count:
- If transaction is not yet included in a block, it has 0 confirmations. It can still be reversed.
- If transaction is included in a block (let’s call it “block X”), it has 1 confirmation. Still, it is not considered secure enough.
- Each new block added after block X is a new confirmation.
- Usually, the payment is considered secure after 3-6 confirmations. The exact confirmation count needed for transaction to be considered valid depends on the merchant.
New bitcoin creation
For every new block created, miners receive a reward – currently, 12.5 BTC. This is the only way to create new bitcoins.
The amount of this reward is dictated by the Bitcoin protocol. “What if the protocol is changed?” you may ask. Well, in order to change Bitcoin protocol, more than 50% of miners would have to accept this change, which is practically impossible.
Securing the network
In order to attack a Bitcoin network, one has to have more than 50% of the network hash rate. Therefore, the greater the total network hash rate, the harder it would be to have more than 50% controlled by a single person or organization and the more secure the network is.
The good news is that the total hash power of Bitcoin network continues to steadily increase. Recently, it reached new all-time high values:
How Bitcoin mining works?
Bitcoin mining process is carried out by thousands of computers. During the mining process, each computer tries to solve a puzzle by running a hash algorithm over and over again. The first computer to solve it gets the mining reward. The new block is created.
The more powerful the computer is, the more times per second it can run hash algorithm, the higher its probability of getting the reward.
Mining process, step-by-step
- One of the miners (let’s call them “miner X”) manages to solve a “puzzle”. A part of the pending transactions from the memory pool gets included in the block. Important: the bigger the fee per byte transaction issuer has paid, the more likely transaction is to be included in the next block.
- The newly mined block gets sent to the whole miners’ network together with the produced solution. The solution gets validated by other miners. They can do it because the “puzzle” is hard to solve but easy to validate. Think of it as a cryptographic analog of Rubik’s cube.
- Each miner that validated the solution updates its copy of the Bitcoin transaction ledger with the newly created block.
- The algorithm rewards the miner X with a certain fixed amount of Bitcoins. At the moment of publishing, this reward is 12.5 BTC. In addition, miner X receives transaction fees of all the transactions included in the new block.
When a computer mining Bitcoin manages to solve the “puzzle”, the algorithm rewards it with a certain fixed amount of Bitcoins (12.5 BTC at the moment of publishing) and transaction fees of all the transactions included in the new block.
The reward cannot be changed, because it is dictated by the Bitcoin algorithm. It ensures a steady flow of bitcoins in the system at a predictable rate. The maximum supply the system will ever reach is 21 million bitcoins.
Halvening is a 50% reduction in mining rewards. It happens every 210 000 blocks, which is approximately every 4 years. The next halving is going to happen in 2020.
Historically, Bitcoin price has skyrocketed every time after each halving. This is one of the reasons why mining still remains profitable even if rewards are cut in half.
Satoshi Nakamoto, the creator of Bitcoin, wanted the system work in such a way so that a new block would be produced every 10 minutes on average. However, miners tend to join or leave Bitcoin network. If network’s total hash power increases, the blocks would be produced faster than that; the opposite is true if total hash power falls.
In order to control this process, mining difficulty adjusts approximately every 2 weeks. If the blocks are being produced too slowly, mining difficulty decreases, and vice versa. The process is part of a Bitcoin protocol, is fully automatic and is not controlled by anyone.
Detailed information about the current mining difficulty can be found here.
Mining process can be carried out using different hardware. There are 4 main mining types by hardware:
- CPU mining
- GPU mining
- FPGA mining
- ASIC mining
All of these types work. However, their efficiency varies. Nowadays, only one of these mining types makes sense economically.
Here’s a little more about each of these methods.
Every computer has a processor – a CPU. In Bitcoin’s early days, miners were using CPUs to process transactions and keep the network up and running. Back then, the competition among miners was weak, the mining difficulty was low, and CPUs were powerful enough for mining.
Now, the situation is completely different. The CPUs are just too slow and inefficient to be able to keep up with other mining hardware and be competitive. You still can mine Bitcoins with CPU, but there is no point in that: you would probably pay more for electricity than earn from mining. Even if you managed to turn in a profit, it would be very small compared to potential profits from other mining types.
Users first started to first use GPUs to mine bitcoins around 2011. GPUs, which are mainly made for handling 3D graphics, turned out to be surprisingly efficient at mining. Roughly estimating, a single GPU is approximately as powerful as 30-35 CPUs when mining.
Even though it is not the most efficient mining type, it is still fairly popular for a number of reasons. First of all, GPUs are only several hundred USD more expensive than CPUs while being much better at mining. What’s more, unlike more efficient mining hardware, GPUs can be used for things other than mining. Anyone can build a PC with a powerful GPU to play games several hours a day and mine cryptocurrencies in the meantime.
FPGA is a piece of hardware that is much more efficient at mining than a GPU. In fact, FPGAs can deliver ten times the hashrate of a GPU while consuming much less electricity. FPGAs even have an advantage over ASIC miners. While the latter is configured by a manufacturer to run a specific algorithm that cannot be changed, FPGAs can be configured at any given time.
The caveat? There are two of them, actually. First of all, FPGAs are significantly more expensive than the GPUs and typically cost several thousand USD. Additionally, this type of hardware is extremely hard to configure and requires technical knowledge. Looking for a plug-and-play solution? FPGA is not for you.
Currently, ASIC is the best solution for large-scale mining. It is the most energy-efficient way to mine Bitcoins that doesn’t require as much knowledge as FPGA mining does. ASIC was first introduced in 2013; since then, the technology has significantly improved. As for now, ASIC miners dominate the Bitcoin mining.
However, such efficiency comes at the price of versatility. ASIC miners can only run the script they were designed to run by the manufacturer. Once you buy ASIC miner, you can only mine several certain types of cryptocurrency. If their price goes down, it is impossible to just switch to mining a different coin.
Although this sounds like yet another type of mining, it is not. Cloud mining is a type of service which allows users to rent mining hardware online. Most of these services are scams; the ones that are not are usually not profitable. Why? Well, there is no reason any company would rent out mining hardware and earn less than it would earn from mining itself. The business model of cloud mining services just cannot work and be profitable both for users and the company.
In general, it is a high risk, low return type of investment users should steer clear of. It is much more reasonable to buy Bitcoin as an investment than spend the same amount of money on renting the mining hardware.
What are mining pools?
Roughly estimating, there are more than a million computers mining Bitcoin worldwide. Each one of these computers tries to solve the “puzzle”. What are the chances that your computer will be the first to solve it? Astronomically small. It is almost impossible to earn a reward by mining solo.
This is exactly the reason why mining pools exist. Mining pools are large groups of miners which share their rewards. Here is how it works:
- One of the miners in the mining pool manages to solve the “puzzle” and gets the reward
- The reward gets distributed between all the miners accordingly to the amount of hash power each one contributed. Here is an example:
Let’s say there exists a hypothetical mining pool – let’s call it “Pool X”. Pool X has three miners – miner A, miner B and miner C. Miner A has contributed 5H/s, Miner B – 3H/s and miner C – 2H/s. The total hash power of Pool X is 10 H/s.
Suppose miner B has solved the “puzzle”. He gets the reward and it gets distributed among all the Pool X miners. Miner B gets 30% of the reward, because he contributed 30% of mining power. Other miners in the Pool X also get rewarded accordingly, even though they didn’t solve the “puzzle”. Miner A gets 50% and Miner C gets 20%.
The largest mining pools
There are more than 10 large mining pools, according to blockchain.com data:
Should you mine Bitcoin?
Suppose you want to invest money somewhere. Is buying mining equipment and mining Bitcoin a good option? In order to get an answer to this question, try to answer the following ones:
- Are you willing to invest several thousands USD in proper mining equipment, such as ASIC miners?
- Are you willing to deal with mining rewards being unpredictable due to the Bitcoin volatility?
- Are you ready to accept the fact that mining can become much less profitable or not profitable at all if electricity price in your area increases?
If you answered at least one of these questions negatively, then you probably should not mine bitcoins.
How to mine Bitcoins?
If you want to mine Bitcoins as a hobby or are still hoping to profit for it, here is a step-by-step for you.
Calculate potential profit
First of all, find out whether you really will be able to earn or at least whether it won’t be too expensive for you to mine. Take several factors into account:
- Price of equipment
- Price of electricity
- Electricity consumption of equipment
- Total hash power of equipment
If you want to mine as efficiently as possible, then you should buy an ASIC miner. Love tinkering with hardware and want something more customizable than ASIC miner? FPGA is the way to go.
Create a Bitcoin wallet
Find and join a mining pool
Mining solo is not an option if you do not want to invest millions in mining hardware and want to receive reward. You have to join a pool. Why? The reasons are stated here.
Here are the main factors you should consider when choosing a pool:
- What is the reward method? (Proportional/Pay Per Share/Score Based/PPLNS)
- What fee they charge for mining and withdrawal of funds?
- How frequently the pool finds a block? (= how frequently you will get rewarded)
- How easy it is to withdraw funds?
- What kind of stats does it provide?
- Does the pool offer BTC + NMC merged mining?
- How stable is the pool?
Important: always set up at least one backup pool in the software you use. In case you don’t do it, it is possible that your miner will be without work for some time, if the main pool goes down.
You can find more information about mining pools here.
Get mining software and start mining
You will need to download special software to connect your mining hardware to the mining pools. Some mining pools have their own software, some don’t, so make sure to make a little research before making your final decision.
After installing the software, connect your mining hardware to power outlet and turn it on. Then connect it to your PC with software installed (usually this is done via USB). The next step is configuring your software. Enter your mining pool’s address, username and password.
Once you have completed the setup, congratulations, you can start mining. Have fun!
We hope you enjoyed the article. If you found it helpful, feel free to share it and join our community and digest!