sidechain is a scaling solution that helps the leading blockchains (mainchain) work more smoothly. Blockchains will have fewer network congestion problems and slow transaction processing when integrating Sidechain. To learn more about sidechains, read this article with SmartOSC!

What is Sidechain?

Sidechain is one of the layer-2 solutions used to support more functions, increase transaction efficiency and reduce the overload for the main chain. The sidechain will be attached to and running simultaneously with the main chain.

Thanks to the mainchain and sidechain connection, users can use and transfer their data and assets freely between the two blockchains. They were helping projects with a large number of users to expand the ecosystem in a decentralized way.

In essence, sidechains are still independent blockchains, so these blockchains all have their validators/miners and consensus algorithms. As a result, the sidechain, although running in parallel, is still separate to ensure the security of the main blockchain.

Even though the sidechain is a standalone blockchain, it wouldn’t work without the main chain. In contrast, the mainchain can operate without a sidechain.

How Sidechain Works

The main task of sidechains is to process, validate data, or run apps to offload mainchain operations. To do this well, the sidechain needs to interact with the mainchain using a two-way peg, which works like this:

Two-way latch (Two-way peg)

A two-way peg is a bridge between the sidechain and mainchain, allowing users to transfer assets back and forth between these two blockchains.

But the truth is that the “transfer” did not happen. Assets will be locked on the mainchain, and the corresponding amount will be unlocked on the sidechain.

Peg-in from Bitcoin to Liquid

Peg-in is the pin for transferring assets from Bitcoin to Liquid. The way it works is as follows:

The user sends BTC to a smart contract on the Bitcoin Network and creates a peg-in transaction to request an equivalent amount of L-BTC from the Liquid Network.

The system will verify by mechanism 102 to ensure the user’s assets are locked on Bitcoin Network.

After verification is complete, the system will send a notification to Liquid Network via smart contract. At this time, users will receive L-BTC from Liquid Network.

The liquidator on Liquid Network encrypts the two-way conversion between BTC and L-BTC.

Peg-out from Liquid to Bitcoin

The process of moving back from Liquid to Bitcoin is called a peg-out. The peg-out process will not use the 102 mechanisms like peg-in but the 2 Liquid mechanism for verification.

Sidechain and blockchain scaling solution

The three most essential properties of blockchain: Decentralization, security, and scalability. Can blockchain ideally own all 3? No.

We can have two, but three is a luxury. This is the most fundamental design flaw of blockchain.

Besides, several other teams are building new blockchains with built-in scalability – sidechains. Sidechains not only scale but also create diversity with many new areas but do not affect the existing settings on that blockchain.

Side chain Pros & Cons

Advantages of Sidechain

High scalability: Executing transactions on the sidechain reduces the computational burden and congestion of the mainchain, allowing participants to execute trades faster and more efficiently while maintaining the integrity of the main chain.

Lots of testing/upgrade opportunities: With large blockchains, owning many nodes, and a cumbersome structure, it will be difficult to test/upgrade. So sidechains will be an excellent solution to implement novel ideas. If it fails, it will not affect the main chain.

Diversification: By transferring assets between the sidechain and the mainchain. 

Disadvantages of Sidechain

Poor security: For small sidechains, a 51% attack is entirely possible by buying enough equipment (with PoW mechanism) or enough assets (coin/token) to claim a large stake (with PoS mechanism). ).

Of course, sidechains can refuse to accept any untrusted nodes, but this is against the very nature of blockchain being open source.

Difficulty in trading: Besides the great benefits that sidechains bring, there are also cases where the fees on the sidechain are pretty high, making users uncomfortable when transacting.

Want to know more about sidechains – contact SmartOSC here

Contact us if you have any queries about Blockchain development services, dApps development, NFT marketplace development, Crypto wallet development, Smart contracts development.