Cryptocurrency Mining Explained: A Comprehensive Overview

Jordon AhosaariNovember 6, 2019

For many, the term mining conjures up images of dimly lit tunnels and coal clad rail carts. As such, it’s not particularly surprising that those outside the blockchain industry lack an understanding of cryptocurrency mining.

So, what exactly is cryptocurrency mining if it doesn’t involve digging for precious metals or coal?

The answer, in short, is that cryptocurrency mining is a competitive process that validates transactions and results in the creation of cryptocurrency. Essentially, it's a race among a large network of computers to solve a mathematical equation. The miner who solves the problem first receives a "block reward," which is a payment made in that blockchain's native coin.

Block rewards differ between blockchains and even fluctuate over time on the same blockchain. However, the intent is always the same-- to incentivize miners to join in on the computational competition. Every blockchain relies on miners not only for the generation of new coins but also for the validation of transactions and network security.

To learn more about cryptocurrency mining, let’s begin by diving into the concept of consensus.

cryptocurrency mining 1

What is Proof of Work?

For Proof of Work blockchains, nodes reach consensus and generate new blocks through the process of cryptocurrency mining. The nodes participating in this process are called miners.

It’s important to understand that only PoW blockchains rely on cryptocurrency mining for transaction approval, consensus, and security. Other consensus mechanisms such as Proof of Stake (PoS) don’t require miners at all. Instead, these blockchains rely on “stakers,” individual users who hold some amount of the blockchain’s coins. As a result of their stake, these individuals carry out consensus and secure the blockchain.

With that said, the most recognizable cryptocurrencies around the globe are built on blockchains using the Proof of Work consensus mechanism. For instance, both the Bitcoin and Ethereum networks use PoW rules to reach consensus.

Although consensus clearly defines the role of miners, there's more occurring under the surface that's worth exploring.

The Details of Cryptocurrency Mining

During the validation process, each miner is trying to find a specific number called a “nonce,” or “number only used once.” More specifically, miners are searching for a nonce that satisfies one predetermined and publicly known condition.

The condition is that the nonce, when pushed through a cryptographic hash function with five other crucial pieces of data, produces a block hash that is less than or equal to a set “target” number.

This process may sound a little confusing, so let’s break things down further.

Searching For The Right Nonce

Every block in a blockchain contains something called a “block header.” The block header is made up of 6 pieces of important data:

  • Version: the version of the code base active at the time of the block is mined
  • Bits: a compressed expression of the target number
  • TimeStamp: data recording the exact time that the block is mined
  • Merkle Root: all the block's transaction ID numbers hashed via a Merkle Tree
  • Previous Block: the block hash of the prior block in the blockchain
  • Nonce: the variable number for which cryptocurrency miners are searching

These 6 pieces of data make up a block's header and when hashed together, the resulting string of data is known as the "block hash." When mining a block, a miner must find a block hash that is less than or equal to the target.

Notice that 5 of the 6 pieces of data are predetermined, meaning they cannot be adjusted. The only number that can be altered is the nonce.

As mentioned, the objective of mining is to find a nonce that satisfies a single condition. The condition is that the nonce, when combined with the other 5 pieces of data in the block header and run through a cryptographic hash function, will produce a block hash that is less than or equal to the target (which itself is one of the 6 pieces of data in the block header).

Since the nonce is the only number that can be changed, miners try to mine blocks by adjusting the nonce incrementally again and again. It’s not radically different from trying to guess a randomly generated number, but you have an infinite number of guesses.

Is it one? No. Is it two? No. Is it three? No. This process will continue until the answer is yes.

Recall that there is an entire network of cryptocurrency miners, all guessing simultaneously. It’s essentially a race to find the correct nonce before any other miner.

Once a miner finds a nonce that satisfies these conditions, that miner broadcasts this nonce and its corresponding block hash to the rest of the nodes on the network. Each node verifies that the nonce does produce a hash that's less than or equal to the target. If the entire network comes to a consensus, then that block is added to the blockchain. The miner receives a block reward, and the race starts all over again with a new block.

The Economics of Cryptocurrency Mining

One question that remains is why individuals around the world commit their time, skills, and computational resources to participate in cryptocurrency mining.

The short answer is that cryptocurrency mining can result in receiving block rewards-- free coins from the blockchain on which the blocks are mined. These coins can then be traded for other assets, sold for fiat currencies, or stored for safekeeping and left to appreciate.

Recall that block rewards vary between blockchains. For instance, block rewards are 3 KMD on the Komodo blockchain, 2 ETH (ether) on the Ethereum blockchain, and 12.5 BTC (bitcoin) on the Bitcoin blockchain.

Recall also that block rewards can vary over time on the same blockchain. Bitcoin block rewards began at 50 BTC per block, but are programmed to decrease by 50 percent every 210,000 blocks. As such, Bitcoin block rewards dropped to 25 BTC in November 2012 and then fell another 50 percent to 12.5 BTC in July 2016. The next Bitcoin block reward halving is set to occur in May of 2020.

