Merged mining or combined mining is a protocol that allows two different blockchains that share the same consensus protocol and hash function, to be mined together without loss of performance and maintaining a high level of security.

AAround 2014, a new mining model in which the same miner could dedicate himself to mining blocks in two or more different blockchains, a concept known today as Merged Mining o combined mining.

Although block chains of any cryptocurrencies are completely independent and do not cross each other, there is a possibility that miners will use their mining power (hash rate) to create a valid hash for both networks. An example that we saw come true with the birth of Namecoin, a project that benefited from the mining power of Bitcoin for its funtionability.

Although the concept of merged mining may give rise to the belief that the miner requires greater computing power to mine blocks in two or more different blockchains, the truth is that this mining model does not affect the performance of the mining equipment in any way.

But in essence, A miner can use his computing power to generate different hashes and check them on several different blockchains. In this way, if one of the hashes is valid for Bitcoin, for example, the miner will receive the reward for his work in bitcoins (BTC). Whereas if the hash is valid for the Namecoin network, the miner will then receive his namecoins reward (NMC). Basically it is a job that pays two for one, and it is a situation that benefits you because it generates much more profit.

But how can this be possible if both networks have different transactions? How can you not hurt the performance of the miner if you mine on two chains? What was the origin of Merged mining? How does it work in detail? What projects take advantage of it? These are all interesting questions that we will answer in this chapter of Bit2Me Academy.

Origin of Merged Mining or Combined Mining

The concept of merged mining came to life at the beginning of 2014, when the Auxiliary Proof of Work. This is the protocol that allows the work done within a blockchain network of the type PoW, can be used as your own proof of work in another blockchain network for block mining.

The implementation of AuxPoW started in the blockchains of Bitcoin and Namecoin. This was possible thanks to the fact that both blockchains operate under the mining algorithm, the  SHA-256. This is one of the main needs of this protocol, blockchain must share the same protocol, or it is impractical. The development of AuxPoW then continued with its development in the Dogecoin and Litecoin. In this case, both networks work under the algorithm scrypt for block mining.

However, although it is not explicit in the Bitcoin white paper, in 2009 the enigmatic Satoshi Nakamoto expressed in a thread Bitcointalk the possibility of sharing the computational power of miners to search for proofs of work in several networks simultaneously. This shows that Nakamoto had already foreseen the possibility of this type of work, and opened the door of curiosity for its construction.

How does Merged Mining or Combined Mining work?

Now the operation of merged mining (or combined mining) is certainly not something simple. The creation of Auxiliary Proof of Work (AuxPoW) o Auxiliary Work Test It took extensive research and development work to make it possible for miners to mine hashes and validate them on two or more different blockchain networks. And all this, without jeopardizing the operation of any of the networks in which the miner did his work. With that in mind, the developers managed to create this mining protocol and thus take full advantage of the mining power of the equipment. on multiple chains simultaneously and synchronously.

How combined mining or merged mining works

Although for this, blockchains that want to mine at the same time must work under the same mining algorithm. For example, Bitcoin can be mined alongside any other cryptocurrency, as long as it uses the algorithm SHA-256.

Likewise, when merged mining is implemented there will always be a blockchain network that works like the main network (parent blockchain) and another that works like auxiliary network (auxiliary blockchain). That is, there will always be a blockchain network where the miner performs the entire process of calculating and mining the block. While another network accepts these processes as proof of work for block mining in its own network.

We can clearly see this case in Bitcoin with the networks Namecoin y RSK. In these cases, the main network is Bitcoin, where the miners do the mining work. While Namecoin and RSK are ancillary networks that accept the work of the Bitcoin network as valid.

For its part, for the networks involved in merged mining to accept the process, the main blockchain network must allow the entry of arbitrary data in the headers of the mined blocks. While the auxiliary network must incorporate a verification process that allows demonstrating that the mining work has been carried out on the main blockchain network.

Combined mining process characteristics

Combined mining involves a series of elements or characteristics that are relevant for its proper realization and operation. Among them we can highlight:

  • Miners must build a block that is compatible for the blockchains where they participate. For example, if merged mining is used with the Bitcoin and Namecoin blockchains, the block that is generated on the Bitcoin blockchain is adjusted to be suitable on both networks, since Namecoin is the auxiliary network and therefore accepts AuxPoW. In this case, the miner can receive mining rewards from both networks. While if the block is generated in the Namecoin network, whose level of difficulty is much lower than that of the main blockchain, it will not be compatible with the Bitcoin blockchain, since Bitcoin does not recognize the AuxPoW protocol. Therefore, the miner can only receive the reward generated in the Namecoin network.
  • When an additional hash is added in the Merkle tree of the main chain, it does not undergo any changes or modifications, as it does in the auxiliary chain. In this case, the miner adds the created hash and the block header of the main blockchain to the auxiliary blockchain, which will be used as the proof of work. However, this arbitrary data will be ignored by the AuxPoW protocol and only the top level hashes will be added to the auxiliary blockchain.

