What is mining?
Many of us have heard that mining is profitable, but what does mining really mean? You’ve probably heard many people say that mining cryptocurrencies is very profitable, or it consumes a lot of electricity, or we hear very much that anyone with an ASIC device or GPU rig has started to mine cryptocurrency. We intend to give a full explanation of cryptocurrencies mining.
What is cryptocurrency mining?
Mining is a process in which the cryptocurrency transactions are confirmed and added to blockchain. With mining, new coins are produced and added to the circulation of a particular cryptocurrency. Mining also makes cryptocurrencies work as a decentralized network without the need for a third-party or central entity. That is, cryptocurrencies are created without the need for a centralized system or intermediaries like central banks or the state, and they have no involvement in the process of mining or production of coins.
Where does mining come from?
Because cryptocurrencies like Bitcoin have a decentralized nature, their networks require people around the world to be involved in maintaining and securing this network. People who are involved in this, get paid by receiving rewards from the network for their services. They are rewarded in the form of that cryptocurrency such as Bitcoin, Ethereum, etc.
The word mining in cryptocurrencies is similar to that of the workers do in a mine (such as gold miners). As gold miners require expertise, a person who does this for cryptocurrencies should be an expert too. They receive a reward for their service in the form of cryptocurrency, and it can be said that cryptocurrencies are produced in this way. Due to the similarity of this activity with the real meaning of the word mining, we can use it for cryptocurrencies.
How does it work?
When a person performs a transaction, that transaction enters the network and a lot of steps take place so that the transaction can be verified and added to a block in blockchain. Miner, a type of node in the network, collects transactions that are sent to the network and try to organize and validate them. The node is responsible for receiving and verifying transactions and then adding them to its mempool. Then it eventually adds those transactions to a block that currently has multiple transactions. Miners add transactions until the block capacity is filled and then they go to the next block.
Many cryptocurrencies like Bitcoin, Ethereum, etc., require a lot of computational power based on a consensus algorithm. A proof of work or PoW is an algorithm that results in decentralization of the network as much as possible. Proof of work is a kind of consensus algorithm that is primarily used to validate transactions and add new blocks to the blockchain network. In fact, because of this algorithm, miners compete with each other to solve the computing problem and add blocks.
To validate a transaction in mining, powerful hardware such as high-power GPUs and ASICs are required, which, in addition to high speed, consumes a lot of energy. This led to hardware downgrading through graphics cards and CPUs and instead using ASIC, which has a much lower power consumption. However, the ASICs also have their own disadvantages. Depreciation and electricity costs are high.
Who is a miner?
The people or nodes that do mining are called miners. The miners are in fact nodes whose goal is to prove the transaction to create a block. The nodes are divided into full-nodes and light-nodes. The miner uses hardware such as CPU, GPU or ASIC to solve a cryptographic problem and validate the transaction. The first person completing this task reports the results to the network and can therefore be confirmed by full-nodes. Once consensus has been reached, the person (node) will have the right to add a block to the existing blockchain and get the reward.
The job of a miner is that it initially hashes the existing transactions. The miner adds a transaction called Coinbase to the top of the transaction before the hash begins. Coinbase is in fact a transaction where the miner’s address exists. If miner can solve that transaction and add to the block, the mining reward is sent to Coinbase. Coinbase is a transaction in which new coins are created and is usually the first new block transaction.
After this step, the miner starts to hash the transactions. Then every two pair of these hashes get hashed again and this process is repeated hierarchy to the top which is called the Merkle root.
The hash of the root then comes with the hash of the previous block and the nonce or the random numbers and placed in the header of the block. Then the total will be hashed and an output is produced. This output is used as block validator. This output or number must be lower than the value specified by the protocol. In other words, the hash of the block header must start with a certain number of zeros. The desired amount, which is determined after this stage, is called “difficulty”. The hashing is to ensure that new blocks are created, and the blocks are as powerful as the network’s hashing power.
Miners, through the nonce retrieval, will hash the block header over and over until a miner in the network finally produces a valid hash. After the valid hash is found, the node will send the block to the network. Then, other nodes will check the validity of the hash or block, and if the nodes reach a consensus and validate it, they add that block to the blockchain and go to the next block to be minted.
In fact, the process of mining is as follows. In order to be able to connect to the blockchain, there should be ASICs or GPU rigs, and all this process is performed during cryptocurrency mining. It should be noted that miners with a small percentage of power mines have very little chance of finding the next block. Mining pools have been created to solve this problem. Mining pools means sharing resources with miners in order to receive the reward evenly distributed among pool members. The share of this division is based on the amount of computing power that each miner puts into the pool to find the block. That the amount of computing power you give to your pool will determine your percentage from the mining reward.
It is true that mining is profitable, but it may not be profitable in some situations. Mining costs come first. If you want to be the first person to guess the hash, you have to have lots of hashing power. The more powerful your system, the more hassle you can check. Anyone who takes the first right guess and can solve the problem wins. Anyone who can speed up his guesses will have a better chance of winning.
In practice, this means that the miners compete with each other to calculate more hash rates and hope that they will be the first to achieve their correct hash and cryptocurrencies. However, the difficulty of calculating hashes is gradually increasing, and mining of each new coin subset is harder. Theoretically, this keeps the new blocks rates constant. Many cryptocurrencies have a certain ceiling for the number of units that can be produced. For example, there are only 21 million bitcoins. After mining all the bitcoins, mining a new block will not produce other bitcoins. Miners are rewarded with fees.
Although you could have used mining with a conventional computer, this method is no longer possible. By increasing the number of people who are mining, the quality and quantity of hardware that you need to mine is also increasing. This can be seen from the fact that computers with a powerful processor or graphics card are replaced by multiple graphics cards that work together or even specialized chips specially designed to mine cryptocurrencies.
To do this, you need to have a high computing power that requires a powerful device and electricity, so you need to have powerful devices to have more chances. Another controversial issue is that, since mining is done 24 hours a day, this will eventually cause depreciating rigs or ASICs. All of this causes more costs.
mining is now an integral part of the world of cryptocurrencies. Anyone can be a miner by providing mining requirements and receive rewards in return for providing services to the network. This reward is in the form of the cryptocurrency of that network.