All you need to know about Bitcoin mining

Cryptocurrency mining is painstaking, expensive and just sporadically rewarding. However, mining includes a magnetic attraction for many investors considering cryptocurrency due to the simple fact that miners are rewarded for their job using crypto tokens. This might be because entrepreneurial forms see mining as pennies from heaven, such as California gold prospectors in 1849. And if you’re technologically inclined, why not take action?

But before you spend the time and gear, read this explainer to find out whether mining is for you. We’ll focus mostly on Bitcoin (during, we will use”Bitcoin” when speaking to the community or the cryptocurrency for a notion, and”bitcoin” when we are referring to some quantity of human tokens).

The main attraction for most Bitcoin miners is that the possibility of being rewarded with precious bitcoin tokens. Having said that, you definitely don’t need to become a miner to have cryptocurrency tokens. It is also possible to purchase cryptocurrencies using fiat money ; you could exchange it in a market such as Bitstamp utilizing another crypto (for instance, using Ethereum or NEO to purchase bitcoin); you can make it by playing video games or simply by publishing blog articles on platforms which cover consumers in cryptocurrency. A good illustration of the latter is Steemit, that can be sort of similar to Medium except that consumers may benefit bloggers by simply paying them at a proprietary cryptocurrency named STEEM. STEEM can subsequently be traded everywhere for bitcoin.

The bitcoin reward which miners get is an incentive that motivates people to aid in the principal aim of mining: to encourage, legitimize and track the Bitcoin system and its own blockchain. Since these responsibilities are dispersed among several users all around the Earth, bitcoin is reported to be a more”decentralized” cryptocurrency, or one that doesn’t rely upon a central bank or government to oversee its own regulation.

KEY TAKEAWAYS
By mining, You Can Make cryptocurrency Without Needing to put down cash for this.
Bitcoin miners get bitcoin for a reward for finishing”blocks” of confirmed transactions that are inserted to the blockchain.
Mining rewards are paid into the miner who finds an answer to a complicated hashing puzzle , along with the likelihood that a player is going to be the person to find the remedy is regarding the section of the entire mining power onto the community.
Double spending is a phenomenon where a bitcoin consumer illicitly spends the very same tokens twice.
You want either a GPU (graphics processing unit) or a application-specific integrated circuit (ASIC) so as to prepare a mining rig.
They do the job of verifying preceding bitcoin transactions. This tradition is supposed to maintain Bitcoin users fair and has been conceived by bitcoin’s creator, Satoshi Nakamoto. By confirming transactions, miners are helping prevent the”double-spending problem.”

Double spending is a situation where a bitcoin proprietor illicitly spends exactly the identical bitcoin twice. With physical money, this is not a problem: after you flip someone a $20 bill to purchase a bottle of vodka, you do not have that, so there is no threat you could use the same $20 bill to purchase lotto tickets adjacent door. With electronic money, however, since the Investopedia dictionary describes,”there is a risk that the holder could make a copy of the digital token and send it to a merchant or another party while retaining the original.”

Let’s say you had one valid $20 bill and a single counterfeit of the same $20. In the event that you should attempt to pay both the true bill and the imitation one, somebody who took the problem of looking at either of those invoices’ serial numbers would see that they were the same number, and thus one of them had to be false.

Once a miner has verified 1 MB (megabyte) worth of bitcoin transactions, known as a”cube,” that miner is eligible to be rewarded with a quantity of bitcoin (more about the bitcoin reward below as well).

“So after all the work of confirming trades, I could still not receive any bitcoin for this?”
To mine successfully, you need to have a high”hash speed,” which is measured in terms of megahashes per second (MH/s), gigahashes per second (GH/s), and terahashes per second (TH/s).

In November of 2019, the price of Bitcoin was about $9,300 per bitcoin, which means you’d earn $116,250 (12.5 x 9,300) for completing a block.3 Not a bad incentive to solve that complex hash problem detailed above, it might seem.

If you want to keep track of precisely when these halvings will occur, you can consult the Bitcoin Clock, which updates this information in real time. Interestingly, the market price of bitcoin has, throughout its history, tended to correspond closely to the marginal cost of mining a bitcoin.

If you are interested in seeing how many blocks have been mined thus far, there are several sites, including Blockchain.info, that will give you that information in real time.

