Elastos In A Nutshell – A Layman’s Perspective: Merged Mining Part 2/2

Introductory Video

Part one of this article can be found here.

What Is Merged-Mining?

The Elastos blockchain will be secured by a process called ‘merged-mining.’ In general, merged-mining is a method of leveraging the work done on one blockchain to secure a separate blockchain. With merged-mining, there is always a ‘parent’ chain and an ‘auxiliary’ chain. In this case, the Bitcoin blockchain acts as the parent chain, while Elastos is considered the auxiliary chain. It is for this reason that merged-mining is sometimes called AuxPow (Auxiliary PoW). [4]

Not all blockchains can be merged-mined with one another. In order for merged-mining to work, two conditions must be satisfied.

  1. Both the parent chain and auxiliary chain must use the same consensus algorithm. As follows, Elastos uses PoW with the SHA256 hashing algorithm, in alignment with Bitcoin
  2. The parent chain blocks must contain a field to insert arbitrary data. Rather conveniently, Bitcoin has such a field integrated into the fundamental design. In the transaction list in each Bitcoin block, the very first transaction is called the ‘coinbase’ transaction. The coinbase transaction is the transaction that issues newly minted bitcoins to the miner as a block reward for successfully mining the block. The coinbase transaction allows for a maximum input of 100 bytes of data.

Ok, so Bitcoin and Elastos are compatible, but why merged-mining?

In short, merged-mining with Bitcoin provides all the security of a proven and pre-established blockchain, as it has already accumulated sufficient hash power to render 51% attacks uneconomical.

Next, onto the consensus mechanism of choice:

Elastos and PoW

Consistent Security: To this point, PoW has a perfect record in securing the Bitcoin blockchain. Using an experimental and unproven consensus mechanism is a great risk, especially when considering Elastos’ use-case. The Elastos blockchain will be issuing Decentralized IDs which act as a verification system when making connections through the Carrier network. When a network is used for securing connections between autonomous cars, protecting user data, and inhibiting DDOS attacks and viruses, security is a top priority.

In utilizing a PoW consensus mechanism, Elastos creates proper incentive structures and enlists maximum security to safeguard its network from bad actors. Rather than run a PoW blockchain on its own, though, Elastos has elected to merged-mine with the Bitcoin blockchain. Here’s why:

  1. Energy efficiency: Vast amount of energy is required to generate the electricity necessary to sustain a PoW network. While such a structure contributes to network security, it also places a great strain on the environment. In leveraging Bitcoin’s pre-existing PoW blockchain, Elastos requires no additional energy demands and remains eco-friendly.
  2. Network Security: In order to establish high barriers to entry and thus, ledger manipulation, blockchains must achieve adoption at significant scale. In leveraging Bitcoin’s pre-established and well-scaled blockchain, Elastos bypasses early-stage security issues and avoids the pressure to scale rapidly.

In essence, merged-mining allows the auxiliary chain to “piggy-back” on the hash power of the parent chain. In general, the greater the total hash power of the network, the more secure the blockchain will be. Usually, when a new PoW blockchain such as Elastos is launched, its cumulative network hash power is likely to be very low. However, through merged-mining with Bitcoin, Elastos has the potential to quickly gain huge amounts of hash power, providing the Elastos blockchain with top-notch security right from the get-go.

Merged-mining enables the auxiliary blockchain – Elastos – to accept work done by miners from the parent chain – Bitcoin. As a consequence, there is no extra work needed to secure the Elastos blockchain. Instead, the Elastos blockchain “recycles” work already being done on the Bitcoin blockchain. Thus, merged-mining offers an eco-friendly solution, as it demands negligible incremental power consumption. Merged-mining also increases the value of the work being done by Bitcoin miners, as it helps secure multiple chains without additional electricity consumption.

So how does Merged-Mining actually work?

The first matter to note is that Elastos miners are pre-existing Bitcoin miners that have updated their software to allow for the merged-mining protocol. There are no miners who are mining exclusively on the Elastos blockchain. In essence, Elastos miners are simply Bitcoin miners that are also running the Elastos mining software.

As far as the mining process is concerned, Elastos blocks are mined in conjunction with Bitcoin blocks. Just as with regular Bitcoin mining, the merged-miner first gathers the unconfirmed transactions in the Bitcoin transaction pool and constructs a candidate Bitcoin block. The miner also gathers the unconfirmed transactions from the Elastos transaction pool and generates a candidate Elastos block. Next, the miner hashes the block header of the newly formed candidate Elastos block. This hash is then inserted into the candidate Bitcoin block, in the “arbitrary data” field in the coinbase transaction.

