top of page
Search
  • Writer's pictureAndrew Gazdecki

Sidechains: How To Scale And Improve Blockchains, Safely

Sidechains: How To Scale And Improve Blockchains, Safely - Andrew Gazdecki
Getty GETTY

What’s the biggest threat to blockchain adoption?


Scalability.


Without it, even the most sophisticated blockchains -- decentralized applications and decentralized exchanges -- will be too slow to use. As you can see below, Bitcoin and Ethereum lack the transactional capacity required for worldwide adoption:





Add the expected transaction load of blockchain’s most promising projects -- including our decentralized exchange -- and chances are the whole system could break.


Look at what happened with CryptoKitties in 2017. At the time, the game accounted for over 10% of Ethereum network traffic, multiplying pending transactions by a factor of six. If one popular dApp can significantly slow down the network, what would hundreds do?  



So What Exactly Is The Problem?


Scalability, decentralization and security. You can have two but not all three. It’s essentially a blockchain design flaw -- otherwise known as the scalability trilemma.


As the two most popular blockchains, Ethereum and Bitcoin are working hard to solve this problem with a range of proposals that extend their transactional capacity without sacrificing decentralization or security. But others -- like EOS -- are building completely new blockchains with scalability built in. 


Today, we’re going to look at sidechains. Not only do they help blockchains scale, but they shift development to a safe place, allowing for greater innovation without risking the integrity of the established blockchain.


What Are Sidechains And How Do They Work?

Sidechains are blockchains that run alongside a root or “parent” chain. The root chain is usually the established blockchain -- Bitcoin or Ethereum for example -- but could be another sidechain.


When you want to transfer funds, they’re locked on the root chain and then released on the sidechain. Those same funds can then move around the sidechain until they return to the root chain when the process reverses. A symmetrical two-way peg ensures a fixed exchange rate.


To avoid double spending and other fraud, a trusted body or federation might run nodes on both the root and sidechain. But to maintain decentralization, a better solution might be simplified verification proofs (SPVs).


An SPV proves a coin is reserved on the root chain for use on the sidechain. Rather than checking all previous transactions, which would be slow, an SPV proves your transaction is part of a valid block, that new blocks have since been created and that miners trust the validity of this block.


Both Bitcoin and Ethereum currently support SPVs in the form of Merkle proofs, but they’re not identical. Where Ethereum Merkle proofs can secure sidechains in a Plasma framework, Bitcoin would require a soft fork to support SPV-like sidechains.


Why Are Sidechains Important?

Sidechains help blockchains scale, develop and interact.


Both Ethereum and Bitcoin require every node to validate new transactions, whereas in a sidechain, the sidechain network validates transactions and only periodically updates the root chain. This exponentially increases transaction throughput, without sacrificing decentralization or security.


This massive boost to transactional capacity helps blockchains scale. Instead of the entire root chain (or 51% of it) validating transactions, sidechains take responsibility for validating their own.


A sidechain has its own miners, validation nodes and only periodically reports back to the parent chain to update its status. This removes bottlenecks on the root chain and increases the speed and scalability of the whole network.


Plasma: A Case Study

One of Ethereum’s scaling solutions is called Plasma. Like Bitcoin sidechains, Plasma can transfer validation responsibilities from the root chain to a sidechain. This means each sidechain can be customized by a dApp, exchange or smart contract, each with its own trusted validation nodes.


Let’s say you want to trade on our decentralized exchange, for example. If the Ethereum blockchain had to validate everything you do, it would be painfully slow and expensive. Plasma, on the other hand, processes your transactions off-chain, so they’re much faster and you don’t have to pay gas on every transaction.


Plasma also lets you trigger a mass-exit mechanism if you discover foul play. Supply a Merkle proof of your state within the sidechain -- your ETH balance, for example -- and Plasma will revert to the last legitimate state that corresponds to your proof. This discourages theft and other fraud.


Although Plasma is relatively new, there are several projects taking advantage of it. OmiseGO is developing Plasma as a framework for payments, and Loom Network is using Plasma to help developers create scalable dApps and games.


Challenges

Although a worthy contender in the fight for scalable, dynamic blockchains, sidechains do present a number of challenges.


First, opponents argue they’re not decentralized enough. Since they’re small, they’ll run fewer validation nodes, making it easier for a determined mining group to control the bulk of validation.


Finding miners might also be a challenge, given that there is less incentive to mine in a sidechain when there are fewer transactions and therefore fewer rewards. One potential answer to this is merge mining, where miners validate blocks from different blockchains at the same time.


The problem with merge mining is that, again, the largest mining pools will flourish and the smaller ones will flounder, risking a minority controlling most (or all) of the validation. Perhaps, then, sidechain projects could fund mining themselves or reward miners with transaction fees. Another possible answer might be using trusted federations, but again, this raises some uncomfortable questions about centralization.


Sidechains are a promising solution to the scalability trilemma, and with advances in SPV proofs, the mining issue might disappear altogether. For the time being, however, there’s still quite a lot of work to be done.




0 comments
bottom of page