Equipment Needed to Mine
Although early on in bitcoin’s history individuals may have been able to compete for blocks with a regular at-home computer, this is no longer the case. The reason for this is that the difficulty of mining bitcoin changes over time. In order to ensure smooth functioning of the blockchain and its ability to process and verify transaction, the Bitcoin network aims to have one block produced every 10 minutes or so. However, if there are one million mining rigs competing to solve the hash problem, they’ll likely reach a solution faster than a scenario in which 10 mining rigs are working on the same problem. For that reason, Bitcoin is designed to evaluate and adjust the difficulty of mining every 2,016 blocks, or roughly every two weeks. When there is more computing power collectively working to mine for bitcoin, the difficulty level of mining increases in order to keep block production at a stable rate. Less computing power means the difficulty level decreases. To get a sense of just how much computing power is involved, when Bitcoin launched in 2009 the initial difficulty level was one. As of Nov. 2019, it is more than 13 trillion.

All of this is to say that, in order to mine competitively, miners must now invest in powerful computer equipment like a GPU (graphics processing unit) or, more realistically, an application-specific integrated circuit (ASIC). These can run from $500 to the tens of thousands. Some miners–particularly Ethereum miners–buy individual graphics cards (GPUs) as a low-cost way to cobble together mining operations. The photo below is a makeshift, home-made mining machine. The graphics cards are those rectangular blocks with whirring circles. Note the sandwich twist-ties holding the graphics cards to the metal pole. This is probably not the most efficient way to mine, and as you can guess, many miners are in it as much for the fun and challenge as for the money.

ShutterstockThe “Explain It Like I’m Five” Version
The ins and outs of bitcoin mining can be difficult to understand as is. Consider this illustrative example for how the hash problem works: I tell three friends that I’m thinking of a number between one and 100, and I write that number on a piece of paper and seal it in an envelope. My friends don’t have to guess the exact number; they just have to be the first person to guess any number that is less than or equal to the number I am thinking of. And there is no limit to how many guesses they get.

Let’s say I’m thinking of the number 19. If Friend A guesses 21, they lose because of 21>19. If Friend B guesses 16 and Friend C guesses 12, then they’ve both theoretically arrived at viable answers, because of 16<19 and 12<19. There is no “extra credit” for Friend B, even though B’s answer was closer to the target answer of 19. Now imagine that I pose the”figure what number I’m considering” question, but I’m not asking just three friends, and I’m not thinking of a number between 1 and 100. Rather, I’m asking millions of would-be miners and I’m thinking of a 64-digit hexadecimal number. Now you see that it’s going to be extremely hard to guess the right answer.

If B and C both answer simultaneously, then the ELI5 analogy breaks down.

In Bitcoin terms, simultaneous answers occur frequently, but at the end of the day, there can only be one winning answer. When multiple simultaneous answers are presented that are equal to or less than the target number, the Bitcoin network will decide by a simple majority–51%–which miner to honor. Typically, it is the miner who has done the most work, that s, the one that verifies the most transactions. The losing block then becomes an “orphan block.” Orphan blocks are those that are not added to the blockchain. Miners who successfully solve the hash problem but who haven’t verified the most transactions are not rewarded with bitcoin.

What Is a “64-Digit Hexadecimal Number”?
Well, here is an example of such a number:

0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee
The number above has 64 digits. Easy enough to understand so far. As you probably noticed, that number consists not just of numbers, but also letters of the alphabet. Why is that?

To understand what these letters are doing in the middle of numbers, let’s unpack the word “hexadecimal.”

As you know, we use the “decimal” system, which means it is base 10. This, in turn, means that every digit of a multi-digit number has 10 possibilities, zero through nine.

“Hexadecimal,” on the other hand, means base 16, as “hex” is derived from the Greek word for six and “deca” is derived from the Greek word for 10. In a hexadecimal system, each digit has 16 possibilities. But our numeric system only offers 10 ways of representing numbers (zero through nine). That’s why you have to stick letters in, specifically letters a, b, c, d, e and f.

If you are mining bitcoin, you do not need to calculate the total value of that 64-digit number (the hash). I repeat: You do not need to calculate the total value of a hash.

So, what do “64-digit hexadecimal numbers” have to do with bitcoin mining?
Remember that ELI5 analogy, where I wrote the number 19 on a piece of paper and put it in a sealed envelope?

In bitcoin mining terms, that metaphorical undisclosed number in the envelope is called the target hash.

