How Bitcoin Mining Works
Bitcoin, which started as a mysterious digital currency only understood and used by nerds and geeks has gained a lot of popularity in the last couple of years, and today, even your grandma has probably heard about it.
Bitcoin became so popular and in demand that, by the end of 2017, one Bitcoin was worth approximately $20,000. Today, however, the value of Bitcoin has gone down, with one Bitcoin being worth about $10,000.
Anyone who knows about Bitcoin has probably heard about the term Bitcoin mining.
Unless you are a geek yourself, however, you probably don’t know what exactly Bitcoin mining is or how it works.
If thinking of the term Bitcoin mining conjures in your mind images of earth movers, heavy equipment and mines going deep into the bowels of the earth, I’m sorry to burst your bubble. In this case, the term mining does not apply in its literal sense.
So, what exactly is Bitcoin mining? Why do people mine Bitcoin? If you don’t need earth movers and drilling equipment, what exactly do you need to mine Bitcoin?
If you are asking yourself any of these questions, you are in the right place.
In this article, I’m going to cover everything you need to know about Bitcoin mining.
What’s more, I’ll explain it to you in simple, non-technical language, such that by the end of the article, you will be able to confidently explain what Bitcoin mining is to a 5 year old kid.
Let’s dive in!
WHAT IS BITCOIN MINING?
Before we get into what mining is, it is important to understand how Bitcoin works and how it differs from fiat currency (the form of money we use in everyday life).
With paper money, it is the role of the government, through the central bank, to regulate how much money is in circulation.
If there is need for more money, the government can print more money as needed. In addition, with fiat currency, there is always a central authority tracking and verifying transactions to ensure that there are no fraudulent transactions.
For instance, if you make a wire transfer to my bank account, the bank acts as the central authority which keeps track of the transaction you have made.
The bank verifies that you indeed have the money to send to me, and then records the amount of money you have sent to me, which is debited from your account and credited into mine.
Similarly, if you pay for some goods online via PayPal, PayPal verifies that you have the money to spend, and then keeps a record of the transaction.
With Bitcoin, things are quite different. Bitcoin is a decentralized currency, which means that there is no central authority regulating it. If more Bitcoins are needed, the government cannot print or create more Bitcoins.
In addition, no government, bank, or payment processing company is there to verify and record transactions.
So, how are new Bitcoins created, and who verifies and records Bitcoin transactions?
This is where mining comes in.
Instead of a central body controlling Bitcoin and keeping track of transactions, Bitcoin transactions are recorded in a public ledger known as a blockchain.
This ledger is available to everyone within the Bitcoin network, which is what helps keep the Bitcoin network accountable.
For instance, if I have 2 Bitcoin and I send 1 Bitcoin to your wallet, this transaction will be recorded in the public ledger.
Once the transaction is recorded, everyone within the network will be aware that I have sent 1 Bitcoin and remain with 1 Bitcoin.
This way, I cannot claim to have more than 1 Bitcoin, since everyone in the network has a record of the transaction I just made.
In order for the transaction to be recorded in the blockchain, however, the nodes (computers) within the Bitcoin network have to verify that the transaction is valid.
This process of verifying transactions and adding them to the public ledger is what is known as mining.
HOW BITCOINS TRANSACTIONS ARE VERIFIED
When you send Bitcoin to another person, the details of the transaction are broadcast by your Bitcoin wallet to the Bitcoin network.
Your transaction, together with other pending transactions that have been made within the same period are grouped together in what is known as a block.
Nodes within the network will then verify the validity of this block before it can be added to the blockchain. Verification is done by solving complex mathematical puzzles.
The nodes in the network are in competition with each other, with each trying to be the first one to find a solution to the puzzles.
The node that comes up with a solution first notifies the rest of the network that is has found a solution.
While the other nodes are not aware what the correct solution is, they can pass the solution provided by this node through a hashing function to confirm whether this solution is indeed correct.
If 51% or more of the nodes within the network confirm that the provided solution is correct, the block is confirmed to be valid and the node that found the solution can now add the block to the blockchain.
This approach to confirming the validity of blocks is known as Proof of Work (PoW), owing to the fact that the node that came up with the solution had to prove to others that it indeed worked to come up with a solution to validate the block.
In return for its work, the winning node is rewarded with newly released Bitcoin, as well as the fees charged for the transactions within that block. This is known as the block reward.
If you are wondering how other nodes can verify whether a solution provided by the winning node is correct without knowing what the solution is, I’ll use an illustration to explain this.
Let’s assume we have a complex mathematical puzzle that you want to prove to me you can solve.
While I don’t know the answer to this puzzle, I know that if I apply a specific hashing algorithm to your answer, I will get hash X.
After you solve the puzzle, you apply the hashing algorithm to your answer and give me the resulting hash.
If the hash you provide is identical to the hash I have, that acts as proof that you have actually solved the puzzle. I still won’t know what the answer to the puzzle is, or how you came up with the answer, but I’ll be certain that you have solved the puzzle.
This is how the other nodes confirm that the winning node has found the correct solution, without knowing the solution themselves.
That’s how mining works. Basically, the nodes within the Bitcoin work provide bookkeeping services to ensure that all transactions within the network are valid. In return for their services, the nodes get paid with newly released Bitcoins.
The term mining was applied to this process owing to the fact that Bitcoin is seen as the digital version of gold.
Just like gold, there is a finite amount of Bitcoin. Just like gold, the more Bitcoin gets mined, the less there is to mine in future.
The total amount of Bitcoins is capped at 21 million. This means that there will never be more than 21 million bitcoins in existence. The more Bitcoins that are released during the mining process, the less there are remaining to be mined.
The amount of Bitcoin that miners receive for verifying blocks of transactions keeps halving at regular intervals, slowing down the rate at which new Bitcoins are released. Once all 21 million Bitcoins have been mined, no more new Bitcoins will be released.
Like I mentioned earlier, the total amount of Bitcoins that will ever exist is capped at 21 million.
The creator of Bitcoin designed the system such that new Bitcoin would be released gradually as miners continue verifying transactions.
However, what if a lot of computing power was applied to mining?
Would it be possible to mine all bitcoins within a short period?
Satoshi Nakamoto, the creator of Bitcoin, knew that by allowing all Bitcoins to be mined within a short period, Bitcoins would lose their value (inflation), and therefore he devised a system to ensure that new Bitcoins are released gradually.
Satoshi designed Bitcoin with a block processing time of 10 minutes, which means that it take approximately 10 minutes to validate a block and add it to the blockchain.
This is roughly the time it takes to solve the complex mathematical equations associated with Bitcoin mining.
Satoshi also created a self-adjusting system to ensure that this average block processing time does not change.
This is done by adjusting the difficulty of the complex mathematical puzzles that need to be solved based on the effort being expended to mine Bitcoins.
When a lot of people get into mining, increasing the amount of computational power being expended on mining, it becomes more difficult to solve the mathematical puzzles, ensuring that the block processing time does not decrease.
If some of the computation power is removed from the network, it becomes easier to solve the mathematical puzzles, ensuring that the block processing time does not increase.
This way, the Bitcoin system ensures that each block takes roughly 10 minutes to validate and release new coins, regardless of the amount of computational power being put into mining.
The difficulty of mining a block adjusts itself upwards or downwards every time 2016 blocks of Bitcoin are mined, something that takes about a fortnight.
BITCOIN MINING HARDWARE
Bitcoin mining is basically guessing various solutions to the complex mathematical puzzles until you stumble upon the correct answer.
Since you are in competition with other miners, your likelihood of finding the correct answer for a particular block and adding that block to the blockchain (and therefore winning the block reward) depends on how fast your computer is.
If you have a slow computer, then other miners will always solve the equations before you, and your mining efforts will not be sustainable, since you won’t be earning any bitcoins.
Over the years during which Bitcoin has been existence, there has been an evolution in the kind of hardware that is best optimized for mining, which is in itself a testament to the growing popularity of Bitcoin mining.
When it was first launched in 2009, Bitcoin was meant to be mined using standard CPUs.
This means that you could profitably mine Bitcoin using your normal desktop or laptop PC.
Back then, there weren’t a lot of people mining Bitcoin, which means the mining difficulty was relatively low.
About a year and a half after Bitcoin was introduced, more people started getting into Bitcoin mining, and CPUs started becoming less and less effective in mining.
In a bid to optimize their mining operations and enhance profits, some miners realized that high end graphics cards, which are normally used for video game consoles, were more effective at mining.
With that, CPUs were phased out by Graphical Processing Units (GPUs).
The fact that GPUs can be run in parallel allowed mining power to be increased by over 50 times, while reducing the amount of power consumption per unit of work.
While the GPUs remained in use for quite some time, miners were constantly looking for better ways to optimize their mining operations. Soon enough, miners started ditching the GPUs in favor of Field Programmable Gate Arrays (FPGAs).
FPGAs were the first dedicated Bitcoin mining hardware.
While FPGAs did not bring improvements equivalent to what GPUS brought over CPUs, they still made Bitcoin mining easier and more power efficient.
Whereas a GPU with a speed of 600 MH/s (Mega hashes per second) typically used over 400w of power, an 826 MH/s FPGA could typically consume a mere 80w of power.
The power efficiency brought about by FPGAs made it possible for the first mining firms to be operated profitably, and the Bitcoin mining industry took off.
Today, FPGAs have been phased out and replaced by dedicated mining equipment known as ASICs, which stands for Application-Specific Integrated Circuits. ASICs are designed with only one purpose – Bitcoin mining, unlike FPGAs which could be repurposed to handle other tasks.
Since they were specifically made for mining, ASICs brought with them over 100X increase in hashing power and made the greatest improvements in power consumption compared to all the other mining hardware that came before them.
Today, it is impossible to profitably mine Bitcoin without an ASIC.
Unlike all the other mining technologies that got phased out by better tech, it is highly unlikely that some other superior technology will replace ASICs.
What we can expect is that they will continue being refined to make them even more efficient.
While ASICs are greatly optimized for Bitcoin mining, the downside is that they can be quite expensive, especially for someone who is just starting out.
Considering how competitive Bitcoin mining has become, the only way to make consistent profits is to have a high-end, most up-to-date ASIC. Unfortunately, some of these costs thousands and even tens of thousands of dollars.
BITCOIN MINING SOFTWARE
In addition to the mining hardware, you will also need to run Bitcoin mining software on your dedicated hardware in order to mine Bitcoin.
Mining software is a special kind of program that connects you to the Bitcoin network and allows you to perform various activities related to Bitcoin mining.
The Bitcoin mining software relays information about Bitcoin transactions to your mining devices and delivers the work completed by your mining devices to the Bitcoin network as well as your mining pool (more in this in a short while).
In addition, the Bitcoin mining software keeps track of the general statistics of your mining device, including things such as the hashrate, the average speed of your mining device, the fan speed, the temperature, and so on.
While most of the Bitcoin mining being done today occurs in ASICs, most Bitcoin mining software has versions that can run on any operating system, including Windows, OSX, and Linux.
Some versions will even allow you to run the software on a modified Raspberry Pi.
There are quite a few Bitcoin mining software available for anyone looking to get into mining, each with its own pros and cons.
However, two of the most commonly used by most Bitcoin miners are CGMiner and BFGMiner.
If you find these to be a little bit complicated, you can also opt for EasyMiner, which comes with a graphical user interface that is well suited for beginners.
However, it’s also good to note that the mining software you end up using might be dictated to you by your mining pool.
BITCOIN MINING POOLS
I have been talking about mining pools for a while now, and you are probably asking yourself what they are.
Like I mentioned earlier, Bitcoin mining has become a very competitive activity.
There are hundreds of thousands, if not millions of miners out there.
Even with the most high-end ASICs, mining on your own (known as solo mining) is virtually impossible.
What miners are doing, therefore, is to come together, combine their computing power and form a mining pool.
With the combined computing power, there is a higher chance of solving the complex mathematical puzzles and earning the block reward compared to doing it alone.
The larger the mining pool, the larger the computational power, which means the greater likelihood of finding block solutions.
When you join a mining pool, you link your mining device to the pool’s network.
The mining pool assigns small tasks to your mining device. The amount of work done by your mining device is counted as shares.
When it comes to solving the puzzles, instead of having one device running the numbers trying to find the block solution, you have all the devices within the pool working on small parts of the puzzle.
This way, it becomes much easier to find the block solution.
Once a mining pool finds the block solution, the block reward is shared among the pool members based on the percentage of computational power they contribute to the pool. If you decided to mine by yourself, you would keep the whole block reward, but then you will probably never solve a single block on your own.
In this way, mining pools make it possible for those who have invested in mining equipment to earn frequent, steady, but smaller payouts, rather than hoping for a larger payout that might never come.
However, it’s also good to keep in mind that mining pools will charge you some fees, though the fees are usually quite low – about 2-3% of your payout.
To make it easier to understand why it is better to join a mining pool than try to go it alone, I’ll use an illustration. The Bitcoin network today has a total hashrate of about 60 exahash.
By comparison, a good ASIC has a hashrate of about 15 terahash.
This means that, as a solo miner, your chances of finding a block solution are about one in four million. It is even easier for you to win the lottery than to find a block solution as a solo miner.
When you join a large mining pool, sure, you will be getting only a small share of the block rewards, but then, you would actually be guaranteed that the mining pool will solve at least a couple of blocks per day.
Depending on the value of Bitcoin at the time, your small share of the block reward might add up to a decent amount of money at the end of the month.
It is good to note that, while majority of Bitcoin mining is being done through mining pools, no single mining pool (or individual) is allowed to have control of more than 50% of the total hashrate (computational power) within the Bitcoin network.
If someone gained control of more than half the total hashrate, they would be in a position to corrupt the blockchain, resulting in what is referred to as a 51% attack.
Bitcoin mining basically refers to the provision of bookkeeping services on the Bitcoin network in exchange for newly released Bitcoins and the block transaction fees.
Miners provide the bookkeeping services by validating transactions and adding them to the blockchain.
If you are thinking of getting started with Bitcoin mining, you need to buy an ASIC miner, since it is impossible to mine Bitcoin without this hardware.
In addition, it is advisable for you to join a mining pool, since it will increase your chances of earning a steady pay from mining.
Demystifying Entrepreneurship: How to Think Like an Entrepreneur
People normally think that entrepreneurs live a glamorous life. Living on your own terms, setting …
Empathy Definition & Ways to Increase Your Empathy
Have you ever been told to “put yourself in someone’s shoes”, or “look at it from another person’s …
The History of Hewlett Packard Computers
Today, the Silicon Valley in California is world-renowned as the center of technology and …
Share your thoughts and experience