The concept of sidechains was first introduced by Dr. Adam Back, the founder of HashCash and CEO of Blockstream, in his paper titled ‘Enabling Blockchain Innovations with Pegged Sidechains’, which was published on October 22, 2014. Several Bitcoin engineers, including Matt Corallo, Luke Dashjr, Mark Friedenbach, and others, were also involved in its development. A sidechain, as a distinct blockchain connected to the main blockchain (often referred to as the 'mainchain') through a two-way bridge, facilitates the transfer of tokens or digital assets between the mainchain and the sidechain. Adam and his team proposed:
We propose a new technology, pegged sidechains, which enables Bitcoins and other ledger assets to be transferred between multiple blockchains. This gives users access to new and innovative cryptocurrency systems using the assets they already own.
The sidechain allows the execution of specific functions or applications while still leveraging the security and consensus mechanisms of the main chain. Additionally, depending on the blockchain's design, multiple sidechains can be connected to the main chain. Communication between sidechains is also feasible, using the mainnet as a relay network.
Sidechains can host decentralized apps (dapps) and help alleviate some of the computational burdens on the mainchain, acting as a scaling solution. By transferring certain types of transactions or processes to a dedicated sidechain, congestion on the main chain can be reduced, leading to enhanced overall performance.
Types and Examples of Sidechains
There are two basic types of sidechains:
- With two independent blockchains
- One blockchain is dependent on the other
In the case of the former, both blockchains can be thought of as the sidechain of the other, to say, they are equal, and sometimes both blockchains will have their own native token.
In the case of the latter, one sidechain can be thought of as the parent chain and the other as the dependent or ‘child’ chain. Typically in a parent-child sidechain relationship the child chain does not create its own assets. Instead, it derives any assets from transfers from the parent chain.
SmartBCH is an example of the first type of sidechain - two independent blockchains. SmartBCH is an Ethereum Virtual Machine (EVM) and web3-compatible sidechain for Bitcoin Cash, but does not have its own native token. SmartBCH uses a bridge called 'SHA-Gate'. Transferring from BCH to SmartBCH is handled by BCH full-node clients.
Drivechain is an example of the second type of sidechain - parent-child. Bitcoin is the parent and Drivechain is the child, thus Drivechain does not issue a native token. Instead, it relies solely on BTC transferred from the Bitcoin network. Drivechain uses SPV to implement its 2-way peg, which relies on miners to validate transfers. 51% attacks by a coalition of miners are possible. Drivechain creates Blind Merged Mining (BMM), which addresses the drawback of sidechains requiring their own miners. BMM allows a miner on the Bitcoin blockchain (parent) to mine on Drivechain (child) without running a Drivechain full node, and the miner is paid in BTC.
Polygon is a mixture of both types of sidechains. It uses an Ethereum framework called Plasma, which allows the creation of child chains that can process transactions before periodically being finalized on the Ethereum blockchain. Polygon is EVM compatible. On the other hand, Polygon issues its own native token, MATIC, through Proof-of-Stake validators. It features 'two' 2-way pegs, one through Plasma and one through the Proof-of-Stake validators.
In a typical sidechain implementation, a transaction is initiated on the primary blockchain, commonly referred to as the main chain, through the process of asset locking. Following this, a corresponding transaction is created on the secondary blockchain, or the sidechain, which necessitates providing cryptographic proof that confirms the proper locking of assets on the main chain.
For instance, to transfer 1 BTC from the Bitcoin network to a sidechain, the user initiates a transaction directing 1 BTC to a predefined lockbox address on the Bitcoin network. This action temporarily excludes the transferred BTC from the active Bitcoin supply. The transaction incorporates details of the sidechain recipient address where the BTC is to be forwarded. Upon verification and incorporation of the transaction into the Bitcoin blockchain, the sidechain facilitates the release of 1 BTC to the specified address in the initial transaction. To revert the transfer and send the BTC back to the Bitcoin network, the process is executed in reverse.
Sidechains are designed to be interoperable with the main chain, allowing assets or data to be transferred between the two chains. This enables users to move assets from the main chain to the sidechain and vice versa.
Sidechains can have their own consensus mechanisms, rules, and features tailored to specific use cases. This allows developers to experiment with new features or optimizations without risking the stability of the main chain.
A common feature of sidechains is the ability to lock a certain amount of cryptocurrency on the main chain, which then mints an equivalent amount of tokens on the sidechain. This is known as a two-way pegging mechanism and allows assets to move between the main chain and the sidechain.
Specific Use Cases
Sidechains can be created for specific purposes, such as enhancing privacy, increasing transaction speed, or implementing smart contracts. This specialization enables different sidechains to cater to different needs.
Reduced Network Load
By handling specific types of transactions or functions on a sidechain, the main chain's network load can be reduced, leading to improved scalability and faster transaction confirmation times.
While sidechains can offer various benefits, security is a critical concern. Proper mechanisms must be in place to ensure that assets transferred between the main chain and the sidechain are not susceptible to attacks or vulnerabilities.
Since sidechains are usually independent blockchains, their security can potentially be compromised since they are not secured by the main chain. On the other hand, if a sidechain is compromised, it won’t affect the main chain, so it can be used to experiment with new protocols and improvements to the main chain.
Sidechains require their own miners. In parent-child sidechains, the child chain typically does not have its own native coin. This acts as a disincentive for miners because their chief source of income is from the issuance of native coins.
Did you find this article interesting?