Recall that the Merkle Root is a particular method used to combine all of a block’s transactions into a single hash value. Since the hash of the candidate Elastos block was inserted into the block’s coinbase transaction, it affects the resulting Merkle Root, and thus the Bitcoin block’s block header. It is by this mechanism that the current candidate block on the auxiliary chain is ‘linked’ to the current candidate block on the parent chain.

Screen Shot 2018-12-09 at 07.32.45

Once the link has been made, the miner begins hashing the current candidate Bitcoin block header – which is linked to the current candidate Elastos block – in an attempt to find a solution. Recall that finding a “solution” involves inputting an arbitrary random number called the nonce until the resulting hash of the block header begins with a minimum number of leading zeroes as specified by the difficulty. The difficulty of the auxiliary chain is generally less than that of the parent chain because it has fewer miners, exerting less computing power. After each hash attempt, one of 3 outcomes can arise:

  1. The resulting hash is less than the difficulty specified by both the Bitcoin and Elastos blockchains. In this case, neither network will accept the solution as a valid proof of work, no blocks will be posted to the ledger, and another hash attempt will ensue.
  2. The resulting hash is greater than the difficulty specified by the Elastos blockchain but less than that specified by the Bitcoin blockchain. If this is the case, the solution is valid for the Elastos blockchain, but not so for the Bitcoin blockchain.

Let’s examine outcome (2) in greater detail, with particular attention to the process by which the network of Elastos miners verifies a hash as valid. If a hash with sufficient difficulty is found for the Elastos blockchain, the miner needs to insert the Bitcoin block header and the Bitcoin coinbase transaction into the candidate Elastos block before broadcasting it to the network.

Screen Shot 2018-12-09 at 07.33.50.png

With the Bitcoin block header included, the network of Elastos miners can verify that its hash is indeed above the difficulty threshold. Elastos miners can also verify that the Bitcoin header was hashed with the link to the current candidate Elastos block. Because the coinbase transaction is provided, which is where the hash of the candidate Elastos block is stored, an Elastos miner can verify that the Merkle Root contains the hash of the candidate Elastos block. Since the Bitcoin block header contains the Merkle Root, there is sufficient proof that the work was done in solving the corresponding Elastos block, and so it can be accepted by the Elastos network as valid work.

3. The resulting hash is greater than the difficulty specified by both the Bitcoin and Elastos blockchains. In this scenario, the solution is valid for both blockchains so the miner will carry out the process described in (2), in addition to broadcasting the solved Bitcoin block to the Bitcoin network.

To better grasp the process, consider a contextual analogy:

When a bitcoin miner is mining, it may as well be repeatedly buying lottery tickets – say, Bitcoin lottery tickets. Inputting a Nonce is analogous to buying a ticket, and determining whether it produces a valid hash can be likened to determining whether a ticket has the winning numbers. The more tickets purchased – the more hashing power a miner amasses – the greater the chance of winning the lottery. With merged-mining, every Bitcoin miner has the opportunity to use each ticket it purchases to enter into an additional separate lottery, without expending any additional money or energy.  In this analogy, the other lottery is the Elastos lottery, which is even easier to win due to its significantly lower difficulty. Essentially, miners who opt into the side lottery greatly increase their chances of winning, and without any extra cost. Pending the prize money offered in an additional lottery, there is substantial incentive to participate.

A recap of the features and benefits of Merged-Mining:

  1. Merged-mining requires no extra computational power. Therefore, it is not necessary for merged-miners to invest in more powerful hardware. Bitcoin miners can mine both Bitcoin and Elastos blocks simultaneously using the same hash power.
  2. The parent chain is unaffected. The Bitcoin blockchain is not slowed or bloated in any way by merged-mining. The only addition is a single 32 byte hash to each block, which is all but negligible.
  3. Merged-mining is eco-friendly. Bitcoin miners are already expending energy to secure the Bitcoin blockchain. Elastos leverages this expended energy, thereby limiting its own net energy requirement.
  4. Merged-mining aids in securing new PoW blockchains and preventing 51% attacks. Building a large community of miners takes time. Through merged-mining, an established blockchain with scaled adoption could bootstrap a brand new PoW blockchain by providing it with hash power. As a result, 51% attacks that would otherwise be relatively easy to execute become infeasible.
  5. Merged-mining benefits both networks. Hash power coming from both communities of miners is additive. Since a merged-miner uses its hash power for both the parent and auxiliary blockchain, the total hash power of each respective network increases.
  6. Merged-mining incentivizes greater miner participation by increasing profitability. Merged-miners receive an additional reward for essentially no extra cost. In this case, miners are mining both BTC and ELA without increasing electricity costs. While there are some minor setup expenses, the substantial reward greatly increases the profitability of the overall mining operation.

