What is Crypto Mining and How does It Work?

Sometimes, grasping the notion of cryptocurrency could be overwhelming. However, pitfalls are lurking from everywhere, and a single error might cost you dearly. To avoid them, it would be wise to familiarize yourself with the industry you’re about to get into. By gaining a detailed insight into crypto, not only will you learn to avod grave mistakes but you’ll also have an opportunity to improve your trading.

In this article, you will learn everything about crypto mining, how it works, and what mining methods there are. Once you master the basics, you’ll understand what is actually behind each of the transactions you make and trades you place.

What Is Crypto Mining?

You already know that, in essence, cryptocurrency is virtual cash. Its name stems from the combination of two terms, cryptography and currency. The latter is self-explanatory, but what about the former? 

Cryptography refers to the way in which this digital currency is managed and secured. It involves advanced math operations that common people aren’t able to perceive. They represent the core of cryptocurrency.

As digital money, crypto is neither owned nor controlled by any centralized body, such as banks or governments. As such, it could be quite vulnerable to various malversations. To prevent this from happening, it’s necessary to secure them in some way.

This is exactly where crypto mining jumps in. Despite a settled opinion that it refers to the creation of new currencies, it is not completely the case. Indeed, crypto mining does create new crypto units. However, it is also a complex process of verifying and confirming blockchain transactions. 

To sum up, crypto mining is one of the primary elements which enables blockchain to function as a distributed ledger.

How Crypto Mining Works

Whenever you send or receive crypto, you’re making a new transaction. What actually happens with them? Where do they go?

New blockchains transactions that traders make are all sent to a memory pool. A miner has to verify the genuineness of all pending transactions and they also need to sort them in blocks. You can picture those blocks as a page of the blockchain “account book,” aka ledger. One block can store several transactions, together with other accompanying data. 

So, a valid transaction is one that has been confirmed. What about those that aren’t confirmed? Well, there is something referred to as a mining node that deals with them. 

A mining node takes unverified transactions from the memory pool and then brings them together into a so-called candidate block. Following that step, a miner attempts to convert it into a valid and confirmed block. 

This might seem simple, but in reality, it’s not. A miner is supposed to resolve an extremely complicated math problem. This further demands plenty of computational resources. Still, each mined block rewards a miner with new crypto, plus fees.  

How much miners earn 

Sadly, miners nowadays earn much less than they used to. In 2009, they could earn as much as 50 BTC per block. In 2020, their reward plummeted down to only 6.25 BTC. 

The reason for this is the so-called bitcoin halving. This process involves halving the payout per mined block. It occurs approximately every four years, per 210,000 mined blocks. The very first halving happened in 2012, and the next one is due in 2024.

Source: Investopedia

What Mining Process Look Like

The mining process could be broken down into four rather complex steps. We’ll try to simplify them for you.

Step one: Hashing transactions

The very first thing to do when mining a blog is take pending transactions from the memory pool, then submit them through a hash function. Each time a data is submitted through it, a new hash — a fixed-sized output — is generated. 

A hash is a set of numbers and letters whose function is to be an identifier. Thus, the transaction hash stands for all the information that a transaction contains. 

Step two: Building a Merkle Tree 

Once a transaction has been hashed, it’s time to put the group hashes into a structure referred to as a Merkle Tree, aka hash tree.

The hash or a Merkle Tree is formed in the following way. Transaction pairs are grouped and then hashed. Next, the new hash formations are put into pairs and then hashed one more time. This process is rehashed until a single hash is made. 

This final hash is referred to as a root hash or a Merkle root. In essence, it stands for all the hashed used for its creation.

Source: Changelly

Step three: Discovering a valid block header

Before moving on to step three, let’s first explain what a block header is. The purpose of a block header is to identify an individual block. This, in turn, means that every block has its unique hash. 

While coming up with a new block, miners blend the previous block hash with the candidate block root hash in order to create another, new block hash. However, in addition to these two segments, miners have to add a random number referred to as a nonce.

When a miner attempts to verify a candidate block, they need to put together the previous block hash, the root hash and a nonce, then submit them via a hash function. The ultimate aim is to come up with a new valid hash. 

Since neither the root nor the previous block hash can be changed, a miner has only a nonce left to change as many as several times until they discover a valid hash. To be deemed valid, the output block hash has to be less than the aimed value determined by the protocol.

Step four: Airing the mined block