Blocks inside a Merged Mining

The merged mining process or combined mining generates valid blocks for both the main and auxiliary networks. But in the latter case, the AuxPoW protocol adds certain information that is vital for the correct operation of the protocol and the auxiliary network. So we have that each block contains the following information

Structure of a combined mining block

As you can see much of the data of a block within a merged mining, especially, the block that goes to the auxiliary network is identical, to the data that contains a block within the main network. The rest of the data is adapted so that the auxiliary network can take the block as valid and it is stored correctly within its blockchain.

How much do you know, cryptonuta?

Can combined mining cause hard forks in the networks where it is applied?

FALSE!

Combined mining or merged mining cannot divide the chain of blocks in which it is practiced in two, since the protocol regulates the way in which the blocks are produced and accepted by both networks.

Pros and Cons of Merged Mining

Pros

  • Combined mining allows the same mining equipment to be used to participate in the generation of new blocks in several different networks at the same time. With merged mining it is possible that the same mining equipment can generate new blocks at the same time in two or more different blockchains.
  • Likewise, merged mining increases the power of hash in blockchains networks increases. Which in turn generates greater computational power for networks and an increase in their level of difficulty. Making networks more secure and robust, by having greater computational capacity or hashing. This can be a great advantage for small blockchains that do not have much hashing power, and therefore do not have a very high level of security. Therefore, through merged mining, they can take advantage of the hash power of a larger and more robust blockchain, and increase their level of security, reducing the probability of suffering attacks. A perfect example is Namecoin, whose blockchain is small but its level of security is very similar to that of Bitcoin, thanks to the level of difficulty of its mining.
  • By allowing the same mining equipment to be used for block mining in several networks simultaneously, in Increases profitability and performance of mining equipment. And therefore of the mining activity itself.
  • Miners who implement combined mining have many more possibilities to generate new blocks using the same mining algorithm, such as the SHA-256. And therefore, they will also be much more likely to receive rewards from networks for block mining.

Cons

  • In the case of mining pools that want to implement AuxPoW for merged mining in several blockchains, they must manage at least two or more of these networks to be able to mine in them.
  • For merged mining to be effective, The alternative blockchain needs to undergo some kind of modification or adjustment. Which is generally a hard fork or hard fork. For example, in Namecoin, important adjustments were made in the network version to make it compatible with merged mining. So users suffered a noticeable and substantial change since both versions of the network. This, both the old and new versions, were no longer compatible with each other as of block number 19.200.
  • Likewise, for merged mining to function properly, miners must use blockchains that operate under the same mining algorithm. So there will be cases in which some cryptocurrencies cannot be mined together with others, if they do not use the same algorithm.

Some implementations of merged mining

Bitcoin and Namecoin

This merger is the first merged mining created in the crypto ecosystem, which occurred in early 2014. Both cryptocurrencies use the SHA-256 mining algorithm.

However, although Namecoin (NMC) for that time remained in the first places by capitalization among the most used cryptocurrencies. But today, despite the merger it shares with the Bitcoin network, Namecoin is ranked 392 by market capitalization. While Bitcoin (BTC) continues to position itself as the most widely used cryptocurrency worldwide.

Dogecoin and Litecoin

A few months after the launch of Dogecoin (DOGE) in 2013, its community made the decision to switch the network to AuxPoW, merging with the Litecoin (LTC) network in September 2014. This integration allowed Dogecoin to exponentially increase its value by more 180% in just a few weeks.

This combination has also allowed Dogecoin (DOGE) to be able to climb position next to one of the best known and used cryptocurrencies worldwide. Litecoin (LTC) is currently ranked # 7 for market capitalization among the most widely used cryptocurrencies. Likewise, combined mining has allowed Dogecoin to significantly improve its level of security, having a much greater computing power than in its beginnings.

Bitcoin and Elastos

Although this is probably one of the least known combinations, the Elastos project and its ELA cryptocurrencies promise a rise quite similar to that experienced by Dogecoin (DOGE), when it begins its mining process combined with the largest and most popular of blockchain networks, Bitcoin.

Elastos is the first open source operating system based on blockchain technology that focuses on the internet. This system was designed with the purpose of creating a new operating system for the operation of the internet that was powered by blockchain technology. In such a way that it was a completely secure and decentralized operating system so that users could carry out their operations reliably and directly.

Bitcoin and RSK

RSK is the developed platform that allows the implementation of smart contracts within the Bitcoin network in a safe and simple way. As RSK also implements the SHA-256 algorithm, the combination of the Bitcoin network and the platform RSK is possible.

As in the other merged mining application cases, the implementation of combined mining allows the use of the same mining equipment in both networks. Reducing investment and resource costs for acquiring complex equipment separately. Likewise, the hashing power of one of the networks can be used as a benefit to increase the security of the other network. . At the same time, miners will be much more likely to generate a new block by simultaneously participating in two different networks. And of course, they can also receive the rewards that are granted by both networks.