Merged-Mining Challenges on the Horizon

While merged-mining provides the Elastos blockchain with added security and pre-established operational scale, it also brings forth its own set of challenges.

  • Challenge #1: Galvanize the migration of pre-existing bitcoin miners and mining pools to Elastos merged-mining. While Bitcoin miners can mine both BTC and ELA simultaneously, each still must download the Elastos client in order to begin merged-mining. What’s particularly challenging is motivating miners to invest the time and energy in making the necessary changes. Because Satoshi Nakamoto implemented the ingenious feature of variable difficulty in the PoW consensus algorithm, this challenge will be rather easy to manage.

Recall that as the cumulative hash power in a PoW network grows, the mining difficulty increases. By the same measure, if there is low cumulative hash power, the difficulty will fall in suit, thereby offering the same block reward with a lower corresponding electricity cost. The result: increased profitability, and a greater incentive for miners to return to the network. When merged-mining first goes public, ELA will very likely be far easier to mine than BTC. There are many users in the Elastos community who will be motivated to mine ELA, and the relatively low barriers to entry will allow them to begin operating with low start-up costs. Even if such users cannot provide enough hash power to begin mining on the Bitcoin network, they will still supply enough hash power to compete with those that are merged-mining ELA. In short, if there are not many Elastos miners at first, the incentive structure will economically attract more miners by virtue of a low difficulty level. This is one of the core functional aspects of the PoW feedback loop.

  • Challenge #2: Mediating the risk of pool-centralization that may emerge from economies of scale. Economies of scale arise when an entity gains additional benefits due to an increased level of production. Merged-mining may be affected by this phenomenon because all of the extra costs associated with merged-mining are fixed, meaning that they do not change as a function of provided hashing power. Thus, whether a miner has at its disposal 100 hash per second (H/s) or 100 tH/s (1 tH = 10^12 H), the cost to begin merged-mining is the same. The entity with the higher hash rate will have a greater profit margin on its operations, as more hash power provides increased rewards. As such, merged-mining favors pooled operations. What’s important to examine in this context is the degree of centralization and the nature of its impact on the Elastos ecosystem.

Let’s dig into potential pool-centralization, as it is the greatest of the challenges faced by merged-mining ventures, and also the most nuanced. First, it is important to understand the marginal added costs that are associated with merged-mining. While merged-mining does not require additional energy expenditures – by far the largest mining-related expense – it does require fixed startup costs.

  • Hard-Disk Space ~ $25-50: A full merged-mining node must download a copy of the Elastos blockchain. The size is relatively small early on but grows reasonably quickly. The size of the Bitcoin blockchain is currently in the realm of 190Gb, which it has amassed over the course of 10 years. In its early stages, the Elastos blockchain will take up a minute fraction of Bitcoin’s hefty memory load, but it will grow far faster due to both larger block sizes and faster block times. Fortunately, hard drives have become very cheap, with a more-than-sufficient 1Tb (1,000Gb) hard drive costing around $50. Disk space continues to become cheaper as well.
  • RAM ~ $10-30: According to bitcoin.org, the requirement to run a full Bitcoin node is 2gb of RAM. Assuming the Elastos client requires an extra 2gb of RAM to run, the related costs are not significant. [3]
  • Bandwidth ~ Variable: Bandwidth is the greatest factor to consider concerning merged-mining. Both disk space and RAM present near-negligible fixed costs, while bandwidth presents an ongoing, variable cost. Merged-miners require extra bandwidth because they relay and broadcast blocks for both Bitcoin and Elastos. The corresponding costs will depend upon countries in which the miners reside, their specific service providers, and style of node configuration. While bandwidth demands ongoing expenditures for merged-miners on the Elastos blockchain – or any other for that matter – bandwidth for the average consumer has increased dramatically over the years. Although the amount of bandwidth required to merged-mine will remain relatively constant, the per-Mb cost of bandwidth will likely continue decreasing.

Now, let’s tie the cost breakdown in with economies of scale and centralization. Essentially, the added costs to merged-mine are the same for both an individual miner and a mining pool. A typical BTC mining pool scores million-dollar annual cash flows and requires very high operating costs. Consequently, a large pool will likely have no issue with a one time cost of ~$80, and the relatively low cost for the extra bandwidth required. In other words, the incremental costs represent a drop in the ocean for a large mining pool. However, small mining pools or individual miners with low revenues may think twice about taking on these costs.