So far, you’ve learned that, to find a valid hash, miners have to hash a block header with various nonce values over and over again. The miner who discovers a valid hash is able to air their block to the blockchain network. 

However, this still doesn’t mean the process is over. Other nodes still need to verify the block and the hash. If they turn out valid, the block will be added to the copy of a blockchain. 

The candidate block now becomes confirmed, and miners are free to proceed to the next one. In case they fail to discover a valid hash in due time, they will ditch the candidate block. 

Is All Crypto Mined?

The simple answer is no. Not all cryptocurrencies are mined, nor is there a possibility to do so. The reason behind this is that they aren’t mineable as they use different consensus protocols. 

But which crypto is mineable? The most widespread one — Bitcoin. The mining of this well-known cryptocurrency is based on the algorithm referred to as Proof-of-Work (POW).

Proof of Work

What on earth is POW now? Well, it refers to the authentic blockchain mechanism invented by Satoshi Nakamoto, who is allegedly deemed as the originator of Bitcoin. Introduced as early as 2008, POW regulates the way a blockchain network comes to consensus across participants, but without involving third parties. 

This is done by demanding considerable computing power by which bad actors are demotivated and disincentivized. Miners have an important role here, as their duty is to verify all transactions on the POW network. 

To obtain the privilege to mine a block, they battle each other by solving complicated cryptographic puzzles using powerful hardware, specifically designed for mining. The first one to reach a valid solution gets the right to “air” their block of transactions to the blockchain network. This way, they obtain the block reward. 

Source: Bitnovo Blog

Other Crypto Mining Methods

Despite what people believe, there isn’t a uniform crypto mining method. New consensus algorithms emerge constantly, forcing the introduction of more powerful hardware and equipment, as well as different approaches and processes.

To solve the complex cryptographic equations, crypto miners must have (and use) specialized computers, way more powerful than the ones that a common household possesses. Depending on the specific hardware needed for mining, we can differentiate between CPU, GPU, and ASIC mining.

CPU mining

Remember what CPU stands for — Central Processing Unit. Thus, CPU mining includes implementing a computer’s CPU in order to carry out hash functions. 

At the dawn of Bitcoin, mining costs were rather low. Also, it was much easier to become a miner as entry barriers weren’t as high as nowadays. A typical household computer and its CPU were able to handle mining, so everyone could get into it.

However, things have changed. Due to the increased number of miners and the network’s hash rate, crypto mining has become harder. Expectedly, more powerful hardware was required for mining, only to reach the point when CPU mining became inconceivable. 

Nowadays, crypto miners use different hardware, which means that CPU mining isn’t an option anymore.

GPU mining

Remember what a GPU is? Yes, it is a Graphics Processing Unit. If you’re into games, you already know that it is responsible for an array of applications. However, it’s not necessarily used for video rendering or gaming; you can also use it for crypto mining.

Unlike CPU and ASIC mining hardware (more on it later), GPUs are much cheaper and affordable. Typically, you can mine some altcoins with them. Yet, the efficiency might be affected by algorithms and the overall mining complexity.

ASIC mining

An Application-Specific Integrated Circuit (ASIC) is created to serve a particular purpose. Due to the fact that ASIC miners are at the forefront of crypto mining technology, the price (and overall costs as well) of a unit is much higher compared to CPU or GPU units. 

Furthermore, constant advancements in ASIC technology make older units unprofitable and therefore useless, so miners have to replace them on a regular basis. Because of this, ASIC mining is among the priciest ways to mine crypto, even when electricity expenses are excluded.

The Bottom Line

The purpose of crypto mining is to validate and verify new transactions on the blockchain network. This way, double-spending by bad actors is prevented. Crypto mining is also a way to produce new coins and introduce them to the system.

In addition to verification, it also secures the blockchain network, allowing it to function as a decentralized P2P (peer-to-peer) network so that supervision from a third party isn’t necessary. Last but not least, it rewards miners who solve complex problems and algorithms.

Does crypto mining have its downsides? Of course, nothing comes without them. The greatest drawback is electricity costs and prices determined by the market. Plus, even though nothing comes without risk, no one can guarantee that you will definitely make (a lucrative) profit when you get into crypto mining.  

Disclaimer: For information purposes only. Not investment or financial advice. Seek professional advice. Digital assets involve risk. Do your own research.

Essence of Crypto. Nothing else.

Latest lessons in your inbox every week.


Don’t miss the new CEX.IO University content.

Subscribe to CEX.IO University updates, and receive our newsletter packed with useful guides and tips every week.