Future growth and wider adoption of blockchain technology largely hinge on fast, secure, and low-cost transactions. More specifically, the success of web3 depends on these factors. While the development and implementation of sidechains are still relatively new, the technology offers promising results.
Sidechains can become effective ‘testing grounds’ for new applications, as it were. If a dApp or smart contract is found to cause damage for example, the harm is contained to the sidechain, as the main chain remains secure, preventing even greater damage.
But perhaps the biggest positive of sidechains is the sheer opportunity to diversify, create, and provide specific solutions to specific use cases. This alone incentivises the investment of time and resources into exploring this exciting possibility.
Zaisan can become your guide to explore sidechains and any other aspect of blockchain technology.
- Sidechains enable the movement of tokens or other digital assets between the main chain and the sidechain through 2-way peg mechanisms called bridges
- A sidechain can have its own consensus protocol, token, and security, independent of those same features on the main chain
- Sidechains can run dApps and take some of the computational workloads off the main (‘parent’) chain
- Sidechains offer the benefits of scalability, interoperability, and versatility
The evolution of blockchain protocols
Blockchain technology was little known outside academic circles before 2008. Scott Stornetta and Stuart Haber first proposed the theory behind what we know today as a decentralised ledger – a blockchain – in the early 1990s. They are credited with inventing a network to store timestamped, unalterable digital records.
Stornetta and Haber were aware that altering digital documents without anyone realising the changes was all too easy. This meant that the integrity and trustworthiness of the data were questionable. To address this problem, they came up with a hashing function used to register the documents, group them into blocks, and link them digitally using the hash values. For all intents and purposes, a blockchain.
But this was back in 1991, a full 17 years before the very word, blockchain, gained notoriety outside niche circles following the release of the Bitcoin whitepaper in 2008.
Blockchain technology has evolved at pace since. Several consensus protocols have emerged. The Bitcoin network used Proof of Work (PoW). Ethereum, Cardano, and others use the Proof-of-Stake model. Other chains use Delegated Proof of Stake. There are other, less-known protocols. Thus, the point is that blockchain, or decentralised ledger, has evolved and diversified ever since that seminal moment in 2008.
Decentralised ledgers, while versatile, do face some challenges, often referred to as the blockchain trilemma, a term coined by Ethereum’s creator Vitalik Buterin. The trilemma states that three pillars support a perfect blockchain: security, decentralisation, and scalability. Therefore, successful implementation is only possible for two out of these three elements. Adding a third would always be detrimental to the other two in one way or another.
Discussing the trilemma is beyond the scope of this piece, but awareness of it is important as background information, and to understand why sidechains are a key component in solving it.
Defining layer 1 and layer 2 blockchain
In the context of blockchain architecture, people often mention the terms ‘layer 1’ and ‘layer 2’. These essential concepts serve a dual purpose: they explain how a blockchain network is constructed and provide a simple representation of what a blockchain network entails. Let’s explore these concepts a bit deeper.
The best way to represent layer 1 is by imagining a multiple-tiered wedding cake, at the bottom of which is a stand. This stand is the layer that supports the rest of the cake. In other words, layer 1 acts as the stand for the cake, providing support for the infrastructure built on top of it.
But there is a problem. The stand is only of a certain size, and cannot be made any bigger. It can only hold a certain amount of cake slices. How to solve this problem?
How about adding a second layer (layer 2) on top of the base layer? With a second layer, we have more cake, without having to make the base (layer 1) any bigger. We have scaled the cake, haven’t we? And that second layer is completely independent of the base. It can have a different frosting, different flavour, different decoration, etc.
If we extend this analogy, we can draw a comparison to how a blockchain is organised. The underlying blockchain (the main chain) is layer 1, and the sidechain is layer 2, built on top of the first layer. And this second layer can have its own protocol, consensus mechanism, token, etc., just like the second layer of the cake can be decorated in a completely different fashion from the base.
Sidechains: a solution to the scalability trilemma
Remember the trilemma we mentioned earlier, and how blockchain scalability is one of its vertices? Sidechains are layer 2 solutions (ie, solutions built on top of layer 1) that address this challenge by enabling the main chain to offload some of its computational capacity. By doing this, the main chain achieves higher throughput.
Sidechains are designed for the specific purpose of scaling the layer 1 chain without compromising its security or stability. By connecting to the main chain through two-way pegs, also known as bridges, assets can be securely transferred back and forth.
Asset transfer mechanism
While the two-way pegs (think of these as traffic tunnels with one lane going each way) enable the transfer of assets between the main chain and the sidechain, the assets aren’t actually transferred. Instead, the requested assets become ‘locked’ on the sender chain, and a smart contract executes to realise the transaction, assuming that all conditions are met. When the transaction is validated, the assets are unlocked and released on the other end and the smart contract informs the main chain about this event. Bridges, depending on their design and functionality, might also enable swapping one token type for another. For example, it may enable swapping one token type for another.
Benefits of a sidechain
The use of sidechains in a blockchain system confers three key advantages: scalability, interoperability, and versatility.
The addition of sidechains enables faster and cheaper transactions on the main chain.
Sidechains allow different blockchains to communicate, interact, and exchange data with each other via smart contracts. Besides, developers can use sidechains to quickly deploy dApps on different blockchains, to test out which one works best. This is usually referred to as cross-chain interoperability.
Sidechains greatly diversify and augment the main chain’s use cases. Furthermore, developers can implement sidechains to meet the specific needs of industries, purposes, or projects, for example.