As a result, there exists a slight bias toward mining pools in merged-mining. The larger the pool, the greater the advantage. However, even for an individual miner, the one-time costs are manageable and worth expending resources for. The extra bandwidth required may present an issue depending on a miner’s location, as bandwidth can be quite expensive in particular geographic regions. Fortunately, it appears as though this issue will diminish over time as high bandwidth services become cheaper and more readily accessible. If it is an issue, individual miners can limit the bandwidth they provide for relaying blocks and transaction validation to a negligible amount. However, if too many miners implement this strategy, there will be delays when blocks are broadcasted. Thus, in order to keep the network reliable and steady, miners will provide the necessary bandwidth to support the network, as its block rewards depend on its stability.

Mining Pools

Mining pools pose the greatest threat to a decentralized PoW blockchain. Mining pools provide an opportunity for miners to pool their efforts in order to more effectively solve blocks. The majority of the Bitcoin hash rate comes from mining pools. Mining has become predominantly pooled because the cumulative hash power of Bitcoin miners has become so large that the difficulty has become prohibitively high. Gone are the days of mining Bitcoin on a personal computer. To even have a chance to solve a single block, individual miners must purchase powerful specialized mining machines that contain ASICs (Application-Specific Integrated Circuits). Again, mining Bitcoin is like continuously entering into a lottery, so rewards are not earned simply for providing hash power. The only way to earn Bitcoin is to actually solve a given block. To have any decent chance to win this lottery, enormous hash power is required.

Mining pools offer a solution to the problem created by steep hashing competition and infrequent, lottery-style income. Miners pool their hash power because it provides a better chance at finding blocks, and reduces variance in income. When a pool of miners finds a block, the pool members split the rewards according to the proportion of hash power provided. A mining pool with a significant proportion of the total hash power will find blocks relatively often. Thus, miners who join such a pool will receive a steady flow of income.

Due to their association with centralization, mining pools carry a negative connotation, though they are not necessarily bad for a blockchain ecosystem. In fact, they represent a natural progression of the PoW consensus algorithm. As more hash power accumulates in a PoW network, it becomes very difficult to successfully mine. Greater hash power is a sign of a robust blockchain, as the more cumulative hash power provides security and indicates increased adoption. Eventually, the difficulty of the network increases to such an extent that it becomes too expensive for the average individual to participate in the mining process. In this scenario, mining pools offer individuals meaningful opportunity to contribute to a pre-established ecosystem. Thus, as Elastos begins to scale and score higher levels of adoption, mining pools will inevitably form in response to the increased difficulty of its PoW.

Mining pools only become threatening if a single mining pool controls more than 50% of the cumulative hash rate. Mining pools generally have a coordinator that controls the hash power of the individual miners. If a single pool obtains 51% of the hash rate, the coordinator becomes able to attempt network attacks, such as initiating double-spends or censoring transactions. While this sort of attack is technically possible, the unique incentive structures built into the PoW consensus algorithm make it highly unlikely.

For one, a Bitcoin pool coordinator’s entire business revolves around Bitcoin. If it were to gain 51% hash rate and attack the network, it would inadvertently cannibalize its entire business. Secondly, mining pools are made up of individual miners. Because blockchains are entirely transparent, identifying a massive mining pool that is attacking the network is relatively easy. In order to protect the network, and thus their revenue streams,  the miners participating in a malicious pool would immediately switch off their mining machines or divert their hash power to another pool with an honest coordinator. The pool initiating the attack would be ostracized, and would never be trusted again. Mining pools put a lot of time and effort into gaining the trust of miners, so the rewards of malicious behavior are far outweighed by the risks.

Historical Accounts and Previous Attempts At Merged-Mining (and Why They Failed)

Elastos has not invented merged-mining. In fact, Satoshi Nakamoto first brought the concept to surface in the BitcoinTalk forum in discussions concerning a project called BitDNS.[5] Additionally, merged-mining has been used by several other projects in the past to varying degrees of success.

Namecoin was the first project to implement merged-mining in April of 2011. The premise behind its use was to mitigate the fragmentation of mining power among competing cryptocurrencies. [6] Before merged-mining was implemented, a Bitcoin miner would need to switch networks completely in order to mine another PoW cryptocurrency. In other words, a miner could only mine on one blockchain at a time. This resulted in inefficiencies, as both Bitcoin’s blockchain and those of other PoW cryptocurrencies experienced lower hash rates, and thus weakened network security. Merged-mining offered a means by which to prevent these inefficiencies by allowing Bitcoin miners to mine both Bitcoin and Namecoin simultaneously. Furthermore, merged-mining would serve to bootstrap the far smaller Namecoin network.

Merged-mining has since been used by various other projects – most notably by Dogecoin, which is merged-mined with Litecoin. Dogecoin actually began as a meme-coin but has since gained traction as a more serious project. A project called Namecoin, on the other hand, was the first to implement merged-mining, began as a serious project, but has been largely considered a failed operation. The trials and tribulations that eventually brought about Namecoin’s demise were expressed rather poignantly by a Namecoin engineer who posted the following about one year prior to this writing:

