Infura now supports additional networks including Arbitrum, Optimism and Polygon.

All three projects are essentially new blockchain networks. They offer low transaction fees and faster confirmation times compared to Ethereum. Crucially, they extend the utility of Ethereum as users can transact using their assets that fundamentally reside on Ethereum.

This scaling approach is called off-chain protocols and we have put together a short post to help explain how they help to scale (and extend the utility) of Ethereum.

Why not just transact on Ethereum? What is the scalability bottleneck?

Figure 1: Average gas price over the past three months. Typically spikes when the network is congested.

Ethereum supports around 15 transactions per second and as seen in Figure 1 the network fees tend to skyrocket when users exceed the network’s throughput ceiling. In some ways, the throughput limitation is self-imposed by the community in the pursuit of decentralization.

The goal for decentralization is to maximise the percentage of the world’s population who can verify the blockchain’s integrity (and transactions) in real-time. This goal is essential to minimise the trust in block producers as the community can self-enforce the set of consensus rules that govern the validity of blocks. Depending on the target percentage of the world’s population, there is a limit to the computational, storage and bandwidth available to the network for processing transactions.

Our challenge as a community is to figure out how to increase the network’s throughput while adhering to the imposed resource constraints.

Why should we care about off-chain protocols like sidechains or rollups?

Most approaches to scale the network focus on:

  • Distributing verification. The verification task is distributed amongst nodes on the network as opposed to requiring all nodes to replicate the same work (Ethereum today).
  • Better utilize the network's available resources. The network's resources should be continuously utilised and not allowed to sit idle. For example, short block intervals to better utilize bandwidth.  

Scaling solutions still remain a few years away from adoption as they require major changes to the underlying Ethereum protocol.

An alternative and popular scaling approach, off-chain protocols, is a solution that is immediately available. It scales the network in a following way:

Off-chain protocols: Transaction processing is moved away from Ethereum to another network while still transacting with the same assets that reside on Ethereum.

We consider this a scaling solution as other blockchain networks are not limited by the same resource constraints as Ethereum. They can experiment with various scaling protocols (or simply test the limits of go-ethereum) while extending the utility of Ethereum.

Where are my assets held when transferred to another network?

A bridge contract is responsible for holding the user’s assets on one blockchain (Ethereum) and notifying the other network to mint an equal quantity of coins for the user. Once minted, the user can transact on the other network and eventually withdraw their funds back to the original blockchain (Ethereum) via the bridge contract.

Not all bridge contracts are equal. We must consider the bridge contract's process for deciding when to release funds back to the user. Ideally, the funds should only be released if the bridge contract is convinced the other network is not compromised. This is called the underlying trust assumption that ultimately protects the user’s funds. It can often cause controversy when discussing whether an off-chain protocol is truly scaling Ethereum.

On one hand, some users only consider a new blockchain network a scalability solution if the other network can retain the same (or very close to) security of Ethereum.  Protocols that can achieve this level of security are often called rollups. Whereas, other users will be satisfied with stronger trust assumptions as long as the funds locked into the other network are secure enough (sidechains).

Rollups, that retain the same security as the main-chain, will require more resources from Ethereum. For example, every transaction on the rollup network generates a state update that is published to the bridge contract. Whereas a side-chain does not necessarily require significant resources from Ethereum as validation of transactions is performed by a set of external parties. This trade-off on security/resources will be felt financially by the users and as a result there is no free-lunch.

Regardless, we believe that different bridge contracts will emerge and implement different degrees of trust. In the end, all blockchain networks which support transacting assets that reside on Ethereum will increase the utility of Ethereum. It is just important that users are aware of the trust assumptions and risks before deciding to lock funds into a bridge contract.

What is a sidechain?

The term sidechain originates from a paper by Blockstream. It was an interoperability solution to enable two blockchains to verify information about each other’s progress via light-weight proofs. The intention was to allow bitcoins to be locked in Bitcoin and to be released in the other network (and vice versa) without trusting any intermediary with the funds.

Over the years, the term sidechain has taken on a life of its own. It is often used to imply that an independent blockchain network has a relationship with another blockchain network. In practice, this is implemented with a bridge contract that allows assets to be moved from the main-chain (Ethereum) to another blockchain network.

There are three type of bridge contracts that are used for side-chains:

  • Single organisational. A single party has custody of the funds locked in the bridge contract.
  • Multi organisational. A fixed set of independent parties (K of N) has custody of funds that are locked.
  • Crypto-economic. A dynamic set of parties, determined by their weight in assets, have custody of the funds.

