Modules for Personal Finance
Introduction to cryptocurrencies
Translate the power of knowledge into action. Open Free* Demat Account
Have you ever wondered how new coins of an existing cryptocurrency are created? In the case of fiat currency, we have a process called coin minting to bring new coins into existence. But what about cryptocurrencies?
Well, there are two key ways to create new coins on an existing blockchain. They are ‘Proof of Work’ and ‘Proof of Stake.’
Proof of Work (PoW) is one of the most common ways to create new crypto coins on an existing blockchain. Bitcoin and Ethereum, the two largest cryptocurrencies in the world, use this method to make new coins. In common parlance, this is referred to as coin mining.
What is crypto mining?
Crypto mining or coin mining is the process by which transactions on the blockchain are verified and new crypto coins are generated. Remember reading about how blockchains are essentially blocks of data chained together, in an earlier chapter?
In simple terms, crypto miners are responsible for adding a new block of data to an existing blockchain. And this process is known as mining. In return for their work, miners are rewarded in the same cryptocurrency that pertains to the blockchain they work with.
But how do the crypto miners add the block to the chain, so to speak? To understand the process involved, we will have to get into the details.
How does crypto mining work?
The way crypto mining works is intricately connected to how a new transaction is recorded onto the blockchain. They are essentially two sides of a coin - crypto miners verify and confirm new crypto transactions and add the relevant data block to the chain, and they are then rewarded in cryptocurrency. In this manner, new crypto coins enter the circulation.
Here is a closer look at how crypto miners go about the process of coin mining.
Step 1: A transaction is initiated
A user initiates a transaction from their crypto wallet. This transaction is typically to send a crypto coin from their wallet to another user.
Step 2: It enters a group of unconfirmed transactions
The crypto wallet app broadcasts this newly initiated - but as yet unconfirmed - transaction to the blockchain. It is sent to a group of other such unconfirmed transactions. Typically, multiple such transactions are grouped into small pools. It is the responsibility of crypto miners to confirm and process these transactions.
Step 3: Transactions are selected by crypto miners
Crypto miners on the blockchain network select multiple transactions from these pools of unconfirmed transactions. They then create a block of data pertaining to the transactions they have selected. Since there are multiple miners on a network, it is very possible that two or miners may end up selecting the same transaction. That is not an issue, as you will find out later.
Miners select transactions till the block size reaches the specified limit. In the case of the Bitcoin blockchain, for example, the block size should be 1MB.
Step 4: The actual process of mining occurs
This is the most important step in the coin mining procedure. It is where the actual mining occurs. Once a miner has selected the transactions and created the block, they need to add it to the existing blockchain. As you have already seen in the chapter on blockchains, miners need a signature to do this.
A signature is simply a string of characters of a certain length. It is generated using a cryptographic hash function. The signature of each block of data depends entirely on the input data in that block. If the input data changes, even just a little bit, so does the signature.
Each blockchain has certain specific requirements that a signature must meet. For instance:
- It must be in a specific format
- It must start with a certain number of zeros
- It must be of a certain length
So, the job of a crypto miner is to find a signature that meets the required criteria. Basically, in simple terms, they need to find this signature by using a method of trial and error. They need to change the input data to see if the output signature matches the required criteria.
But the transaction data in the block cannot - and should not - be changed. Isn’t it? So, what part of a block can miners change without altering the transaction data? Here is where a nonce - or a number only used once - comes in.
A nonce is a number that is added to the input data in a block. It can be rehashed or modified multiple times, until the output signature meets the requirements of the blockchain.
Crypto miners continue to change the nonce repeatedly until they get a valid signature. This is what the actual mining process is all about. And it is not manually possible to change the nonce from one option to another till the signature is valid, because that would take weeks or months on end. Perhaps even years. This is why crypto miners use powerful computers that use algorithms to solve and find the right nonce. And it is also why mining is a very intensive process that consumes a lot of electricity, because the powerful computers need to be constantly running until an eligible and valid signature for a block is found.
You need to keep in mind that many miners simultaneously work together to find signatures for different blocks of data. Often, many transactions may be a part of multiple blocks. This does not matter, because the miner who finds a valid signature to their block first proceeds to the next step. And if verified, the transactions in that block will no longer be ‘unconfirmed.’ So, they will no longer form a part of other unverified blocks.
Step 5: Other crypto miners verify the signature
If and when a crypto miner finds a valid signature for a block, it cannot be added to the blockchain right away. It needs to be verified by other crypto miners. They will check if the input data in the block leads to the proposed valid signature as computed by the miner in question. Once it is verified, the block of data is added to the blockchain. And the miner who found the signature is rewarded in the same cryptocurrency that is linked to the said blockchain. The rewards for different transactions are different. Some pay higher rewards, while others pay less.
See how simple the process of coin mining actually is? The reason it is known as ‘Proof of Work’ is because the valid and eligible signature, which is verified by the other crypto miners, is evidence that computational work has been performed by the miner. And once a block of data is added to a blockchain, you cannot modify it without changing all the consecutive blocks.
A quick recap
- There are two key ways to create new coins on an existing blockchain. They are ‘Proof of Work’ and ‘Proof of Stake.’
- Crypto mining or coin mining is the process by which transactions on the blockchain are verified and new crypto coins are generated.
- It is the process by which crypto miners find the signature needed to add a new block of data to an existing blockchain.
Frequently Asked Questions (FAQs)
Is mining crypto illegal?
The answer to this depends on your geographical location. In some countries and areas like Iran, China and Kosovo, it is illegal. In most other countries, there are no specific laws that make crypto coin mining illegal.
Is crypto mining profitable?
One of the biggest expenses for crypto miners is electricity. If you have access to low cost power, coin mining may be profitable for you.
Is crypto mining safe?
Crypto mining is not harmful to you or your computer per se. However, because of how power intensive the operation is, the Graphic Processing Units in your computer may degrade faster than the average life. You can work around this issue by setting up a proper cooling system and by performing regular maintenance and upkeep.
How would you rate this chapter?