Sidechain is a mechanism to make transactions on the blockchain work more efficiently. How does it work, and what are some examples of sidechains? See more in this article.
- 🔗 A sidechain is a separate blockchain that runs in parallel with the main blockchain but operates independently.
- 💡 Sidechain is one of the ways used by crypto assets to overcome scalability problems.
- 🏃♂️ One of the benefits of sidechains is that transactions can be processed faster and cheaper through many optimizations. For example, by moving a certain type of transaction to another chain whose protocol is made specifically for that type of transaction.
Sidechain is one of the ways used by crypto assets to overcome their scalability issues. Blockchain can be seen as a train departing at set intervals. The train has limited seats in each carriage, and to get a ticket, each passenger must bid on the price of their ticket as a guarantee of getting a place. And passengers who pay for the most expensive tickets will be prioritized to get a place. If everyone tried to get on the train at the same time, the ticket price would be high.
Likewise, if the blockchain network becomes clogged with pending transactions, this will cause users to pay higher fees if they want to enter transactions quickly.
One solution is to make the train carriages bigger. This means more seats, higher throughput and lower ticket prices. But there’s no guarantee that the seats won’t fill up quickly either.
This is known as the scalability trilemma. There are three aspects that ideally every blockchain should have, namely security, scalability and decentralization. However, not all blockchains have all three aspects together.
- If we want a secure and decentralized blockchain, it usually suffers from scalability difficulties
- If we want a highly scalable blockchain, it usually compensates for security and is also easier to do in a centralized blockchain.
So to overcome this, the concept of off-chain emerged. Off-chain is a way that allows transactions to be executed without burdening the blockchain, so they can be processed faster and at lower costs. The off-chain protocol connected to the blockchain allows users to send and receive funds, without transactions appearing on the main chain.
Then, what is Sidechain?
A sidechain is a separate blockchain or independent blockchain that can securely transfer a single coin internally and from/to the native blockchain network without having to use a different money token. This blockchain is pegged in some way to the main blockchain. The sidechain and main blockchain can flow freely from one to the other.
These two blockchains can exchange assets using a two-way-peg system, often called a bridge. Bridge is a kind of communication protocol between ledgers. There are many types of bridges including: Powpegs, SPV, hybrid-SPV, federated and collateralized.
There are two basic types of sidechains, one is a sidechain that has two independent blockchains, and one is dependent on the other. In the former case, both blockchains can be considered as sidechains of the other, which means they are the same, and sometimes both blockchains will have their own (separate) native tokens.
For sidechains that depend on other blockchains, one sidechain can be considered as the parent chain and the others as dependent or ‘child’ chains. Usually in a parent-child sidechain relationship, the child chain does not create its assets. Instead, it acquires any assets from transfers from the parent chain.
Sidechains can interact in various ways, but their main function is to exchange assets between chains. This is achieved through the use of 2-way pegs. The easiest 2-way peg to understand is a centralized exchange, which works like this: you have BTC, but you want ETH, so you trade BTC for ETH via a BTC-ETH pair.
Unfortunately, using exchange requires relying on a trusted central party, something that demands intermediary fees and carries third-party risk. There is a better way.
The decentralized two-way stake is essentially made up of a ‘lockbox’ in both blockchains. Let’s look at a simple example to illustrate how this lockbox is used to facilitate the transfer of assets from one chain to another.
Imagine you want to transfer 1 BTC from the Bitcoin network to the sidechain. First, you have to send a transaction for 1 BTC to the specified lockbox address on the Bitcoin network. Any Bitcoins in the lockbox are effectively removed from the total Bitcoin supply for now. In the transaction, you must include information about the sidechain address you want to send BTC to. Once the transaction is accepted by the Bitcoin network and added to the blockchain, the sidechain lockbox releases 1 BTC and sends it to the address indicated in the Bitcoin network transaction. To send back BTC, you simply reverse the steps above.
Benefits of sidechain
Sidechains bring three main benefits: scalability, experimentation/upgradeability, and diversification.
Scalability: sidechains can offer faster and cheaper transactions through many optimizations, for example, by moving certain types of transactions to other chains whose protocols are tailor-made for those types of transactions. This will reduce the first chain, making the first chain faster and cheaper too. Sidechains can also use faster and newer techniques that are more efficient.
Experimentation / upgrading: Upgrading the blockchain can be difficult at times. Sometimes reaching a consensus takes a very long time. Sidechains allow new ideas to be tested and propagated without broad consensus. This experimentation and expandability allows for a lot of efficiencies that contribute to scalability.
Diversification: Assets from other blockchains can be accessed by more people. Apps like DeFi Lending can be used inside the sidechain
Disadvantages of sidechain
Sidechains are responsible for their own security; sidechain security does not come from the blockchain it bridges.
On the one hand the security of one blockchain will not affect the security of the connected blockchains. On the downside, the sidechain can be vulnerable to attacks.
Sidechains also need their own miners. The large pool of diverse miners is an important way most blockchains secure their networks. Newer chains should do their best to grow their mining ecosystem, but this can be difficult because newer chains are often less profitable for miners. Sidechains can make things worse, because in a parent-child sidechain, the child chain usually doesn’t have its own original coin. This is not profitable for the miners as their main source of income is from the issuance of genuine coins.
Polygons are a mix of both types of sidechains. It uses an Ethereum framework called Plasma, which allows the creation of child chains that can process transactions before they are periodically completed on the Ethereum blockchain. Polygon is compatible with EVM (Ethereum Virtual Machine). The Ethereum Virtual Machine (EVM) is a virtual sandbox stack embedded within every Ethereum full node, which is responsible for executing contract bytecodes.
Also read: What is Polygon (MATIC)?
On the other hand, Polygon issues its own native token called MATIC, through a Proof-of-Stake validator. Polygon has two bidirectional stakes, one via Plasma and one via the Proof-of-Stake validator.
Polygon aims to provide connections between blockchains. Since Polygon is EVM compatible, it can link with other blockchains that are also EVM compatible.
The Liquid Network is a Layer 2 sidechain network built on the Elements platform to increase Bitcoin efficiency. Blocks in the Liquid Network sidechain are not mined with a proof-of-work algorithm. Instead, each block is signed by a special hardware unit (known as a “functionary”). Liquid Network owns the original synthetic asset, Liquid Bitcoin (L-BTC), which is used to represent the amount of BTC that is pegged and operates on a different security model to the BTC main chain.