What are sidechains

Public blockchains are open source and available for anyone to participate. That means, you can download an existing open source blockchain, study it, and start contributing by modifying the project source code and other components. The process of downloading and creating an entirely new software from an open source software is called forking. Forking is one of the major strengths of open source software (OSS) that allows developers to copy an existing project and create a separate path to improve or change software based on their vision.
 
A sidechain is a blockchain that forked from a primary blockchain also known as the main chain and runs parallel to the primary blockchain. Sidechains allows digital assets to be transferred from one blockchain to other without any approval of third party and vice versa. Sidechains can also be used to enhance capabilities of existing blockchains.
 
There are two types of sidechains, one-way peg, and two-way peg.
 
In one-way peg, assets are usually transferred from primary chain to sidechain and no way to transfer it back. In two-way peg, assets can be transferred from a primary blockchain to a sidechain and sidechain can transfer assets back to primary blockchain.
 
How do sidechains work?
 
A blockchain creator provisions sidechains. Once a project allows sidechains, developers can start using it. The main chain creators assigns a group of validators that manage the process of asset transfer between the two chains.
 
When a blockchain moves digital asset from one chain to another, the assets are locked and managed by validators at a given address and an equivalent assets are assigned on the sidechain and available to use. Once locks assets are exchanged or used, the corresponding assets are locked on the sidechain and transferred to the main chain and the process continues.
 
Even though, sidechains are forked from a main chain, they run independent of the main chain. If a sidechain is compromised, it doesn’t affect the main chain and vice versa.
 
Why do you need sidechains?
 
Today, there are thousands of coins/token available in market. One of the major challenge for token owners is, a blockchain can only use a certain token. For example, the Bitcoin blockchain allows Bitcoin currency only. What if you want to use another currency on a Bitcoin network?
 
A sidechain is a technology that allows tokens to move from one blockchain to another. Sidechains create a bridge between multiple chains and allows tokens to be used from one blockchain to another and transfer back to the original blockchain.
 
References
 
https://hackernoon.com/what-are-sidechains-1c45ea2daf3
https://bitcoinmagazine.com/articles/sidechains-why-these-researchers-think-they-solved-key-piece-puzzle/