Blockchain Side-chains: Solving the scalability problem!

15/10/2018
Written by Vishal Soomaney Vijaykumar, President of the York Blockchain Society. Co-authored by Peter Jupp, Vice President.

A major issue for most cryptocurrencies and blockchains in general is scalability. As they become more widely adopted and more transactions occur on them, we get closer to the block size limit causing transactions to take longer to complete. This can often make transactions more expensive as well so as to make it worthwhile for a miner to add the transaction to the next block. A soft-fork for Bitcoin in specific that partially helped deal with the scalability problem was the implementation of SegWit [1].

However, a more general solution is required that can be used by all cryptocurrencies or blockchains. There are multiple interesting methods being researched that attempt to address this problem. One is sharding [2]. Another is side-chains, we will be discussing side-chains in this article. The general implementation of this technique consists of a main blockchain with several  branches. These branches are known as side-chains whereby the main blockchain in this structure is the master branch. The same token is valid on all of these chains hence you can transfer tokens from one chain to another. Side-chains themselves are fully functioning blockchains upon which you can perform transactions, these also require their own miners to verify transactions.

Side-chains provide many fascinating possibilities, for one, testing new features and protocol changes. Vast amounts have been in invested in most major cryptocurrencies or blockchain based platforms, it is simply too risky to attempt significant updates on these in case any bugs or security risks are accidentally introduced. However updates may need to be introduced in order to  alter, change or fix consensus protocols or to add further layers of complexity to the Blockchain. If you possess the ability to create a side-chain that does not affect the main blockchain whilst working in the exact same way, with the main difference being that fewer transactions occur on it, you can attempt to test newer features. An instance of this could be attempting to add Smart Contract features to Bitcoin which is already being done in a project called “Rootstock” or RSK [3].

The usage of side-chains goes much further than simply testing new features however. Side-chains can be developed that are specialised for a specific task hence multiple different, specialised services can be developed using the same blockchain platform whilst not placing as much of a burden on the main blockchain. An example of how this would have helped earlier this year would be with the “CryptoKitties” game developed using Ethereum smart contracts earlier this year [4]. This was a single game on the Ethereum network however there were so many cryptokitties being traded on the Ethereum network that at one point 25% of Ethereum traffic was composed of cryptokitty related transactions. This of course caused considerable congestion and led to an increase in transaction fees as both normal ETH transactions and cryptokitty related transactions were competing for miner preference. The congestion also caused multiple ICOs and token sales to be delayed leading people to rightfully question how major services and applications utilising Ethereum smart contracts could be built if a single game on the network caused such major problems. The main cause of the congestion was that Ethereum can only handle approximately 20 transactions per second meanwhilst Paypal can average 115 and VISA averages 2000 whilst peaking at about 20,000[5]. Much of the cryptokitty related congestion could have been avoided if cryptokitty transactions had all taken place on a separate Ethereum side-chain designed specifically for this or if Ethereum transactions could atleast have been spread out between multiple side-chains. There already exist multiple projects attempting to use side-chains to raise the number of transactions, one of the most notable is “Plasma”[6,7]. The thought process here is that if with one blockchain Ethereum can handle 20 transactions per second then with 100 blockchains it should be able to handle 2,000.

img1

Credit: ethlend.io

There exist other projects utilising side-chains in really interesting ways as well, one I would like to highlight is Lisk. This cryptocurrency has a Javascript SDK that can be utilised to easily deploy a completely new sidechain to the Lisk platform. Quoting Lisk: “This sidechain is a fully customisable blockchain, free of pollution or spam on the mainchain or other sidechains. All specifications, parameters, and transaction types can be changed to fit perfectly to your blockchain application.” [8]

img2

Of course all of this  doesn’t come without its own challenges and security risks. There are many proposed implementations of side-chains but the most popular ones have a few things in common. When transferring tokens from one chain to another, you actually transfer tokens to a specific address or entity which will store your tokens, an equal number of tokens will then be released to your account on the other chain. In the case of Lisk for example, the tokens would be stored in the account of the owner of the chain whilst an equivalent number would be released to your account on another chain. With this system, we rely on a secure implementation to ensure that no-one loses their tokens due to a bug and tokens are only released on one chain once we can confirm they’ve been locked on another one. If this isn’t done properly, a “double-spend” may become possible as a user may be able to duplicate their tokens on multiple chains and spend the same tokens multiple times. All of this reduces the inherent layer of trustlessness that cryptocurrencies and blockchain based platforms provide as you must trust this address that locks your tokens.