“Historically, due to usability issues, Namecoin had minimal usage for its intended purpose as a naming system and was instead primarily used as a speculative investment. This resulted in decreased demand for transactions, which caused transaction fees to be extremely low compared to Bitcoin. In addition, for several years Namecoin’s reference implementation was based on the Bitcoin 0.3.x branch, which had significant performance problems that made it difficult to use in production. As a result of the low mining reward and the high required effort to mine Namecoin, many mining pools chose not to mine Namecoin.” [7]

These words were produced in response to a paper titled “Merged Mining: Curse or Cure?” written by SBA Research. SBA concluded that “based on empirical data,” merged-mining leads to centralization issues.[4] Essentially, the paper found that, of the few coins (Huntercoin, Myriadcoin, and Namecoin) that have attempted merged-mining, most of the hash power arose from a single mining pool. These empirical observations may have been driven by a number of factors, but the factor outlined by the Namecoin engineer is the most important:

Namecoin had minimal usage for its intended purpose as a naming system, and was instead primarily used as a speculative investment.”

WIthout a meaningful use-case pushing forward a project and its blockchain, its consensus mechanism quickly becomes obsolete in protecting it from malicious behavior, centralization, and eventual community abandonment.

How Elastos Tackles The Challenges: Bitmain, DPOS and Merged-Mining With Side-Chains

So, without a doubt, the most pressing challenge that confronts any merged-mining operation concerns pool centralization. It is very likely that pools will acquire the majority of the Elastos hash rate, but that will pose no threat to the network.  Rather, it is the event in which a singular pool or entity gains 51% of the total Elastos hash rate that raises concern. To begin merged-mining with Elastos, a Bitcoin mining pool only needs to download software – the Elastos client. If the joining pool is of significant size, it could bring about a rapid increase in the Elastos hash rate. And, if the Elastos blockchain is in its early stages and has not already amassed a sufficient hash rate of its own, Elastos could very easily find itself at the mercy of the joining pool’s operator. With proper foresight and prudent consideration, Elastos has developed two critical strategies to prevent network centralization. They are as follows:

  • A Partnership with Bitmain. Bitmain is the largest pool operator in the world. Bitmain owns two large pools: BTC.com and Antpool. Bitmain has agreed to use a significant portion of its pools’ hash rates to merge-mine with Elastos. Currently, a decent portion of the BTC.com hash rate is merged-mining with Elastos. BTC.com accounts for 25% of the total Bitcoin hash rate, so it makes up a significant chunk of the network’s hash rate. While Elastos is in its early developmental stages, Bitmain will likely control a large portion of the hash rate. Because Bitmain and Elastos share a common vision and are deeply invested in one another, the two parties have ensured the cooperation of one another going forward. With Bitmain’s immense hash power, it will be nearly impossible for outside parties to initiate a 51% attack on the Elastos blockchain. As Elastos gains traction and develops its platform, miners and mining pools alike will be drawn to merged-mine with Elastos, which will reduce Bitmain’s stake, and continue to create a further decentralized blockchain.
  • Utilizing a Delegated Proof of State (DPoS) consensus mechanism alongside AuxPoW. DPoS serves as another layer of security that keeps out those with malicious intent. DPoS nodes “sign” blocks when they are added to the Elastos blockchain, providing what is called  “finality.” Finality states that there is no ambiguity if two valid blocks are broadcasted at the same time. Essentially, it eliminates competing network forks. Without network forks, even if an entity does reach 51% of the hash rate, they cannot do much of anything without colluding with a majority of the DPoS nodes. This means that even if Bitmain or some other large pool were to amass 51% of the network hash rate, it would be powerless to manipulate the blockchain, thanks to the DPoS nodes providing finality.

What Role Does DPoS Play?

Comprehensive information detailing the implementation of DPoS is yet to be released so a full description of Elastos DPoS will be tabled for a later date.

DPoS is an important part of the Elastos consensus mechanism. It is here that Elastos diverges from previous, failed attempts at merged-mining. Elastos is the first project to implement both AuxPow and DPoS, the conjunction of which its team has referred to affectionately as “Elephant Consensus,” as inspired by Elastos’ 1-year Thailand Anniversary. Elastos leverages Elephant Consensus to allow its own side-chains to share the hash power of the Bitcoin blockchain, should they so choose.

