How Does Cryptocurrency Mining Work?

Share on facebook
Share on twitter
Share on linkedin
You heard of it but still wonder what is crypto mining? Maybe you know already but want to learn more about it? Then you are at the right place. In this article, we are going to go through the main concepts of crypto mining.

You heard of it but still wonder what is crypto mining? Maybe you know already but want to learn more about it? Then you are at the right place. In this article, we are going to go through the main concepts of crypto mining. This article is a little bit technical (but not too much). So, in case you are not familiar with the concept of Bitcoin, blockchain and crypto wallets, I invite you to first read the article about Bitcoin and blockchain here and the one related to wallets here. Ready now? Let’s go!

The two concepts that explain what is crypto mining

When I first started to read about mining, it was a bit hard to understand it. Indeed, I found this definition, from a website I will not name: “Bitcoin mining is legal and is accomplished by running SHA256 double round hash verification processes in order to validate Bitcoin transactions and provide the requisite security for the public ledger of the Bitcoin network.” Gosh! Apart from “Bitcoin mining is legal”, what I understood was between nothing and nothing at all. For that reason, I am going to explain mining to you in different way. I hope better.

Crypto mining consists of two things

  1. Validating transactions

The first one is very easy to understand. As a quick reminder, in the blockchain and crypto world, an electronic verification is necessary for each transaction (let’s say I am sending you one Bitcoin). This is other users of the blockchain who perform the verification(s).

In order to be able to verify someone else’s transaction, a user requires a specific software running on a computer. Any kind of computer can do the job. After connecting it, the software automatically starts accepting transactions from other users in the world who are exchanging cryptos between each other. For performing that task, the person verifying transactions gets paid a flat fee. Simple.

  1. Finding block solutions

Stay with me, this one is a bit less intuitive. On the first day of the launch of a cryptocurrency, the cryptocurrency has no existing coins. What does it mean? Simply that when the Bitcoin was “launched”, there was no Bitcoin existing. Indeed, Bitcoins (and any other cryptos) are CREATED. Little by little. Regularly. Bitcoins are created through block finding rewards.

Block finding rewards

In order to add a block to the list of all past blocks (which is what they call that list “the blockchain”), a computer must find a unique number (think of it as a password). This “password” is a “block solution”. Once the computer finds the solution, the Bitcoin protocol automatically adds it to the list of previous blocks, and all together they form the blockchain.

For your information, the solution of each block is a random sequence of characters. To find the solution for one block, the computer has to try all possible combinations that can exist. You understand that it is a game of guessing. Once a computer finally finds the password (solution), the owner of the computer which found the solution receives a reward. The reward is a pre-defined amount of cryptos.

The Proof-of-Work reward

Because the computer takes some (a lot) energy to run, the Bitcoin network compensates Bitcoin miners for their effort. This type of reward is a “Proof-of-work” (POW) reward. If the computer works, it gets a reward. If not, then there is no way to receive any Bitcoins. The Bitcoin’s Proof-of-work system also protects the Bitcoin network against hackers.

For your information, the crypto ecosystem borrowed the word “mining” from actual mining. Especially gold mining. The concept makes a parallel between Bitcoin mining machine randomly trying to find a block solution while, years ago, physical people (miners with a pick ⛏) were trying to find gold. They were randomly picking here and there, trying to find a gold nugget.

The Bitcoin Launch

Great story but let’s go back to the Bitcoin launch to better understand the concept. On January 3, 2009, Satoshi Nakamoto (the creator of the Bitcoin) mined the first Bitcoin block. Concretely, his computer tried to find what was the password for this first block. Once he found it, he received a reward of 50 Bitcoins.

Thus, 50 Bitcoins were actually created. They were not existing before, and now they exist. So, on January 3, 2009, Satoshi Nakamoto found the first block solution and this block, called Genesis block (because it is the first one ever) was added to the blockchain. Few minutes later, another block solution was found. And so on, until today where we are still finding block solutions.

I am sure you start to better understand what is crypto mining: validating transactions and finding block solutions. By the way, for that purpose, they call these computers “miners” or “mining machines”.

