Technical documentation

Sidechain 101: What are sidechains and why do we need them on Polkadot?

May 11, 2022

When it comes to scalability, Polkadot is one of the leading blockchain platforms. So why did Integritee feel the need to develop a second-layer sidechain protocol for Polkadot? In this post, we will take a look at the origin of sidechains and why they are needed on Polkadot. Then, we will describe how Integritee has created a second-layer protocol that can deliver sub-second block times, with 1,000 transactions per second (TPS) per sidechain, and up to 1 million TPS over the entire Integritee network.

The Origin of Sidechains

Traditional proof-of-work (PoW) blockchains rely on combined hashrate to ensure their security. In principle, the more miners there are and the more computer hardware devoted to mining, the harder the network is to breach, as an intruder typically needs to control 51% of the overall computational power to gain control.

Howver, the need for mining also leads to scalability issues, where a heavy transaction load can create bottlenecks. Bitcoin, for instance, processes an average of 3-7 transactions per second, whereas traditional payment processors like VISA average 1,700.

Sidechains emerged in response to this challenge. A sidechain is a second blockchain that processes transactions separately and connects at set intervals to the mainchain to update its verified state. By reducing the number of transactions that need to be verified on the mainchain, sidechains enable greater scalability and faster transaction times.

Typically both the parent blockchain and sidechain contain lock boxes connected by a two-way peg. In order to use the sidechain, a user needs lock assets on the mainchain by sending them to a designated lock box address. A corresponding amount of assets then become available on the sidechain. Once on the sidechain, assets can be transacted at greater speed. That’s how it works on Liquid Network, for example, a Bitcoin-based sidechain that reduces the block time to one minute and enables 7-10 TPS.  

Other than increased scalability, another potential benefit of sidechains is that they can be used to provide a higher degree of transaction privacy, as not every transaction needs to be disclosed on the mainchain. A key disadvantage, however, is that the security of a sidechain is totally separate from the mainchain, and may be weaker if the sidechain network is smaller and lacks access to a large and diverse pool of validators.      

Scalability on Polkadot

Polkadot has significant advantages when it comes to scalability. Firstly, it uses a form of nominated proof of stake (NPoS) to achieve consensus. This makes the total volume of staked assets — rather than the total hashing power of the network — the most relevant metric for determining the core security of the network. With mining not taking up computing resources, validation is faster.

In addition, Polkadot adopts a pooled security model, whereby many separate blockchains called parachains can connect to a common relay chain and share security resources. This architecture enables it to achieve about 166-1000 TPS in current real-world operation and makes it one of the most energy-efficient blockchain protocols, according to research by the Crypto Carbon Ratings Institute.  

Why Polkadot Needs Sidechains

Given that Polkadot performs comparatively well on scalability, why did Integritee develop sidechains? The first reason is privacy. While Polkadot offers competitive transaction speeds, as a public blockchain, it is transparent by nature. Transparency is an oft-cited advantage of blockchain but in some cases, it can be problematic. A user may wish to access a service that requires identity verification without publicly disclosing any personal information, for instance. A cryptocurrency trader may wish to execute a large trade on an exchange without the threat that so-called frontrunners will gain prior knowledge of the move by monitoring the mempool of unconfirmed transactions. So there is a need for confidential processing of certain data — such as the user’s personal information or the trader’s order.

The second motivation for sidechains is performance. While Polkadot comes out well in comparative tests with other blockchains, sometimes quite fast is not fast enough. Take the rapidly growing blockchain gaming space. During a fast-paced game, there could be multiple events within a space of seconds that would affect the value or ownership status of in-game assets, and any lags in responsiveness caused by latency issues will diminish the gameplay experience. This is why the decentralized blockchain gaming platform Ajuna chose to use Integritee sidechains to maximize performance and reduce latency to 300ms. And this is just one example — from high-frequency digital asset trading to connectivity with industrial IoT devices, there are many other scenarios that involve a similarly high transaction throughput.  

How Integritee’s Sidechains Were Developed

One of the first big breakthroughs we made at Integritee was to establish a framework whereby Substrate-based blockchains like Polkadot and Kusama could harness trusted execution environments (TEEs) to process data confidentially. (For an explanation of how we use TEEs, read our previous article on the topic.)

At first, this was not a sidechain solution per se. Users could simply send data to a trusted function on a TEE and receive an on-chain response. Initially, every TEE transaction needed to first pass through the main blockchain to determine the order in which transactions would be processed, which limited the scalability of the solution.

To make Integritee even faster and more scalable, therefore, we developed sidechains that support multiple validators operating within TEEs. A unique advantage of Integritee sidechains is that because every validator operates within a TEE, all validators can trust each other, which means that consensus can be reached with a much faster and simpler protocol. As a result, Integritee can deliver sub-second block times with 1,000 TPS on each sidechain. In combination, this provides a cumulative capacity of up to 1 million TPS over the entire Integritee Network for well shardable use cases.

The Polkadot platform offers highly competitive scalability balanced with security and flexibility. However, some use cases require transaction privacy, high transaction throughput, or low latency. Integritee sidechains are ideally suited to processing sensitive data at scale, or for any blockchain use case that requires ultra-fast response times.


You Might Also Like