What Is Crypto Mining? How Cryptocurrency Mining Works

What Is Crypto Mining? How Cryptocurrency Mining Works

1 Star2 Stars3 Stars4 Stars5 Stars (103 votes, average: 3.51 out of 5)

Although crypto mining has only been around since Bitcoin was first mined in 2009, it’s made quite a splash with miners, investors and cybercriminals alike. Here’s what to know about cryptocurrency mining and how it works…

Crypto mining (or “cryptomining,” if you’d prefer) is a popular topic in online forums. You’ve probably seen videos and read articles about Bitcoin, Dash, Ethereum, and other types of cryptocurrencies. And in those pieces of content, the topic of cryptocurrency mining often comes up. But all of this may leave you wondering, “what is Bitcoin mining?” or “what is crypto mining?”

In a nutshell, cryptocurrency mining is a term that refers to the process of gathering cryptocurrency as a reward for work that you complete. (This is known as Bitcoin mining when talking about mining Bitcoins specifically.) But why do people crypto mine? For some, they’re looking for another source of income. For others, it’s about gaining greater financial freedom without governments or banks butting in. But whatever the reason, cryptocurrencies are a growing area of interest for technophiles, investors, and cybercriminals alike.

So, what is cryptocurrency mining (in a more technical sense) and how does it work? Let’s break it down.

What Is Crypto Mining? Cryptocurrency Mining Explained

The term crypto mining means gaining cryptocurrencies by solving cryptographic equations through the use of computers. This process involves validating data blocks and adding transaction records to a public record (ledger) known as a blockchain.

Check out this video from The New York Times that breaks down cryptocurrencies and how crypto mining works:

In a more technical sense, cryptocurrency mining is a transactional process that involves the use of computers and cryptographic processes to solve complex functions and record data to a blockchain. In fact, there are entire networks of devices that are involved in cryptomining and that keep shared records via those blockchains.

It’s important to understand that the cryptocurrency market itself is an alternative to the traditional banking system that we use globally. So, to better understand how crypto mining works, you first need to understand the difference between centralized and decentralized systems.

Traditional Banks Are Centralized Systems

In traditional banking, there’s a central authority that controls, maintains, and updates a centralized record (ledger). That means that every single transaction has to go through the central banking system, where it’s recorded and verified. Plus, it’s a restricted system — only a small number of organizations (banks) are allowed to connect to the centralized banking system directly.

Cryptocurrencies Use Decentralized, Distributed Systems

With cryptocurrencies, there’s no central authority, nor is there a centralized ledger. That’s because cryptocurrencies operate in a decentralized system with a distributed ledger (more on this shortly) known as blockchain. Unlike the traditional banking system, anybody can be directly connected to and participate in the cryptocurrency “system.” You can send and receive payments without going through a central bank. That’s why it’s called decentralized digital currency.

But in addition to being decentralized, cryptocurrency is also a distributed system. This means the record (ledger) of all transactions is publicly available and stored on lots of different computers. This differs from the traditional banks we mentioned earlier, which are centralized systems.

But without a central bank, how are transactions verified before being added to the ledger? Instead of using a central banking system to verify transactions (for example, making sure the sender has enough money to make the payment), cryptocurrency uses cryptographic algorithms to verify transactions.

And that’s where bitcoin miners come in. Performing the cryptographic calculations for each transaction adds up to a lot of computing work. Miners use their computers to perform the cryptographic work required to add new transactions to the ledger. As a thanks, they get a small amount of cryptocurrency themselves.

Understanding the Terms: Centralized, Decentralized, and Distributed

To help you better understand what I’m talking about, let’s consider the following graphic:

Cryptocurrency graphic illustrating the difference between centralized and decentralized systems
The examples in the graphic above display the differences between a centralized system and a decentralized one.

In the left half of the graphic is an illustration of a centralized system. The traditional centralized currency system in the U.S. operates through the use of computers, networks and technologies that are owned, operated and maintained by financial institutions. So, whenever you send money to a family member or a friend, that transaction goes through your bank.

