What is a sidechain?

Sidechain

A sidechain is an independent chain that is connected to another blockchain, known as a mainnet, by using a two-way peg. The primary objective of sidechains is to address the scalability trilemma, which is currently hindering the adoption of blockchain as a predominant technology.

The original blockchain is the mainchain, and all the secondary chains are the sidechains.

A sidechain and its parent blockchain
A sidechain and its parent blockchain

Sidechains aim at increasing the efficiency and speed of transactions, while also strengthening the security of the mainchain. They are often grouped together with other Layer-2 solutions, but sidechains are significantly different. They are based on independent security and consensus protocols, and thus offer more functionality.

Procedure

Think of mainchain as a highway, and sidechains as fast lane roads present beside the highway. Cars on the fast lane can reach their destination speedily, and communicate with the highway whenever necessary. Keeping this analogy in view, sidechains allow transactions to be moved from the mainchain to a separate chain, where they can be processed faster and more transactions can be catered without causing the network to be overcrowded.

The key components that have a major role in communication between the mainchains and sidechains are:

  • Two-way pegs

  • Federations

Two-way pegs

The two-way peg acts like a two-way car tunnel, in which cars are able to move in both directions. They are responsible for the back and forth transfer of assets and tokens between blockchains, without the risk of any counter party interfering in the transfer. A locking mechanism is used in the transfer of assets, meaning that the asset cannot be spent before it is finalized. Similarly after verification of assets on sidechain, they can be spent by using a releasing mechanism.

Two-way peg between parent blockchain and sidechain
Two-way peg between parent blockchain and sidechain

Note: The digital assets are never transferred. Instead the assets are locked in the mainchain and equivalent assets are unlocked in the sidechain.

Federations

A middle party, which is responsible for ensuring the data integrity between transactions, is known as a federation. It can be both code based or a group of individuals. The basic duty of a federation is to make sure that a transaction is valid, by using the locking and releasing mechanisms mentioned above.

Advantages of sidechains

There are several advantages of sidechains. A few are listed below:

Scalability

One of the biggest advantages of sidechains is that they addresses the scalability problem of blockchain. Sidechains improve the transaction capacity and thus the processing speed, consequently reducing the chances of system failure due to congestion.

Security

As they offer their own security methods, sidechains don't have to rely on the mainchain for this and thus provides them with more sovereignty. Most importantly, this sovereignty means that if security is breached at sidechains, it will still keep the security of the mainchain intact.

Flexibility

Another benefit that sidechains have to offer is the interlinkage between different cryptocurrencies in the system. This can be achieved by creating separate sidechains for different cryptocurrencies, and linking them to the mainchain, allowing exchanges.

Sidechains are, no doubt, one of the best solutions for the blockchain scalability problem, and have the potential to improve the present abilities of blockchain to make it a mainstream technology throughout the globe.

Free Resources