In traditional DPoS systems, the nodes are often called Block Producers (BP), because DPoS nodes create blocks, add them to the chain, and provide finality. Consensus can only be achieved by the BPs, of which there are generally 21. Essentially, the 21 BPs have near-full control of the Blockchain once they are elected. In order to prevent centralization BPs are required to reach consensus, so a single BP cannot attack the system directly. Additionally, DPoS nodes usually have to offer up a large stake of tokens as collateral. If a BP misbehaves, it can have its position or stake removed by token holders in the blockchain ecosystem. The constant threat of impeachment checks the power of BPs and serves to keep them in line. However, with only 21 BPs in place, collusion is a real possibility if ecosystem participants are not vigilant. For this reason, DPoS has received a large amount of criticism from various communities and technologists alike. Elastos has been fortunate to observe DPoS systems such as EOS and Lisk encounter problems, which have provided it with the opportunity to reimagine and reiterate the implementation of DPoS.

Elastos does not use DPoS in traditional fashion. In Elephant Consensus (AuxPow+DPoS), DPoS nodes are not Block Producers. Instead, they are Block Signers. Further, Elastos makes room 108 DPoS nodes in total, with 36 active and 72 on standby. Elastos DPoS nodes are also provisioned far less power than a convention DPoS blockchain, as blocks are mined and broadcasted to the network by Bitcoin miners using PoW. The only role DPoS nodes maintain in the Elastos main chain is “signing” valid blocks as they are broadcasted, which creates finality. Recall that in traditional PoW, users may wait up to 6 confirmations before considering a transaction permanent. A requisite waiting period is a direct result of the manner in which resolutions are made when two valid blocks are broadcasted at the same time. Because a fork is created where both chains are valid for the time being, more blocks must be solved and added, until the ‘longest’ chain wins. On the Elastos blockchain, the DPoS nodes will handle these resolutions far faster, and dramatically reduce latency for users.

Elastos DPoS nodes function effectively in acting as an additional layer of protection against malicious forks and 51% attacks. Most network attacks work through the “longest chain wins” rule. Since this is not quite the case for the Elastos blockchain, 51% attacks are far harder to carry out. In order for a 51% attack to be effectively executed, the attacker must collude with a majority of the DPoS nodes. While this is not impossible, it is extremely difficult. Elastos DPoS nodes have the final say as to whether a block is added to the chain, but they do not create blocks. Essentially, DPoS nodes vote together to reach consensus as to whether give each new block a thumbs up or thumbs down. If the DPoS nodes collude between themselves, the most they can do is slow down block generation. Again, DPoS nodes do not make the blocks so they cannot attempt to double spend. Just as with other DPoS systems, nodes must offer a large stake as collateral, which encourages behavior that protects and strengthens the network. However, the token holders are ultimately responsible for keeping DPoS nodes in check. Therefore, it is very important to have a fair voting process and an active community that is accustomed to voting. If a DPoS node falters, it can be voted out promptly – every 72 minutes, to be exact – while also being stripped of its staked collateral. For this reason, the Cyber Republic is and will serve as a powerful and indispensable centerpiece in the Elastos ecosystem.

Elastos takes the best parts of AuxPoW and DPoS, and creates a synergistic collaboration, in which each covers the other’s potential exploits. The decentralization and early-stage security provided by AuxPoW pairs well with the added stability and protection of DPoS. Apart from main-chain consensus, Elastos makes use of DPoS for a few other purposes.

What Other Roles Does DPoS Play in the Elastos Ecosystem?

In addition to providing an added layer of consensus for the main-chain, DPoS aids in side-chain PoW merged-mining facilitates cross-chain transactions and provides DPoS as a service to side-chains. For the purposes of this article, we will focus on DPoS as it pertains to merged-mining on PoW side-chains.

Merged-Mining (AuxPow) for Side-Chains

Elastos operates a main-chain-side-chain architecture. Any project or DApp that builds upon the Elastos infrastructure can choose to create its own side-chain. These side-chains also have the option to merge-mine with the Elastos main-chain. In this way, new projects can leverage the hash power – and thus the security – of the Elastos main-chain, which itself leverages the hash power of the Bitcoin blockchain. In securing a significant portion of the Bitcoin hash rate, the Elastos main-chain offers a brand new project the precious opportunity to earn immediate security on its own personal chain. For one, such an offering bolsters the reputation of the Elastos platform and makes it a very attractive platform to budding DApps seeking a protocol layer upon which to deploy their programs. Because each side-chain processes transactions independently, Elastos also strives to be the first to solve the blockchain trilemma, which is to create the first blockchain ecosystem that simultaneously ensures security, decentralization, and scalability.