A decentralized system, on the other hand (as illustrated in the right half of the graphic), operates using a network of separately owned, operated and maintained devices. They lend their resources to create this decentralized network and share the responsibility of verifying transactions, updating and maintaining redundant versions of the ledger simultaneously.

Crypto mining graphic: It shows a distributed ledger in cryptocurrency mining
A distributed network in terms of ledger management and update responsibilities.

Here, there’s no singular centralized authority that maintains a single ledger (like there would be in a centralized system).

So, when we talk about distribution, what do we mean? Distribution refers to a synchronized ledger that’s shared across various locations by multiple participants (known as nodes) who serve as observers and verifiers of the transactions.

Is Crypto Mining Legal?

In general, the answer is yes. Determining whether crypto mining is legal or illegal primarily depends on two key considerations:

  1. Your geographic location, and
  2. Whether you mine crypto through legal means.

However, where you start to tread into the territory of illegal activities is when you use illicit means to mine cryptocurrencies. For example, some cybercriminals use Javascript in browsers or install malware on unsuspecting users’ devices to “hijack” their devices’ processing power. This type of cyber attack is known as cryptojacking. We’re going to publish a separate article on that topic later this month, so stay tuned.

But it’s important to note that cryptocurrency mining is viewed differently by various governments around the globe. The U.S. Library of Congress published a report stating that in Germany, for example, mining Bitcoin is viewed as fulfilling a service that’s at the heart of the Bitcoin cryptocurrency system. The LOC also reports that many local governments in China are cracking down on Bitcoin mining, leading many organizations to stop mining Bitcoin altogether.

Furthermore, some countries view cryptocurrency mining profits as being taxable while other countries view the fruits of such activities as non-taxable income.

We’ll talk more about what makes cryptocurrencies and crypto mining so appealing in a bit. But first, let’s break down how cryptocurrency mining actually works. To do this, we’ll explore the technologies and processes that are involved in it.

How Cryptomining Works (And an In-Depth Look at Blockchain)

In a nutshell, crypto miners verify the legitimacy of transactions in order to reap the rewards of their work in the form of cryptocurrencies. To understand how most cryptocurrency mining works in a more technical sense, you first need to understand the technologies and processes behind it. This includes understanding what blockchain is and how it works.

The first thing to know is that two things are central to the concept of blockchain: public key encryption and math. While I’m definitely a fan of the first, I’ll admit that the latter isn’t my strong suit. However, public key cryptography (aka public key encryption or asymmetric encryption) and math go together in blockchains like burgers and beer. 

Traditional cryptocurrencies such as Bitcoin use a decentralized ledger known as blockchain. A blockchain is a series of chained data blocks that contain key pieces of data, including cryptographic hashes. These blocks, which are integral to a blockchain, are groups of data transactions that get added to the end of the ledger. Not only does this add a layer of transparency, but it also serves as an ego inflator when people get to see their transactions being added (chained) to the blockchain. Even though it doesn’t have their names listed on it, it often still evokes a sense of pride and excitement.

Breaking Down the Roles and Processes Within the Bitcoin Blockchain