img3

Another problem is that a major security feature for most cryptocurrencies such as Bitcoin utilising the “Proof of Work” consensus algorithm is having a large number of users and miners on a single blockchain. This way it is nigh impossible to engage in a 51% attack whereby a single user or organisation controls over half of the mining power for the network and thus can forge transactions. However if users and miners are split between multiple side-chains, there exist fewer per chain. Of course, this is one of the main reasons side-chains provide greater scalability however it also means that it would be easier to take over the majority of the mining power for a single side-chain and forge transactions. There has already been plenty of research regarding ways to counter this, Ethereum for instance intends on migrating from the Proof of Work consensus algorithm to the Proof of Stake algorithm[10] which should mitigate this issue. I intend on discussing the consensus algorithm migration as well as the benefits it is expected to bring in a future article. Another aspect that should bring us relief in regards to security is that a side-chain is independent of the main chain and thus if a bug or security risk is identified on any single chain, token transfer between that chain and all other chains can be quickly shut down. The way this would occur and how much time this would take would of course depend on the implementation.

Overall side-chains  are a very promising area that if further developed and implemented could provide massive scalability improvements.  I look forward to seeing more innovative implementations and solutions to many of the potential security risks.

 

You can learn more about the York Blockchain Development and Research Society at: http://www.yorkblockchain.co.uk
You can learn more about the author of this blog post at: https://www.linkedin.com/in/vishal-soomaney-vijaykumar-03638710a/

 

Further recommended reading:

https://hackernoon.com/13-sidechain-projects-every-blockchain-developer-should-know-about-804b65364107

https://www.cryptocompare.com/mining/guides/what-is-merged-mining-bitcoin-namecoin-litecoin-dogecoin/

https://medium.com/loom-network/million-user-dapps-on-ethereum-an-introduction-to-application-specific-sidechains-c0fdc288c5e5

https://www.thestarbit.com/what-are-sidechains-and-childchains-hacker-noon/

https://blog.ark.io/what-is-the-ark-smartbridge-and-how-does-it-work-1dd7fb1e17a0

[1] Noelle Acheson (22, February 2018) “What is SegWit?”, CoinDesk [Article] https://www.coindesk.com/information/what-is-segwit/

[2] ediChain, (5, May 2018) “Blockchain FAQ #3: What is Sharding in the Blockchain?”, Medium [Article]

https://medium.com/edchain/what-is-sharding-in-blockchain-8afd9ed4cff0

[3] NovaMining (14, December 2017) “Rootstock (RSK): Smart Contracts on Bitcoin”, Medium [Article] https://medium.com/novamining/rootstock-rsk-smart-contracts-on-bitcoin-9ef28e135193

[4]  Joon Ian Wong (4, December 2017) “The ethereum network is getting jammed up because people are rushing to buy cartoon cats on its blockchain”, Quartz [Article] https://qz.com/1145833/cryptokitties-is-causing-ethereum-network-congestion/

[5] DragonChain (30, March 2018) “The Case of the Crippling CryptoKitties: Why Scalability is the Most Important Cattribute”, Medium [Article] https://medium.com/@dragonchain/the-case-of-the-crippling-cryptokitties-why-scalability-is-the-most-important-cattribute-158e4f534330

[6] Joseph Poon, Vitalik Buterin (11, August 2017) “Plasma: Scalable Autonomous Smart Contracts”

https://plasma.io/plasma.pdf

[7] Ernesto Boado (21, July 2018) “Journey to Scale on Ethereum — State Channels, Plasma and Plasma Cash”, Ethlend [Article] https://blog.ethlend.io/journey-to-scale-on-ethereum-state-channels-plasma-and-plasma-cash-4fe7914e06a

[8] Lisk (26 ,July 2016) “What Is Lisk? And What It Isn’t.”, Lisk [Article] https://blog.lisk.io/what-is-lisk-and-what-it-isnt-e7b6b6188211

[9] Anthony Akentiev (10, August 2017) “Plasma in 10 minutes”, Medium [Article] https://medium.com/chain-cloud-company-blog/plasma-in-10-minutes-c856da94e339

[10] “Proof of Work vs Proof of Stake: Basic Mining Guide”, BlockGeeks [Guide] https://blockgeeks.com/guides/proof-of-work-vs-proof-of-stake/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s