Merged-mining with side-chains is not a new concept. In fact, the Elastos blockchain can be considered a side-chain of the Bitcoin blockchain. Elastos simply reiterates the related side-chain architecture in order to create its own set of side-chains, each of which has the potential to merge-mine with the Elastos blockchain. These interconnected blockchains and their relationships are carefully secured by DPoS nodes, which play an integral role in Elastos’ consensus mechanism. At the moment, all of the details of DPoS have not yet been officially released so we will refrain from delving into the more granular details here. However, a great deal of information can be  surmised from Elastos’ side-chain whitepaper:

  1. The DPoS node “on-duty” (also called an “Arbitrator”) then generates a hash of the candidate side-chain block and provides it to the main-chain miners. Note that the Arbitrator on-duty rotates after each block.
  2. DPoS nodes are responsible for gathering transactions from the side-chain transaction pools and packaging them into blocks.
  3. The main-chain miners then insert the hash into the current candidate Elastos block, which is then hashed and inserted into the coinbase transaction of the candidate Bitcoin block that they are trying to solve.

At this point, a process similar to that described in the merged-mining section takes place. The merge-miners begin hashing the candidate Bitcoin block, which contains an indirect link to the candidate side-chain block through the candidate Elastos block. If a valid hash is found for the candidate Elastos block, it finds its way to the Arbitrator on-duty. The Arbitrator on-duty then inserts the Proof of Work into the candidate side-chain block and broadcasts the solution to all the side-chain full nodes. At this time, these nodes can validate the solution that proves the work of sufficient difficulty was done regarding the next side-chain block.

Screen Shot 2018-12-09 at 07.43.39.png

Electing to have the DPoS nodes package the blocks offers some major advantages. The most important being that Bitcoin miners who are merged-mining with Elastos do not need to download any additional software to merged-mine with an Elastos side-chain; they need only need to run the Elastos client. This breaks down major barriers to scaling, as one of the greatest challenges facing merged-mining lies in incentivizing main-chain miners to download and run an additional client. If for each added side-chain merged-miners have to download and run an additional client, most will run only a few at a time, because clients require additional processing power (CPU/RAM). It is always a challenge to lure miners to use additional resources to mine for a brand new project, whose reputation and scale pale in comparison to that of the main-chain.

What’s responsible for the efficient, streamlined mining process is the fact that a great deal of the work is being shouldered by DPoS nodes. For each added AuxPoW side-chain, merged-miners barely need to take action. In fact, some miners might not even realize that they are securing an additional blockchain with their hash power. Also, merged-miners will not require substantial additional bandwidth to merged-mine with each added AuxPoW side-chain, as the DPoS nodes aid in that department as well. Basically, merged-miners can go about their business, as usual, all while gaining the benefits of merged-mining with all the Elastos side-chains using AuxPow. Of course, as further details are yet to be released, so the actual implementation may vary slightly.

Side-Chains Amplify Interest in Merged-Mining

In addition to the aforementioned numerous benefits of side-chains, they can actually help to solve one of the main concerns of merged-mining. SBA Research, the group that researched the plight of Namecoin and several other attempted AuxPoW projects of past, concluded that merged-mined coins often end up with a small number of mining pools involved in the merged-mining process. In several cases, SBA found that a single pool controlled the majority of the hash rate. As alluded to earlier, such observations have less to do with infrastructural flaws and more to do with the particular makeup of the individual projects that have attempted to implement merged-mining.

With all due respect to the teams and individuals involved, Namecoin, Huntercoin, Myriad Coin, and others failed to establish strong use-cases for their tokens. As a result, their respective platforms’ native tokens struggled to pick up value or score meaningful investment. In general, for PoW to work, either tokens must hold substantial value or the project team, vision, and ethos must supply a convincing reason to anticipate future appreciation because electricity costs are required in order to perform the work for mining. In the case of Bitcoin, many miners continue to mine for bitcoin even when it is below cost, as they expect losses to be converted into exponential gains when bitcoins appreciate dramatically in the future.

To avoid falling prey to the same pitfalls as did aforementioned coins, Elastos has birthed a native token – ELA – that commands meaningful value via its myriad use-cases. The ELA token can be used on the Elastos platform to register decentralized IDs, purchase scarce digital assets such as films and literature, register DApps, purchase domain name services and more. However, merged-mining on the Elastos blockchain has an additional aspect that makes it attractive to merged-mine. Each additional side-chain produces further revenue for merged-miners, with negligible incremental work requirements. For AuxPoW side-chains, a merged-miner will not need additional hash power, nor will it additional CPU/RAM resources to run the client. At most, a merged-miner will need a near-negligible amount of extra bandwidth. Once it downloads the Elastos client, a merged-miner is ready to receive ELA rewards as well as a portion of transaction fees – which split with the DPoS nodes – from all the Elastos side-chains presently using AuxPoW. In this way, Elastos’ side-chain structure has major potential to enhance the appeal of merged-mining on the Elastos blockchain.