Reductions in the rewards distributed for cryptocurrency mining serve two purposes:

  • First, it creates scarcity in the coin supply. If block rewards never diminish, inflation would be excessive, and it may devalue the currency. As a result, miners may decide it’s not worth mining.
  • Second, it promotes the value of the coin itself. Since miners receive fewer coins for their efforts, the value of the currency naturally increases to adequately compensate cryptocurrency mining.

In the very early days of Bitcoin, most miners were operating at a loss. Even though they were receiving large block rewards of 50 BTC per block, the BTC they were earning could not be exchanged for goods, services, or other currencies. These early crypto pioneers were choosing to mine Bitcoin for ideological reasons. That's because they believed in decentralization, and they wanted to see a secure, peer-to-peer currency come into existence.

Nowadays, cryptocurrency mining can be extremely profitable. Miners choose to mine a particular blockchain because the currency is valuable, or they believe that it will become valuable in the future.

Those looking to start cryptocurrency mining should first assess the profitability of each coin. Luckily, platforms like What To Mine exist to help guide would-be crypto miners in the right direction. Although these profit calculators do most of the work, it’s essential to understand each of the metrics that impact profitability before investing in cryptocurrency mining.

cryptocurrency mining 2

Source: What To Mine (WTM) - Coin Profitability Calculators

Cryptocurrency Mining and Hash Rates

Hash rates refer to the total processing power resulting from cryptocurrency mining on a blockchain network. It's a measure of how big and how powerful a blockchain's network is.

More precisely, the hash rate measures the number of hashes per second. In this case, a hash is simply one guess at a nonce. Every guess at a satisfactory nonce is called a hash because the guess requires hashing the block header (including the nonce itself) into a new block hash. If the block hash is higher than the target, the miner adjusts the nonce, hashes the block header again, and compares it to the target. If it’s still incorrect, they re-adjust and guess again.

Of course, the computers used in cryptocurrency mining and extremely powerful and can perform this operation many times per second. And a blockchain network's hash rate isn't just the number of one miner's guesses. Rather, it's the sum of all guesses made by every miner on the network, at any second.

A network’s hash rate can be expressed in several different ways:

  • 1 kH/s is equal to 1,000 (one thousand) hashes per second
  • 1 MH/s is equal to 1,000,000 (one million) hashes per second.
  • 1 GH/s is equal to 1,000,000,000 (one billion) hashes per second.
  • 1 TH/s is equal to 1,000,000,000,000 (one trillion) hashes per second.

The more miners there are on a blockchain network, the more guesses at a satisfactory nonce there is every second. The more guesses there are every second, the higher the hash rate. But why does this metric matter?

 

cryptocurrency mining 3

Source: Bitcoin Chaser - Bitcoin Hash Rate (2016-2018)

The hash rate metric matters for two reasons:

  • because it has a reciprocal relationship with the price of the coin;
  • and because the hash rate is a direct measure of the security of a Proof of Work blockchain.

Let's discuss the relationship with market prices first.

Hash Rates and Market Prices

A very high hash rate may create a “price floor” beneath which the price of that coin will typically not fall. This dynamic emerges because miners are usually not willing to sell coins for less than it costs to mine them. In addition to time considerations, a miner that pays for expensive mining equipment and the electricity to run it will have an inherent break-even cost.

A high hash rate reflects a high production cost, suggesting miners will not be willing to trade or sell those coins for a value less than the cost of production.

However, digital asset markets can be volatile. When crypto prices fall on spot markets, some mining rigs will become unprofitable. In other words, the market value of the coin may fall below the miner’s cost of production. As such, some may be forced to shut down their cryptocurrency mining rigs or mine another coin until prices recover.

In theory, this scenario should lower the network hash rate and trigger a reduction in algorithm difficulty to account for less competition. However, if the hash rate doesn’t drop with spot prices, behavior the Bitcoin network often displays, an imbalance occurs. Smaller miners are disadvantaged as competition remains high and the potential for rewards low.

cryptocurrency mining 4

Source: Historical Bitcoin Price - CoinMarketCap

Conversely, if the price of a coin rapidly appreciates while the hash rate remains relatively constant, miners will recognize an incentive to join the network. This scenario unfolds because there's a more significant profit margin in comparison to other coins. An influx of new miners would raise the difficulty of finding a block, and thus the cost of mining new coins, until some sort of equilibrium is reached.

Now that we've seen how hash rates and market prices interact let's move on to how hash rates relate to blockchain security.

Hash Rates and Blockchain Security

A high hash rate is reflective of a robust and secure blockchain network. The higher a blockchains hash power, the more miners it would take to commit a 51% attack. But what is a 51% attack and how does it unfold?

Recall that miners compete to solve for the correct nonce to earn block rewards. However, this process assumes that no miner holds the majority of network hash power. If a miner does manage to amass the majority of blockchain hash power, they can effectively exploit the "Longest Chain" rule.