For example, WBTC is a single organisational bridge as the BTC is held by BitGo. The Liquid Network and RSK blockchain implement a multi-organisational bridge as an appointed set of parties will authorise assets to be moved across from one blockchain to another (i.e., implemented as a multi-sig). Polygon is a crypto-economic bridge as it relies on (⅔)+1 of stake to appoint validators who post periodic checkpoints about the network’s state to the bridge contract (and this checkpoint can be used to automate user withdrawals).

Crucially, the bridge contract for a sidechain does not verify the integrity of the other network and instead it relies on a set of parties to attest to its validity. It is assumed that at least a threshold of parties should have a financial incentive to remain honest and protect the user’s funds.

While the cost of a sidechain transaction consumes no additional Ethereum resources, the trade off is that the network will not retain the security of Ethereum and ultimately, trustlessness.

What is a rollup?

The term rollup originates from barry whitehat’s zkrollup and it emerged from the research on Plasma.

A rollup is still an independent blockchain network, but the transacted assets that reside on Ethereum are protected by the bridge contract. It must be continuously convinced the rollup network is not compromised and the funds are not at risk. In the worst-case, the bridge will bypass the other network and allow users to unwind and eventually withdraw their funds.

A rollup can retain the same (or very close to) the security of Ethereum and this is accomplished by solving the following problems:

  • Data availability. The bridge contract must be convinced that all data is publicly available. This allows anyone to independently compute the rollup’s stateful database.
  • State transition integrity. The bridge contract must be convinced that all state transitions (transactions) are valid.
  • Censorship-resistance. The bridge contract will self-enforce transaction inclusion to ensure a user can eventually withdraw their funds if the network is compromised (or no longer making progress).

As a quick summary on potential solutions. The data availability problem is solved by just posting all data to the Ethereum network and this is where the name rollup originates (to roll up the data). The state transition integrity problem is solved using a fraud proof (Optimistic rollup) or a validity proof (zero knowledge rollups) system. The censorship-resistance problem is a little trickier, and often not discussed, but it requires the bridge contract to self-force the inclusion and eventual execution of user-generated transactions.

There is an on-going financial cost for rollup. The network must continuously provide evidence to the bridge contract that all finalised transactions are valid and the network is not compromised. This consumes resources from Ethereum and impacts the scalability that is attainable by rollups. However in the immediate term, it can significantly reduce the cost of a transaction. For example, in Arbitrum, a swap costs 1,600 gas compared to 120,000 gas on Ethereum.

What is the difference between a sidechain and a rollup?

Sidechains, such as Polygon and rollups, such as Optimism and Arbitrum are just independent blockchain networks. They have their own set of block producers and smart contract environments. The core difference between a sidechain and a rollup is found in the bridge contract that locks funds from Ethereum onto the other network. Precisely, it is the trust assumption that protects the funds held by the bridge contract.

  • Sidechain. The bridge contract may receive information about the other network, but it does not validate its correctness. A set of parties who govern the bridge are responsible for checking the other network is not compromised and attesting this fact to the bridge contract.
  • Rollup. A set of parties (sequencers) are responsible for providing evidence about the state of the other network to the bridge contract. It is up to the bridge contract to validate the evidence’s correctness and to independently verify the other network is not compromised.

It is a subtle difference, but it boils down to whether the bridge contract can self-enforce the validity of transactions on the other network or if it must rely upon a trusted set of parties to attest that it is valid.

Of course, there is no free lunch. Rollup networks can retain the security of Ethereum, but it also consumes more resources of Ethereum. This increases the financial cost to transact on a rollup network compared to a side-chain.  As a user or developer, you will need to consider the security offered by the other network and the potential financial cost that it entails.

Choose a solution that best suits your use case.

How can I get started with rollups and sidechains?

You can check out our blog announcements for the networks we support which includes Arbitrum, Optimism and Polygon.

All networks adhere to the same JSON RPC standard as the Ethereum network and they support EMV-compatible smart contracts. You can activate the networks in your Infura account, update the provider URL and start interacting with the networks immediately.

Arbitrum and Optimism are still in beta and in the progress of preparing for their mainnet launch. You may need to contact the teams if you want to deploy a smart contract to their mainnet. Polygon is already launched and you can start deploying contracts immediately.

We hope you found this article about rollups and side-chains informative. At Infura, we have supported Ethereum for over 5 years and we are excited to now support new projects that extend the utility (and scalability) of Ethereum.