WTF Is... A Sidechain

TLDR: A sidechain is a separate blockchain that runs in parallel to the main blockchain. A sidechain is connected to the main blockchain through a “two-way peg” also known as a “bridge” which allows for the transfer of digital assets, or tokens, between each. The benefits of sidechains include increased scalability and privacy.

How do Sidechains work?

Sidechains run in parallel to the main network of a blockchain, also known as a mainchain. Each sidechain is its own separate blockchain network that runs independent of the mainchain. Sidechains share assets with the mainchain through a “two-way peg,” which is sometimes also referred to as a “bridge.”

What is a two-way peg?

A two-way peg is used to transfer assets between the mainchain and a sidechain of a blockchain network.

Let’s use Ethereum as an example. Say we want to send 5 Ether from the mainnet to one of the sidechains, Sidechain A. The 5 Ether is not actually “transferred” from the mainchain to the sidechain. Instead, the 5 Ether is locked up in the mainchain, and 5 Ether is unlocked in the sidechain.

The lock and unlock mechanism only works once a transaction has been validated via a smart contract. When a transaction has occurred in one chain, an event is sent to an off-chain process, which is a process that runs outside of the mainchain and sidechain. The off-chain process then sends the transaction information to the smart contract of the other chain, which verifies the transaction. After the transaction has been verified, the funds are released.

It is only through this secure process that funds are “transferred” between a mainchain and a sidechain!

Why use sidechains?

Sidechains have completely separate consensus protocols and governance from the mainchain. A consensus protocol is the algorithm in which a blockchain network agrees on which block is added next to the blockchain and establishes it as the only version of truth. The ability for each sidechain to have its own consensus algorithm allows the blockchain network to have heightened security, and also minimizes the trust required to maintain the network. However, one thing to note is that sidechains do not benefit from the security of the mainchain.

Sidechains allow transactions to be processed more quickly, and also lower transaction fees for users who participate in the network. This greatly increases the scalability of the blockchain network, which is one of the biggest problems being tackled in blockchain research in the past several years!

Which blockchain networks use Sidechains?

Some of the more popular networks that use sidechains include Bitcoin and Ethereum. A sidechain project for Bitcoin is Rootstock, and sidechain projects for Ethereum include Polygon, Gnosis Chain, and Skale.

Want to learn more? Check out:

 WTF Is… A Smart Contract 
WTF Is… Tokenomics

Akhila Raju is a Product Manager at Dune based out of NYC. Previously, she was an engineer at Coinbase, ConsenSys, and Google, and graduated with a Computer Science degree from UC Berkeley.

This article and all the information in it does not constitute financial advice. If you don’t want to invest money or time in Web3, you don’t have to. As always: Do your own research.

More Articles

Shop NFTs

Browse the official collections on OpenSea:
BFF Friendship Bracelet
BFF Friendship Bracelets
The BFF 'You' Collection. Artwork by Jade Purple Brown.
You PFP Collection