There are several key components and processes involved in the creation of a blockchain. For this explanation, we’re going to use Bitcoin as our example:

  1. Nodes. These are the individuals and devices that exist within the blockchain (such as your computer and the computers of other cryptocurrency miners).
  2. Miners are the specific nodes whose jobs are to verify (“solve”) unconfirmed blocks in the blockchain by verifying the hashes. Once a miner verifies a block, the confirmed block then gets added to the blockchain. The first miner who announces to the rest of the nodes that they’ve solved the hash is rewarded with a cryptocurrency.
  3. Transactions. A transaction is the thing that gets this party started — I mean, the cryptocurrency mining process rolling. To put it simply, a transaction is an exchange of cryptocurrencies between two parties. Each separate transaction gets bundled with others to form a list that gets added to an unconfirmed block. Each data block must then be verified by the miner nodes.
  4. Hashes. These one-way cryptographic functions are what make it possible for nodes to verify the legitimacy of cryptocurrency mining transactions. A hash is an integral component of every block in the blockchain. A hash is generated by combining the header data from the previous blockchain block with a nonce.
  5. Nonces. A nonce is crypto-speak to describe a number that’s used only once. Basically, NIST describes a nonce as “a random or non-repeating value.” In crypto mining, the nonce gets added to the hash in each block of the blockchain and is the number that the miners are solving for.
  6. Consensus algorithm. This is a protocol within blockchain that helps different notes within a distributed network come to an agreement to verify data. The first type of consensus algorithm is thought to be “proof of work,” or PoW.
  7. Blocks. These are the individual sections that compromise each overall blockchain. Each block contains a list of completed transactions. Blocks, once confirmed, can’t be modified. Making changes to old blocks means that the modified block’s hash — and those of every block that’s been added to the blockchain since that original block was published — would then have to be recognized by all of the other nodes in the peer-to-peer network. Simply put, it’s virtually impossible to modify old blocks.  
  8. Blockchain. The blockchain itself is a series of blocks that are listed in chronological order. Because previously published blocks can’t be modified or altered after they’ve been added to the blockchain, this provides a level of transparency. After all, everyone can see the transactions.

A Step-by-Step Look at the Crypto Mining Process

Okay, it’s time to take a really granular look at the cryptocurrency mining process and better understand how it works.

1. Nodes Verify Transactions Are Legitimate

Transactions are the basis that a cryptocurrency blockchain is built upon. So, let’s consider the following example to understand how this all comes together:

Let’s say you’re a crypto miner and your friend Andy borrows $5,000 from your other friend Jake to buy a swanky new high-end gaming setup. It’s a top-of-the-line computer that’s decked out with the latest gaming setup accoutrements. (You know, everything from the LED keyboard and gaming mouse to the wide multi-screen display and killer combo headset with mic.) To pay him back, Andy sends him a partial Bitcoin unit. However, for the transaction to complete, it needs to undergo a verification process (more on that shortly).

2. Separate Transactions Are Added to a List of Other Transactions to Form a Block

The next step in the crypto mining process is to bundle all transactions into a list that’s then added to a new, unconfirmed block of data. Continuing with the example of the gaming system transaction, Andy’s Bitcoin payment to Jake would be considered one such transaction.

By adding their transaction to the blockchain (once the verification process is complete), it prevents “double spending” of any cryptocurrencies by keeping a permanent, public record. The record is immutable, meaning it can never be manipulated or altered.

3. A Hash and Other Types of Data Are Added to the Unconfirmed Block

Once enough transactions are added to the block, additional info is added as well, including the header data and hash from the previous block in the chain and a new hash for the new block. What happens here is that the header of the most recent block and a nonce are combined to generate the new hash. This hash gets added to the unconfirmed block and will then need to be verified by a miner node.

In this case, let’s say you’re just lucky enough to be the one to solve it. You send a shout-out to all of the other miners on the network to say that you’ve done it and to have them verify as much.

4. Miners Verify the Block’s Hash to Ensure the Block Is Legitimate.

In this step of the process, other miners in the network check the veracity of the unconfirmed block by checking the hash.

But just how complex is a hash? As an example, let’s imagine you apply a SHA-256 hash to the plain text phrase “I love cryptocurrency mining” using a SHA-256 hash calculator. This means that the phrase would becomes “6a0aa6e5058089f590f9562b3a299326ea54dfad1add8f0a141b731580f558a7.” Now, I don’t know about you, but I’m certainly not going to be able to read or decipher what the heck that long line of ciphertext gibberish says.

5. Once the Block is Confirmed and the Block Gets Published in the Blockchain

On the crypto miner’s side of things, this is the time for celebration because the proof of work (PoW) is now complete. The PoW is the time-consuming process of solving the hash and proving to others that you’ve legitimately done so in a way that they can verify.