Also, I hope by now you understand that the Bitcoin is an electronic currency. So there is a software running it. The Bitcoin protocol defines all rules related to mining Bitcoin.

Time Block

You may wonder how often a computer can find block solutions. For the Bitcoin, the answer is 10 minutes. This is an average. It can take one minute or twenty minutes. But on average, it takes 10 minutes of random attempts to find a block solution.

Controlled Currency Supply

There are different processes that will prevent the creation of Bitcoin to be too fast. Let’s see what they are.

Mining Difficulty

If it takes one computer 10 minutes to guess a password, you are right to think that it should take 5 minutes (on average) to find the block solution for two computers. Indeed, the more computers trying to find a block solution, the faster the solution will be found. So, to prevent finding block solutions too fast, the mining difficulty is automatically recalculated and adjusted every 2016 blocks by the Bitcoin protocol.

This means that every 2016 blocks, the Bitcoin protocol evaluates the average time it took to mine the previous 2016 blocks. If it took less than 10 minutes, it means that the solution was “too easy” to find. So, the protocol adjusts the difficulty and the solution will be just hard enough to find by all miners.

As such, if the number of miners remains the same, it should take again 10 minutes to find. On average. The opposite is also true. If the Bitcoin protocol notices that it takes too much time to find a block solution, the mining difficulty will decrease.

More Computer, Less Chances To Find A Block Solution

In other words, all this leads us to see that the more computers trying to find the block, the harder it is to find. Moreover, only the miner who finds the block solution first gets the reward! Then, the Bitcoin protocol adds the block to the end of the other blocks. And the process starts again for the following block. Thus, the computer with the fastest computational power will likely be faster to find a block solution. Just because it can try to guess more solutions.

The power of a computer (miner) is the hash rate. The higher the hash rate, the more solution the miner can try to find.

Halving

I explained above that for each block found, the miner receives 50 Bitcoins. However, the Bitcoin protocol includes a specification stating that every 210,000 blocks found, the reward decreases by half. Based on the 10-minute block time, it means that the reward decreases by half about every 4 years. Thus, from 50 Bitcoins as an initial reward back in 2009, it fell to 25 Bitcoins. And currently, the reward is 12.5 Bitcoins. Next, it will be 6.25. And so on, until all Bitcoins are mined.

Yes, there is actually a limit of Bitcoin. This is 21 million. Again, this is set up by the Bitcoin protocol.  This makes all blocks mathematically mined by around the year 2140. Not sure we will still be here by that time. The good news is that mining will not stop tomorrow!

The concept of  dividing the reward every x blocks is the “halving” and this is part of the Bitcoin protocol for controlling the currency supply.

You can check the current block number (also called Height) that miners are currently mining for the Bitcoin by following this link.

Current_Bitcoin_mining_block

The first halving occurred at the block 210,000, the second 420,000, the third (and current at the time of this article, May 21, 2019) at 630,000. The next one will be at the block… 840,000! And so on, you get it. Easy.

The Power Of Mining Pools

At this point of the reading, you might be thinking that mining Bitcoins sounds more like a lottery game than a way of making money passively or safely! And you are right. Only the first miner finding the solution of the current block gets rewarded. Once found, everything has to be done again. So how come is mining can be profitable? The answer is: thanks to mining pools!

Rapidly, more and more miners started to operate around the world. So the mining difficulty increased with the reward remaining the same: 50 Bitcoins every 10 minutes for a lucky guy. And of course, the more computers you own, the more likely you can find a solution before everyone else. So, at some points, miners decided to gather in pools.

 

Mining together

The concept is the following. Concretely, instead of mining alone, you join a group of people mining like you. Once one of them finds a block solution, all participants share the reward, based on the hash rate the participant contributed to. It is clear that if one person has 10 miners while another has only one, the one with 10 machines should receive a bigger share because he contributed more. This is by the way a reminder of the Proof-of-Work concept. The more you contribute to the pool, the more you receive. Of course you receive less than if you were finding a block just by yourself. But you receive rewards many times per day. Yes, per day.

 

Mining alone

By opposition, mining alone nowadays is like playing lottery! The real income, today, is when you are part of a large (I insist on the word “large”) mining pool. More miners = higher probability to find blocks many times per days = more income! That simple.

