What Exactly Is Bitcoin Mining?
Bitcoin mining is the mechanism through which new bitcoins enter circulation, but it is also an important component of the blockchain ledger’s upkeep and evolution. It is carried out with the aid of highly advanced computers that answer incredibly complex computational math problems.
Cryptocurrency mining is time-consuming, expensive, and only seldom profitable. Nonetheless, mining has a magnetic allure for many cryptocurrency investors since miners are paid with crypto tokens for their efforts. This could be because, like California gold prospectors in 1849, entrepreneurs saw mining as a source of pennies from heaven. And why not, if you’re technologically inclined?
However, before you commit the time and money, read this explanation to see if mining is truly for you. We’ll concentrate on Bitcoin (we’ll use “Bitcoin” to refer to the network or cryptocurrency as a concept throughout, and “bitcoin” to refer to an amount of individual tokens).
IMPORTANT TAKEAWAYS
Mining allows you to earn cryptocurrencies without having to put any money down.
Bitcoin miners are rewarded with Bitcoin for completing “blocks” of validated transactions that are added to the blockchain.
Mining incentives are awarded to the miner who discovers the solution to a complex hashing puzzle first, and the likelihood that a participant will be the one to discover the answer is proportional to the network’s total mining power.
To set up a mining rig, you’ll need either a GPU (graphics processing unit) or an application-specific integrated circuit (ASIC).
A New Rush for Gold
The potential of being compensated with Bitcoin is the key lure for many miners. To be sure, you don’t have to be a miner to hold bitcoin tokens. You can also buy cryptocurrencies using fiat currency, sell them on an exchange like Bitstamp with another cryptocurrency (for example, using Ethereum or NEO to buy Bitcoin), or earn them by shopping, posting blog articles on platforms that pay users in cryptocurrency, or even setting up interest-earning crypto accounts. Steemit is an example of a crypto blog platform, similar to Medium, except that users can reward bloggers by paying them in a proprietary cryptocurrency called STEEM. STEEM can then be exchanged for Bitcoin elsewhere.
The Bitcoin reward that miners earn is an incentive that pushes people to help with the fundamental goal of mining: legitimizing and monitoring Bitcoin transactions to ensure their validity. Bitcoin is a “decentralized” cryptocurrency, or one that does not rely on any central authority, such as a central bank or government, to monitor its regulation, because these tasks are distributed among numerous users all over the world.
How Do You Mine Bitcoin?
Mine workers are compensated for their duties as auditors. They are in charge of determining the validity of Bitcoin transactions. Satoshi Nakamoto, the creator of Bitcoin, devised this standard in order to keep Bitcoin users honest. Miners help to prevent the “double-spending problem” by confirming transactions.
A case of double spending occurs when a bitcoin owner spends the same bitcoin twice. This isn’t an issue with actual currency: once you hand someone a $20 bill to buy a bottle of vodka, you no longer have it, thus there’s no risk of using the same $20 bill to buy lottery tickets next door. While there is the chance of counterfeit money being produced, it is not the same as spending the same dollar twice. However, with digital currency, “there is a possibility that the holder could make a replica of the digital token and transmit it to a merchant or another party while keeping the original,” according to the Investopedia dictionary.
Assume you have one genuine $20 bill and one counterfeit $20 bill. If you tried to spend both the actual and phony bills, someone who looked at the serial numbers of both bills would see that they were the same number, indicating that one of them had to be a forgery. A Bitcoin miner does something similar: they review transactions to ensure that users have not illegitimately attempted to spend the same bitcoin twice. This isn’t a great parallel, as we’ll discuss more down.
Miners are eligible to be rewarded with bitcoin after verifying 1 MB (megabyte) worth of bitcoin transactions, known as a “block” (more about the bitcoin reward below as well). Satoshi Nakamoto imposed the 1 MB limit, which is controversial since some miners believe the block size should be expanded to contain more data, which would effectively mean that the bitcoin network could process and validate transactions more quickly.
It is important to note that validating 1 MB of transactions qualifies a coin miner to earn bitcoin—not everyone who confirms transactions will be paid out.
1MB of transactions can theoretically be as little as one (though this is extremely rare) or as much as several thousand. It is determined by how much data the transactions consume.
“So, even after all of the work of confirming transactions, I might not earn any bitcoin for it?”
Yes!
Two conditions must be met in order to earn bitcoins. One is a matter of work, while the other is a matter of chance.
1) You must validate 1MB of transactions. This is the simple part.
2) You must be the first miner to find the correct answer, or the closest answer, to a numerical issue. This is sometimes referred to as proof of work.
“What exactly do you mean by ‘the correct answer to a numerical problem’?”
The good news is that no advanced math or calculation is required. You may have heard that miners solve complex mathematical problems—this is not entirely correct. They are attempting to be the first miner to generate a 64-digit hexadecimal number (a “hash”) that is less than or equal to the goal hash. It’s all a matter of assumption.
The bad news is that it’s guesswork, but with billions of different guesses for each of these problems, it’s really difficult labor. Miners require a large amount of computational power to solve an issue initially. You must have a high “hash rate” to mine successfully, which is measured in megahashes per second (MH/s), gigahashes per second (GH/s), and terahashes per second (TH/s).
That’s a lot of hashes.
If you want to estimate how much bitcoin you could mine using your mining rig’s hash rate, Cryptocompare has a handy calculator.
Bitcoin mining and circulation
Mining plays an important function in addition to padding miners’ pockets and supporting the bitcoin ecosystem: it is the only way to put fresh money into circulation. Miners, in other words, are essentially “minting” cash. For example, there were around 18.5 million bitcoins in circulation as of November 2020. 1 Aside from the coins created by the genesis block (the very first block created by inventor Satoshi Nakamoto), every single Bitcoin was created by miners. In the absence of miners, Bitcoin as a network would continue to exist and be useful, but no new bitcoin would be created. Bitcoin mining will eventually come to an end; according to the Bitcoin Protocol, the total amount of bitcoins will be limited to 21 million. 2 However, because the rate at which bitcoin is “mined” decreases over time, the last bitcoin will not be disseminated until around 2140. This is not to say that transactions will no longer be validated. Miners will continue to validate transactions and will be compensated for their efforts in order to maintain the network’s integrity.
Aside from the short-term Bitcoin reward, being a coin miner can provide you with “vote” power when improvements to the Bitcoin network protocol are suggested. In other words, miners have some say in the decision-making process when it comes to things like forking.
How Much Does a Miner Make?
Every four years, the rewards for bitcoin mining are cut in half. When bitcoin was originally mined in 2009, mining a single block yielded 50 BTC. In 2012, this was cut in half to 25 BTC. By 2016, this had been cut in half again, to 12.5 BTC. The incentive will be cut in half again on May 11, 2020, to 6.25 BTC. If the price of Bitcoin in November 2020 was at $17,900 per Bitcoin, you’d get $111,875 (6.25 x 17,900) for finishing a block. 3 It may not appear to be a bad incentive to solve the complicated hash problem described above.
If you want to know when these halvings will take place, you can use the Bitcoin Clock, which updates this information in real time. Surprisingly, the market price of bitcoin has historically tended to correlate closely with the decrease in the number of new coins put into circulation. This reduced inflation rate increased scarcity, and traditionally, prices have grown in tandem.
If you want to know how many blocks have been mined so far, there are various websites, such Blockchain.info, that will provide you with that information in real-time.
What Equipment Do I Require to Mine Bitcoins?
Individuals may have been able to compete for blocks using a typical at-home computer early in Bitcoin’s development, but this is no longer the case. This is due to the fact that the difficulty of mining Bitcoin varies over time. The Bitcoin network strives to produce one block every 10 minutes or so to maintain the seamless operation of the blockchain and its ability to process and validate transactions. However, if one million mining rigs compete to solve the hash problem, they will most likely arrive to a solution faster than if only ten mining rigs work on the same problem. As a result, Bitcoin is programmed to analyze and change mining difficulty every 2,016 blocks, or roughly every two weeks. When there is more processing power collectively working to mine for Bitcoin, the difficulty level of mining increases in order to maintain a consistent pace of block production. When computational power is reduced, the difficulty level decreases. To give you an idea of how much computer power is necessary, consider that when Bitcoin first began in 2009, the difficulty level was one. It is more than 13 trillion as of November 2019.
To mine competitively, miners must now invest in sophisticated computer equipment like as a GPU (graphics processing unit) or, more realistically, an application-specific integrated circuit (ASIC). These can cost anywhere from $500 to tens of thousands of dollars. Individual graphics cards (GPUs) are purchased by some miners, particularly Ethereum miners, as a low-cost means to assemble mining operations. The image below depicts an improvised, home-made mining machine. Graphics cards are those rectangular blocks with fans that spin. Take note of the sandwich twist ties that secure the graphics cards to the metal pole. This is most likely not the most effective way to mine, and as you might expect, many miners are in it for the joy and challenge as much as the money.
Version “Explain It Like I’m Five”
As it is, the intricacies of bitcoin mining can be tough to grasp. Consider the following illustration of how the hash problem works: I inform three friends that I’m thinking about a number between one and 100, and then I write the number on paper and seal it in an envelope. My buddies do not have to guess the precise number; they simply have to be the first to estimate any number that is less than or equal to the amount I am considering. And there is no limit to the number of guesses they can receive.
Assume I’m thinking about the number 19. If Friend A correctly guesses 21, they lose because 21>19. If Friend B guesses 16 and Friend C guesses 12, they’ve both arrived at potentially plausible answers due to 1619 and 1219. Friend B does not receive “additional credit,” despite the fact that his answer was closer to the aim of 19. Imagine I ask “guess what number I’m thinking of,” but I’m not asking just three pals, and I’m not thinking of a number between 1 and 100. Rather, I’m polling millions of potential miners, and I’m considering a 64-digit hexadecimal number. You can see how difficult it will be to guess the correct answer.
If B and C both respond at the same time, the ELI5 analogy fails.
Simultaneous replies are common in Bitcoin, but at the end of the day, there can only be one winning response. When numerous simultaneous replies are submitted that are equal to or fewer than the target number, the Bitcoin network will pick which miner to honor by a simple majority—51 percent. Typically, the miner who has done the most effort, or in other words, the one who has verified the most transactions, is the winner. The losing block is then referred to as a “orphan block.” Orphan blocks are those that have not yet been put to the blockchain. Miners who correctly solve the hash issue but do not verify the greatest number of transactions do not receive bitcoin.
What Exactly Is a “64-Digit Hexadecimal Number?”
Here’s an example of a number like that:
0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee
The above number has 64 digits. So far, it’s been simple enough to grasp. As you may have seen, that number includes not only numbers but also letters of the alphabet. What is the reason for this?
Let’s unpack the term “hexadecimal” to see what these letters are doing in the middle of numbers.
As you are aware, we employ the “decimal” system, which is based on the number ten. As a result, each digit in a multi-digit number has ten possible values, ranging from zero to nine.
“Hexadecimal” indicates base 16, as “hex” is taken from the Greek word for six and “deca” is derived from the Greek word for ten. Each digit in a hexadecimal system has 16 possible values. However, our numerical system only provides ten different methods to express numbers (zero through nine). That’s why you need to insert letters, namely a, b, c, d, e, and f.
You do not need to determine the whole value of the 64-digit number if you are mining bitcoin (the hash). I repeat: it is not necessary to compute the complete value of a hash.
So, what are “64-digit hexadecimal integers” and what do they have to do with bitcoin mining?
Remember the ELI5 analogy in which I wrote the number 19 on a piece of paper and sealed it in an envelope?
The target hash is the metaphorical undisclosed number in the envelope in bitcoin mining parlance.
Miners use such massive computers and dozens of cooling fans to guess the target hash. Miners make these predictions by randomly producing as many “nonces” as they can as quickly as they can. A nonce is an abbreviation for “number only used once,” and it is the key to generating these 64-bit hexadecimal numbers that I keep mentioning. A nonce in Bitcoin mining is 32 bits long, much shorter than the hash, which is 256 bits long. The first miner whose nonce yields a hash that is less than or equal to the target hash receives credit for completing that block and 6.25 BTC as a reward.
In theory, you could achieve the same result by rolling a 16-sided dice 64 times to generate random numbers, but why would you?
The screenshot below, from the website Blockchain.info, may assist you in putting all of this information together at a glance. You are viewing a summary of everything that occurred during the mining of block #490163. The “winning” hash was created by the nonce 731511405. The target hash is displayed at the top. The phrase “Relayed by Antpool” refers to the fact that this block was completed by AntPool, one of the more successful mining pools (more about mining pools below). Their contribution to the Bitcoin community, as seen here, is that they confirmed 1768 transactions for this block. If you want to see all 1768 transactions for this block, go to this page and scroll down to the “Transactions” section.
“How can I figure out the target hash?”
Target hashes all start with zeros—at least eight zeros and up to 63 zeros.
There is no minimum aim, however the Bitcoin Protocol has set a maximum aim. This number cannot be exceeded as a target:
00000000fff0000000000000000000000000000000000
Here are some samples of randomized hashes and the criteria for determining if they will lead to miner success:
“How can I increase my odds of correctly identifying the target hash before anyone else?”
You’d need to buy a powerful mining rig or, more realistically, join a mining pool—a group of currency miners who pool their processing resources and divide the bitcoin they mine. Mining pools are similar to Powerball clubs, in which members buy lottery tickets in bulk and agree to split any rewards. Pools mine a disproportionately high number of blocks rather than individual miners.
In other words, it’s purely a numbers game. Based on prior target hashes, you cannot guess the pattern or make a prediction. At the time of writing, the difficulty level of the most recent block is roughly 17.59 trillion, which means that the possibility of any given nonce yielding a hash less than the objective is one in 17.59 trillion. Even with a massive mining equipment, the chances aren’t in your favor if you’re working alone.
“How can I know if bitcoin will be profitable for me?”
Miners must consider not only the costs connected with the pricey equipment required to solve a hash problem. They must also consider the enormous quantity of electrical power used by mining rigs in creating massive amounts of nonces in quest of the solution. Overall, most individual miners are losing money on bitcoin mining as of this writing. The website Cryptocompare has a useful calculator that allows you to enter numbers like as your hash rate and electricity prices to assess the expenses and advantages.