Cryptocurrency mining is the process by which transactions between users are verified and added to the public global blockchain. The mining process is also responsible for introducing new coins into the existing circulation. It is one of the key elements that allows cryptocurrencies to function as a decentralised peer-to-peer network, without the need for a third-party central authority.
Bitcoin is the most popular and well-established example of cryptocurrency. It is worth noting that not all cryptocurrencies can be used. Bitcoin mining is based on a consent algorithm called Proof of Work.
How does crypto mining work?
The miner is essentially a node in the network that collects transactions and organises them into blocks. Whenever transactions are made, all network nodes receive them and verify their validity. The miners then collect these trades from the memory space and begin grouping them into a block.
The first step in mining a block is to fragment each transaction received from the memory pool individually. Before the process begins, the miner node adds a transaction, where it sends itself the mining reward.
After each transaction is fragmented, the fractions are organised into something called a Merkle Tree. This is formed by organising the various hash products in pairs and then fragmenting them again. The exits are then organised in pairs and fragmented once more, and the process is repeated until it reaches the top of the tree. The top of the tree is also called Merkle root and is basically a single fragmentation product. This represents all the previous fragmentations used to create it.
The root fragment, along with the fragment of the previous block and a random number called nonce, is then placed in the block header. The block header is then fragmented to produce an output based on these elements, plus a few other parameters. The resulting output is the hash block and will serve as the identifier of the newly created block.
To be considered valid, the output must be less than a specific target value specified by the protocol. In other words, the hash block must start with a certain number of zeros.
The target value – also known as the “hash difficulty” – is regularly adjusted by the protocol. This ensures that the rate of creation of new blocks remains constant and proportional to the amount of fragmentation power devoted to the network.
Therefore, each time new miners join the network and competition increases, the difficulty of fragmentation increases, preventing a reduction in the average foreclosure time. If miners decide to leave the network, the hassle of fragmentation will be reduced, keeping the shutdown time constant, even though there is less computing power dedicated to the network.
The cryptocurrency mining process requires miners to keep fragmenting the block header over and over again, through the nonce, until a miner in the network finally produces a valid hash block. When a valid hash product is found, the founding node will transmit the block to the network. All other nodes will check if the fragmentation is valid and, if so, add the block to the blockchain copy. Finally, they will proceed to the mining of the next block.
It sometimes happens though, that two miners transmit a valid block at the same time. The network ends with two competing blocks. The miners start mining the next block, based on the block they received first. The competition between these blocks will continue, until the next block is mined, based on any of the competing blocks. The block that is abandoned is called an orphaned block or stale. The miners of this block will return to the mining of the chain of the block that prevailed.
The block reward is given to the miner who first discovers the valid fragmentation. However, the probability of finding fragmentation is equal to the part of the total mining power in the network. Miners with a small percentage of mining power, have a very small chance of discovering the next block on their own. “Mining pools” are created to solve this problem. They translate into a pool of resources from miners, who share their processing power over a network, to distribute the reward equally among everyone in the team, depending on their contribution to the chance of finding a new block.
Legal and illegal crypto mining
Crypto mining in general is a very complex and expensive process. When Bitcoin was first created, it was very easy to mine the coveted online money, but the situation today is different. Today, more and more computer power is required, in order to generate a unit of a crypto currency. Crypto miners, as they faced a few difficulties, tried to find another way to mine crypto currencies and gain more profit. Thus, they began mining in countries where the energy price is very low, like in Iceland or Venezuela.
In order to understand how cyber criminals proceed in illegal crypto mining and what tools they use, you have to find a combination of security solutions, thus preventing unwanted mining. There must be an antivirus installed on your computer, kept up to date.
Cyber criminals also mine illegally using malware; they find ways to smuggle in into the computer of their victims, usually via “infected” websites. One thing is for sure though; before engaging in any crypto activities, you should do your research and find websites that are trustworthy, as hackers may be just around the corner….