What miners are doing with those huge computers and dozens of cooling fans is guessing at the target hash. Miners make these guesses by randomly generating as many “nonces” as possible, as fast as possible. A nonce is short for”number just used after,” and the nonce is the key to generating these 64-bit hexadecimal numbers I keep talking about. In Bitcoin mining, a nonce is 32 bits in size–much smaller than the hash, which is 256 bits. The first miner whose nonce generates a hash that is less than or equal to the target hash is awarded credit for completing that block and is awarded the spoils of 12.5 BTC.

In theory, you could achieve the same goal by rolling a 16-sided die 64 times to arrive at random numbers, but why on earth would you want to do that?

The screenshot below, taken from the site Blockchain.info, might help you put all this information together at a glance. You are looking at a summary of everything that happened when block #490163 was mined. The nonce that generated the “winning” hash was 731511405. The target hash is shown on top. The term “Relayed by Antpool” refers to the fact that this particular block was completed by AntPool, one of the more successful mining pools (more about mining pools below). As you see here, their contribution to the Bitcoin community is that they confirmed 1768 transactions for this block. If you really want to see all 1768 of those transactions for this block, go to this page and scroll down to the heading “Transactions.”

(source: Blockchain.info)

“So how do I imagine at the goal hash?”
All target hashes begin with zeros–at least eight zeros and up to 63 zeros.

There is no minimum target, but there is a maximum target set by the Bitcoin Protocol. No target can be greater than this number:

00000000ffff0000000000000000000000000000000000000000000000000000

Here are some examples of randomized hashes and the criteria for whether they will lead to success for the miner:

(Note: These are made-up hashes)

“How do I optimize my odds of guessing the goal hash before anybody else does?”
You’d have to get a fast mining rig, or, more realistically, join a mining pool–a group of coin miners who combine their computing power and split the mined bitcoin. Mining pools are comparable to those Powerball clubs whose members buy lottery tickets en masse and agree to share any winnings. A disproportionately large number of blocks are mined by pools rather than by individual miners.

In other words, it’s literally just a numbers game. You cannot guess the pattern or make a prediction based on previous target hashes. The difficulty level of the most recent block at the time of writing is about 13.69 trillion, meaning that the chance of any given nonce producing a hash below the target is one in 13.69 trillion. Not great odds if you’re working on your own, even with a tremendously powerful mining rig.

“How do I determine whether bitcoin will probably be rewarding for me?”
Not only do miners have to factor in the costs associated with expensive equipment necessary to stand a chance of solving a hash problem. They must also consider the significant amount of electrical power mining rigs utilize in generating vast quantities of nonces in search of the solution. All told, bitcoin mining is largely unprofitable for most individual miners as of this writing. The site Cryptocompare offers a helpful calculator that allows you to plug in numbers such as your hash speed and electricity costs to estimate the costs and benefits.

(Source: Cryptocompare)

What Are Coin Mining Pools?
Mining rewards are paid to the miner who discovers a solution to the puzzle first, and the probability that a participant will be the one to discover the solution is equal to the portion of the total mining power on the network. Participants with a small percentage of the mining power stand a very small chance of discovering the next block on their own. For instance, a mining card that one could purchase for a couple of thousand dollars would represent less than 0.001% of the network’s mining power. With such a small chance at finding the next block, it could be a long time before that miner finds a block, and the difficulty going up makes things even worse. The miner may never recoup their investment. The answer to this problem is mining pools. Mining pools are operated by third parties and coordinate groups of miners. By working together in a pool and sharing the payouts among all participants, miners can get a steady flow of bitcoin starting the day they activate their miner. Statistics on some of the mining pools can be seen on Blockchain.info.

“I’ve done the math. Forget mining. Can there be a less onerous method to gain from cryptocurrencies?”
As mentioned above, the easiest way to acquire bitcoin is to buy it on an exchange like Coinbase.com. Alternately, you can always leverage the”pickaxe strategy” This relies on the old saw that through the 1849 California gold rush, the wise investment wasn’t to pan for goldbut instead to create the pickaxes taken for mining. Or, to put it in contemporary conditions, invest in the companies which manufacture those pickaxes. In a cryptocurrency circumstance, the pickaxe equal are a company that manufactures equipment used for Bitcoin mining. You might think about looking into businesses which make ASICs gear or GPUs rather, for instance.