Crypto mining, short for cryptocurrency mining, is the process of creating units of digital currency by verifying new transactions and adding them to the public ledger known as the blockchain.
The blockchain is a massive database that is shared and maintained by its users, and it’s the essential feature that allows cryptocurrency to function as a decentralized peer-to-peer network instead of a currency regulated by a central authority. Only some types of cryptocurrency can be mined, a few of the most popular of which are Bitcoin
, and Dogecoin
Mining also incorporates the process of hashing the new crypto coins, which is a security measure that irreversibly scrambles the transactional data.
So how does this mysterious process work exactly? And can anybody get in on this potentially lucrative action? Read on to learn everything you need to know about this truly 21st-century topic.
Is crypto mining like gold mining?
“Mining” is an appropriate word for the process of bringing new units of cryptocurrency into circulation. Traditional mining, such as for gold or diamonds, and crypto mining actually have a whole lot in common.
Just like mining for gold will give you sore muscles, mining for crypto involves hard work. Anyone can become a miner for either precious stones or digital gems if they have the time and money to do it. And in both cases, mining results in the gradual accumulation of earnings, whether those are diamonds or Bitcoins.
However, there are also some major differences: The main one is that the hard work of mining for crypto is done by computers, and you need a lot of computing power to do it. Places with cheap electricity to run high-powered computers affordably typically have more miners. For example, Chinese miners account for 70% of Bitcoin mining.
Another major difference between traditional mining and crypto mining is that terrestrial mining gives you a physical item, such as a ruby or emerald, while crypto mining gives you something a little less tangible. But just because you can’t hold cryptocurrency doesn’t mean it isn’t real… and valuable.
The ins and outs of cryptocurrency mining
Now on to the nitty-gritty: How does crypto mining actually happen?
This is going to get confusing, so try to stay with me: The blockchain
network has that name because all the nodes in the network are organized into blocks. Each node is a miner. The nodes in a network receive and verify each transaction that is made in the network, then add that transaction to others from something called the “memory pool” (a.k.a. “mempool”).
From the transactions in the memory pool, the cryptominers (or nodes) begin assembling transactions into “candidate blocks.” A candidate block is where the riches are… potentially. It is a new block that a miner tries to get the network to validate in a competition against other miners. If the network validates the candidate block and it’s the next block added to the blockchain, the miner reaps the block reward – that is, new cryptocurrency
To establish a candidate block, a miner starts by creating an initial transaction — called the coinbase transaction — that sends themselves the block reward. This is usually the first transaction recorded in a new candidate block. It is followed by a series of transactions taken from the memory pool, all of which the miner hashes.
The miner then organizes all of these hashed transactions into something called a Merkle Tree, or hash tree, which involves pairing up hashed transactions and hashing the pair, then repeating that process until the final hash — otherwise known as the root hash or Merkle root. The root hash represents all of the other hashes that went into creating it.
The root hash is added to the hash of the previous block and an arbitrary number called nonce, and this combination creates the block's header. Miners must then repeatedly hash the block header until one of them creates a valid “block hash” that identifies this newly created candidate block.
To be considered valid, the block hash must be under a specific value known as the hashing difficulty. This threshold number is frequently and automatically adjusted so that the number of new blocks being created stays in proportion with the hashing power in the network. The hashing difficulty increases as more miners join the network, ensuring that the average block time remains consistent, and vice versa as miners depart.
When a miner finds a valid hash, that miner will broadcast the block to the network. All the other miners in the network will determine whether it is valid, and if it is, they’ll add it into their copy of the blockchain. Then they’ll move on to mine their next block. Meanwhile, the miner who found the valid hash will win the block reward: new coins.
Specifics of mining bitcoin
Considering Bitcoin’s popularity, many would-be miners focus on the possibility of bitcoin mining. The hashes used in bitcoin mining are generated by a SHA-256 cryptographic hash function. An Application-Specific Integrated Circuit (ASIC) allows Bitcoin miners to use hardware designed specifically for Bitcoin and other SHA-256 algo coins. An ASIC is more effective than a central processing unit (CPU), graphics processing unit (GPU), or a field-programmable gate array (FPGA).
An algorithm called proof-of-work is needed to add new blocks to the Bitcoin blockchain. Proof-of-work is the foundation for many cryptocurrencies like Bitcoin and Ethereum, taking the place of a central bank in securing the currency. The purpose of the proof-of-work is to make it extremely difficult for users to spend digital money more than once. Most mining-based altcoins, like Litecoin, also use proof-of-work.
Every time 210,000 Bitcoin blocks are mined, which happens around every four years, the total number of bitcoins that miners can compete to win is cut in half. These halving events in the Bitcoin network are highly anticipated, as the reduction in supply is thought to drive the price of the currency up and increase the profitability of Bitcoin mining.
Should I mine some crypto?
Mining cryptocurrency is no cinch. Unless you have a lot of computing power and quite a bit of know-how, it may be a better bet to consider buying crypto on a cryptocurrency exchange instead of trying to mine it yourself.
This is in part because a miner’s chance of finding a valid block hash equals their share of the total mining power on the network. Miners who control only a small amount of mining power have a tiny chance of finding the next block alone.
To help solve this problem, miners combine their resources into mining pools. Those in the pools share processing power over a network, then split the reward among those in the pool in proportion to the amount of work they contributed to the mining process. This can be a good solution for individuals interested in engaging in crypto mining.