The Types of Miners

Classic miners

When mining, you can use any device that is able to make computational calculations: computer or mobile phone processors (CPU), graphical cards (GPU), etc. Initially, Bitcoins were mined with computers only. Then, some managed to use GPUs instead. Why? Because they are faster than a CPU for finding block solutions.

On top of that, you can connect several GPUs together to increase the hash rate! So quickly, because of the mining difficulty increasing, computers and their CPUs became useless, even within pools. They would consume more power than they would bring as rewards. In that race of hash rate power, FGPAs were derived to be used as miners. An FPGA (Field Programmable Gate Array) is a type of integrated circuit which can be programmed to make a specific task: mining Bitcoin.

 

ASIC miners

So, these machines equipped with FGPA were much more powerful than GPUs and CPUs. Finally, ASICs started to be used for Bitcoin mining.  An ASIC (Application Specific Integrated Circuit) is a unique type of integrated circuit that is designed with a certain purpose in mind. In our study case, mining Bitcoin. The difference with an FPGA is that they cannot be reprogrammed. But their calculation power is much higher than the most performing FGPA!

ASIC_miner_Antminer_L3+

Today, ASICs are the most efficient way to mine. They usually cost more than other solutions, but when you are mining, the most important is how much you can generate with your equipment. At Summing Mining, we only buy and use ASIC miners. However, you can understand from my statement that this kind of machine is for serious investors only. Like you guys! So, in order to avoid most of the power to be within big investors hands, some cryptos decided to adopt some ASIC-resistant algorithms.

Basically, mining an ASIC-resistant currency with an ASIC will not be more effective than mining it with GPUs. And remember, GPUs are more affordable. In the end, GPU mining can still be profitable, but you would need hundreds of them to really get a nice passive income. And they take quite some space, so do not think of keeping them at home!

 

Mining algorithms

As per the definition, miners are “application specific”. This means that they can only mine one type of crypto algorithm. Indeed, you must know that all cryptos available to mine are not necessarily using the same mining algorithm:

– Bitcoin is using an algorithm called SHA-256 (the one from the definition in our intro!),

– Ethereum is using Ethash,

– Zcash is using Equihash,

– etc.

Several cryptos can use the same algorithm. And sometimes, one crypto can use several algorithms. But this is very rare. It is not very important to remember this. Simply remember that in nearly 100% of the cases, one ASIC can only mine one type of crypto.

When mining, it is important to know the power consumption (in watts) of your miner. Because unless you are lucky, it is not running for free. You must pay for the electricity, and if your machine is consuming more than it is able to mine, then your machine is simply not profitable.

So, What Is Mining? Let’s sum up all we learnt!

I used many terms and concepts here. Let’s review them. This will facilitate remembering what is mining.

Blockchain: technology used by the Bitcoin and other cryptocurrencies to store transactions (see this article for more details).

Mining: the action of validating transactions and finding block solutions.

Proof-of-work (POW): system used by the Bitcoin protocol to reward the users based on their real contribution to find block solutions.

Block solution: a unique cryptographic combination to be found (guessed) in order to add a block to the blockchain.

Block reward: the amount of cryptos a miner receives for finding a block solution.

Genesis block: name given to the first block mined on the Bitcoin blockchain.

Time block: average time it takes to find a block solution.

Mining difficulty: represents how difficult it is to find a block solution.

Halving: action of dividing the block reward by two every x blocks (210,000 blocks for Bitcoin).

Hash rate: measure of the computational power of mining equipment. The higher the better.

Mining algorithm: mathematical algorithm used to find a block solution for a currency.

Pool: virtual place where miners can share their mining computational power (hash rate) and get rewards more often than by mining alone.

I hope now all the crypto jargon is clearer for you and you understand what is crypto mining! If profitable ASIC mining sounds interesting to you, I invite you to join us on this page.

You can contact us to learn more about crypto mining. Meanwhile, we recommend you to join our community of miners on the French Discord group or on the English Discord group.

Happy mining! ⛏⛏⛏

Share this post

Share on facebook
Share on twitter
Share on linkedin
Share on print
Share on email

Subscribe To Our Newsletter

Get updates and learn from the best