From the user’s side of things, it basically means that Andy’s transfer of a partial Bitcoin to Jake is now confirmed and will be added to the blockchain as part of the block. Of course, as the most recently confirmed block, the new block gets inserted at the end of the blockchain. This is because blockchain ledgers are chronological in nature and build upon previously published entries.  

How These Components Work Together in the Blockchain Ecosystem

So, how does this ledger stay secure from manipulation and unauthorized modifications? All of the transactions for the ledger are encrypted using public key cryptography. For the blocks to be accepted, they must utilize a hash that the miner nodes on the blockchain can use to verify each block is genuine and unaltered. 

Who Updates the Blockchain (and How Frequently)?

Because there’s no centralized regulating authority to manage or control exchanges, it means that the computers that mine that specific type of cryptocurrency are all responsible for keeping the ledger current. And updates to the blockchain are frequent. For example, Buybitcoinworldwide.com estimates that the Bitcoin blockchain gains a new block every 10 minutes through the mining process.  

With a cryptocurrency blockchain, anyone can see and update the ledger because it’s public. You do this by using your computer to generate random guesses to try to solve an equation that the blockchain system presents. If successful, your transaction gets added to the next data block for approval. If not, you go fish and keep trying until either you’re eventually successful. Or you decide to spend your time and resources elsewhere.

Now that you understand what cryptocurrency mining is and how it works, let’s take a few moments to understand the attraction of cryptocurrencies and why someone would want to mine them. 

A Quick Look at the Different Types of Cryptocurrencies

A stock image representing various types of cryptocurrencies
A stock image representing cryptocurrencies.

You may be wondering what types of cryptocurrencies are out there. You’ve likely heard of a few, such as Bitcoin (BTC), Dash (DASH), and Monero (XMR). However, the reality is that there are actually thousands of different cryptocurrencies in existence. Coinmarketcap.com reports that there are 7,433 cryptocurrencies as of Oct. 16, 2020, and the global crypto market is worth more than $356 billion.

The current values of cryptocurrencies vary greatly and fluctuate daily. For example, yearn.finance (YFI) is worth $14,134.78 per unit and Bitcoin is worth $11,363.07 per unit. BitTorrent (BTT) and Dogecoin (DOGE) are worth just $0.000339 and $0.002572 per unit.

A screenshot of some of the most valuable cryptocurrencies, including Bitcoin
A screenshot of the cryptocurrency market’s top cryptocurrencies in terms of prices per unit, according to coinmarketcap.com.

Why Is Crypto Mining Such a Big Deal?

People love being able to use money digitally. Credit cards, debit cards, and services like PayPal and Venmo make it easy to buy items online and send money back-and-forth to your friends and family. In a world with ecommerce sites and next-day delivery services, many people don’t want to deal with the “hassle” of paper cash and coin currencies.

But what leads people to engage in crypto mining? There isn’t a one-size-fits-all response to that question. After all, people have different needs, interests and goals. We’ll explore just a few of them here now…

1. People Seek Greater Privacy and Control of Their Finances

Not everyone is as trusting of the existing systems. And some would prefer to have greater control — and privacy — when it comes to their finances. The idea here is that Uncle Sam doesn’t need to know when you purchase underwear or how much you spent on that new surround-sound audio system.

To avoid being a part of the traditional centralized banking system, some people keep money under their mattresses or rolled up in old coffee cans in their pantries. But there’s another way that people can keep their money out of the traditional centralized banking system: by mining for and using cryptocurrencies.

Cryptocurrencies such as Bitcoin, Dash, Ethereum and Monero offer a certain level of anonymity to users. Why? Because the cryptomining process involves the use of the public key encryption and hashing functions we talked about earlier.

2. It’s All About the Benjamins

Data from Coherent Market Insights indicates that the global cryptocurrency mining market is expected to surpass $38 billion by 2025.

