A sidechain is a separate blockchain, tied to its parent blockchain via a two-way peg.
Sidechains were created to solve the critical issue of speed faced by the crypto world. Instead of having all processes on the main blockchain, a sidechain is used to simplify calculations while offering the same security as the main blockchain.
Sidechains can interact in different ways. However, at the core is the ability to exchange assets between chains with the help of a two-way peg. This peg comprises lockboxes on both chains. To understand how a lockbox works, imagine you are moving 1 BTC from the main network to a sidechain. First, you send the BTC to a lockbox address. Any BTC sent here is taken out of the total supply temporarily. Information regarding the sidechain address where you will send the BTC is included during the transaction. Once the transaction is complete, the sidechain lockbox will release 1 BTC and send it to an address on the main network.
The main chain user first needs to send coins or other digital assets to an output address where they are locked and unspendable anywhere else. After the transaction is complete, a confirmation is relayed across the chains. This is followed by a waiting period for added security. Afterward, the coins or assets will be fully transferred on the sidechain, enabling users to move them around freely on the new network.
Sidechains come in many variations depending on the functions they are built for. While both Liquid and Rootstock are Bitcoin sidechains, they function very differently since the latter is specifically created for the purpose of running smart contracts more efficiently.
Join the thousands already learning crypto!