As a result, malicious miners can reverse, alter, or prevent transactions from being verified. With this understanding, it's apparent that a higher hash rate makes it more challenging to coordinate the number of nodes necessary to carry out a 51% attack.

The Production Costs of Cryptocurrency Mining

As mentioned, the production costs associated with cryptocurrency mining determine a coin break-even price. That is, the price miners will accept for their coins after accounting for all production costs. Beyond the time it takes to mine cryptocurrency, electricity and hardware are the most significant production costs. To better understand their impact on profits, let's take a closer look.

Energy Consumption

Mining equipment is known to use a lot of electricity. This reality has become a common criticism of the PoW consensus mechanism. According to Digiconomist, annualized bitcoin energy consumption currently sits at 73.12 TWh. This electricity use generates a carbon footprint similar to Denmark!

As a result of this intensive energy use, electricity costs resulting from mining are often substantial. For example, the cost to mine 1 BTC in the United States hit $4,758 last year. As such, those looking to mine cryptocurrency need to assess their local electricity costs to determine mining viability. If the local cost of energy is too high, it might not make sense to dive in until the cryptocurrency spot price appreciates, increasing the value of block rewards.

cryptocurrency mining energy consumption

Source: Bitcoinist

Of course, new consensus mechanisms are evolving to improve energy efficiency. Komodo's Delayed Proof of Work (dPoW) security mechanism is an excellent example. The dPoW mechanism recycles the incredible hash rate of the Bitcoin network and extends the same level of security to all blockchains using this innovative security feature. Learn more about Delayed Proof of Work (dPoW) security here.

Hardware Costs

Finally, hardware costs should also be top of mind when exploring cryptocurrency mining. Computers built to facilitate mining utilize expensive processing units, most averaging thousands of dollars. As such, this initial capital investment should be a part of profit calculations. Luckily, most profit calculators provide a field for hardware costs.

How To Begin Cryptocurrency Mining

Now that the relationship between miners and security has been clarified, we can delve deeper into the realm of cryptocurrency mining.

As mentioned, only cryptocurrencies native to a PoW blockchain are mineable. However, because there are several unique algorithms in use across different PoW blockchains, hardware requirements can differ between each mineable coin.

In many instances, custom computers or mining rigs are designed to solve only one of these PoW algorithms. For example, the machine used to mine LTC (Litecoin) would be different than the computer used to mine ZEC (ZCash). However, many cryptocurrencies can be mined using an interoperable rig. Regardless of the final setup chosen, assessing the financial implications of mining is a logical first step.

Application-Specific Integrated Circuit (ASIC) Mining Rigs

When it comes to mining hardware, there are two dominant processing units in today’s market. Application-Specific Integrated Circuits (ASIC) are similar to the random access memory (RAM) chips found on any computer. However, rather than acting as a generic integrated circuit, ASIC miners are designed to maintain a specific blockchain network.

Although more expensive than GPU miners, ASIC miners typically perform better than less powerful alternatives. However, because some PoW algorithms are best mined with ASIC devices, suitable hardware must be chosen to mine each coin. For example, an ASIC miner would be optimal for the Bitcoin, Bitcoin Cash, or Litecoin networks.

ASIC cryptocurrency mining

Source: What To Mine (WTM) - ASIC Algorithms

Graphics Processing Unit (GPU) Mining Rigs

Graphics Processing Unit (GPU) rigs leverage the robust processing power of graphics cards to mine a wide variety of cryptocurrencies. Although graphics cards are part of every computer, high-quality GPUs with higher processing power originate from the gaming industry.

As a result, many gamers complained of exorbitant graphic card costs when crypto markets were skyrocketing throughout 2017. Just as some PoW algorithms are best mined with ASIC machines, others perform optimally on GPU devices. For example, Ethereum (ETH), Ethereum Classic (ETC), and Monero (XMR).

GPU cryptocurrency mining

Source: What To Mine (WTM) - GPU Algorithms

The Future of Cryptocurrency Mining

Although obscure to many, cryptocurrency mining is just another term for validating transactions on a blockchain network. As a function of decentralized networks, mining is essential to maintaining the trustless operation of PoW blockchain networks.

Without a central authority, PoW blockchains rely on the use of cryptographic hash algorithms to reach consensus. In contrast, PoS blockchains don't require mining at all. Instead, these networks rely on stakers to ensure the ongoing security and integrity of the network.

For those considering a foray into the world of cryptocurrency mining, there are many factors to consider. Hash rates, persistent market volatility, local energy rates, and the price of mining hardware are all factors that can make or break a mining operation. In addition, a basic understanding of PoW algorithms is necessary to optimize miner operation and generate higher profits through block rewards.

If you'd like to learn more about cryptocurrency mining, join the Komodo community on Discord. Ask questions in the #talk-mining channel to get answers and learn from industry experts, professional miners, and Komodo team members. You can also sign up for Komodo's weekly newsletter to get all of the latest news and updates from Komodo Platform.

Join us at the cutting edge of the blockchain industry.