A screenshot of the coinbase.com Bitcoin trading dashboard
A screenshot of the coinbase.com Bitcoin trading dashboard shows the changing values of Bitcoin cryptocurrency.

A screenshot of the coinbase.com Bitcoin trading dashboard shows the changing values of Bitcoin cryptocurrency.

And for some, crypto mining can be incredibly profitable and is thought to be a good investment. But for many users, this often isn’t the case because there are a lot of resources that go into mining them and often not a high return.

Some cryptocurrencies, such as Bitcoin, are worth a lot of money when you cash them in. Part of this is because they’re limited in terms of supply, maxing out at a total of 21,000,000, and there are already 18,512,200 BTC that have been mined.

And people have the option of buying and selling fractions of Bitcoins, which are known as Satoshi. There are 100,000,000 Satoshi per BTC.

3. Crypto Is Still New, Exciting and “Shiny”

Let’s face it: There are people out there who want to ride the newest technology waves to be a part of the experience. Essentially, they want to be a part of the next best thing. But how many people are involved in crypto mining? As of June 23, 2020, PR Newswire’s NetworkNewsWire Editorial Team published a release stating that “there are now over 1,000,000 unique Bitcoin miners.”

And to think, that number is just for the people who are mining Bitcoin specifically!

If Cryptocurrency Mining Is So Simple, Why Doesn’t Everyone Do It?

While everyone might want to take advantage of crypto mining, the fact is that it’s not for everyone.

1. Crypto Mining Is Resource-Intensive

For one, cryptocurrency mining nowadays requires a lot of resources both in terms of computing power and electricity. Why? Because crypto mining requires a lot of computing power to generate new guesses continually. If you’re successful, then not only do you generate new Bitcoin, but you also get to update the blockchain by adding information to the end of the ledger.

2. Crypto Mining Is Expensive

Not only do you have to worry about having enough processing power and electricity to power your operation, but you also need to keep in mind the costs associated with such a massive initiative. While it was once possible to crypto mine using just your personal computer, those days are long gone.

If you want to have even a slight chance of beating other cryptocurrency miners to the punch, then you need to have the tech and processing capacity to compete at their level. This means having more devices and access to less expensive power. 

3. The ROI Ain’t What It Used to Be

While it’s true that some people have been able to make money by mining cryptocurrencies, the same can’t be said for everyone. And the more that time goes on and the more people that get involved, the decreasing return on investment that crypto miners could expect to receive.

Let’s consider Bitcoin as an example. Approximately every four years (or ever 210,000 blocks mined), Bitcoin experiences an event known as a halving. What this means is that the number of Bitcoins that people would receive as a reward for every blockchain block mined would reduce by half. So, when people first started mining Bitcoins back in 2009, they’d receive 50 BTCs per block. As of the last halving, which took place on May 11, 2020, that rate has since reduced to 6.25 BTC per block.  

Here’s a breakdown of how the halving events have reduced the numbers of BTCs you could expect to receive as a miner:

YearBTC Received Per BlockEvent
200950 BTC(Original BTC Mining Rate)
201325 BTCFirst Halving Event
201612.5 BTCSecond Halving Event
20206.25Third Halving Event

4. It’s Not Feasible (Or It’s Prohibited) In Your Geographic Location

We mentioned earlier that while cryptocurrency mining isn’t illegal in some areas, in some places it is. As we mentioned earlier, governments globally have different viewpoints of cryptocurrencies in terms of crypto mining. Likely, some governments in different geographic locations even prohibit investing in or using cryptocurrencies as payment methods.

Final Thoughts on Cryptocurrency Mining

Cryptocurrency mining is an interesting alternative to the traditional centralized systems that currently operate throughout the world. However, it’s very taxing in terms of computer and power resources and isn’t feasible for many users as a result.

About the author

Casey is a writer and editor with a background in journalism, marketing, PR and communications. She has written about cyber security and information technology for several industry publications, including InfoSec Insights, Hashed Out, Experfy, HackerNoon, and Cybercrime Magazine.