Summary

The Elastos Blockchain is secured through a novel consensus mechanism that combines two existing mechanisms; Merged-mining, and DPoS. Merged-mining allows Elastos to use the existing hash power of Bitcoin miners to secure the Elastos main-chain, as well as side-chains that use AuxPoW as their consensus mechanism. Merged-mining is a ‘green’ solution, as Elastos miners use the same hash power that is already being used to secure the Bitcoin blockchain. Elastos chose PoW merged-mining because PoW is considered the most secure and tested consensus mechanism to date. Additionally, the Bitcoin blockchain is the most robust PoW blockchain with the most miners, and boasts an immense cumulative hash rate.

As merged-mining goes fully public, issues and challenges will inevitably arise. First and foremost, present Bitcoin miners and mining pools must be motivated to merged-mine for the Elastos blockchain. In order to merged-mine with Elastos, Bitcoin miners need to download and run the Elastos client. Additionally, merged-miners must incur additional costs in order to set up a mining operation with Elastos. While merged-mining does not require extra electricity costs, costs including storage, RAM, and bandwidth do apply. Since all merged-miners will incur the same costs, mining pools will experience a marginal benefit from merged-mining due to economies of scale.

Elastos already has strategies in mind to combat the challenges ahead. In order to address the possibility that there will not be sufficient Bitcoin miners providing hash power to the Elastos blockchain initially, Elastos has partnered with Bitmain. Bitmain controls two of the largest Bitcoin mining pools, which together amass a vast amount of hash power. Bitmain has agreed to use a significant portion of the hash power at their disposal to merged-mine with Elastos. Bitmain’s dedicated hash power will render 51% attacks targeting the Elastos blockchain futile, even during Elastos’ developmental stage.

Most previous attempts at merged-mining have ended with only a few mining pools participating. This is a security risk, as mining pools that control more than 51% of a blockchain’s hash rate can initiate attacks, such as a double-spend. In order to address the potential for mining pool centralization, Elastos employs DPoS alongside AuxPoW. The added component of DPoS creates additional challenges for large mining pools that control 51% of the network’s hash rate. Under DPoS, all blocks must be signed by DPoS nodes before they are added to the chain. The result: those wishing to initiate a 51% attack need to collude with a majority of the democratically elected DPoS nodes in order to succeed.

Lastly, miners will be driven to the Elastos blockchain because its native token – ELA – has powerful use cases, and commands meaningful value. Elastos AuxPoW side-chains will also serve to increase mining incentives by providing additional transaction fees – and thus increased profitability – for all merged-miners. While its valuable native token, elegant side-chain architecture, and multi-stakeholder incentive structures all play major roles in attracting miners and mining pools alike to sign up to secure the Smart-Web of the future, it is always the Elastos Community that is at the heart of its operations and vision. Get involved in Cyber Republic, and contribute your creative energies!

Feel free to check out more about the team that worked on this article and apply to join if you would like to get involved in the future: Join Elastos in a Nutshell team

References

[1]. BeckyMH. (2018, October 22). Merged mining specification. Retrieved from https://en.bitcoinwiki.org/wiki/Merged_mining_specification

[2]. Khatwani, S., Teddy, Appelberg, I., Palash, Juan, Lucas, . . . DJ AFINO. (2018, October 11). What is Double Spending & How Does Bitcoin Handle It? Retrieved from https://coinsutra.com/bitcoin-double-spending/

[3]. Running A Full Node. (n.d.). Retrieved from https://bitcoin.org/en/full-node

[4]. Judmayer, A., Zamyatin, A., Stifter, N., Voyiatzis, A. G., & Weippl, E. (2017). Merged Mining: Curse or Cure? Lecture Notes in Computer Science Data Privacy Management, Cryptocurrencies and Blockchain Technology, 316-333. doi:10.1007/978-3-319-67816-0_18

[5]. (n.d.). Retrieved from https://satoshi.nakamotoinstitute.org/posts/bitcointalk/532/

[6]. Namecoin. (2018, Nov. 22). Retrieved from https://en.wikipedia.org/wiki/Namecoin

[7]. R/Namecoin – Merged Mining: Curse or Cure? (Interesting paper from SBA Research). (n.d.) Retrieved from https://www.reddit.com/r/Namecoin/comments/6xbsb6/merged_mining_curse_or_cure_interesting_paper/

Authors

Charles Coombs-Esmail[u/C00mbsie on reddit]

Amos Thomas[aka Famous Amos on youtube]

Michael Ekpo[aka adeshino on discord]

3 thoughts on “Elastos In A Nutshell – A Layman’s Perspective: Merged Mining Part 2/2