Skip to main content
Layer 2s and scaling

Sidechains vs Layer 2s

Pomegra Learn

Sidechains vs Layer 2s

The terms "sidechain" and "Layer 2" are sometimes used interchangeably, but they describe different architectural approaches to scaling blockchains. A sidechain is a separate blockchain that runs parallel to a main chain, connected via a bridge. A Layer 2 is a system that offloads transactions to a secondary chain or system while anchoring security to a main blockchain. The distinction matters because it has profound implications for security, decentralization, and trust models.

Definitions and Core Differences

Sidechains are independent blockchains that have their own validators, consensus mechanisms, and security. A two-way bridge connects them to the main chain, allowing users to move assets between chains. The sidechain is "independent" in the sense that its security comes from its own validators, not from the main chain.

Layer 2s are not independent blockchains. They are systems designed to be explicitly subordinate to a main chain, deriving their security from the main chain through mechanisms like fraud proofs or validity proofs. A Layer 2 can't finalize transactions independently; it ultimately depends on the main chain.

The key distinction: A sidechain's security is independent; a Layer 2's security depends on the main chain.

The Security Model Question

This distinction becomes clear when considering what happens if a sidechain operator behaves dishonestly. Imagine a sidechain backed by 20 validators. If 11 of them collude and create a fake transaction giving themselves all the user funds on the sidechain, what happens?

Users can't force a settlement on the main chain. The sidechain validators are the source of truth for the sidechain state. The main chain can't arbitrate because it doesn't independently verify sidechain transactions. Users suffer a loss unless the bridges are structured to limit this risk, but fundamentally, users must trust the sidechain validators.

Now consider a Layer 2 with optimistic rollups. The rollup operator creates a batch of transactions and posts it to the main chain. If the operator tries to include a fraudulent transaction, anyone can submit a fraud proof to the main chain. The main chain's smart contract can verify the fraud proof cryptographically and reverse the fraudulent transaction. Users don't need to trust the rollup operator; they trust the main chain.

Practical Implications

These different security models have practical consequences:

Validator set: Sidechains can have fewer validators to improve efficiency. Layer 2s typically have a single operator or small set, because they don't provide security—the main chain does.

Bridging risk: Sidechains require trusted bridges, because the sidechain validators are the only source of truth for sidechain balances. Layer 2s can use simpler bridges because the main chain can verify the Layer 2's state.

Finality: Sidechain transactions are final once sidechain consensus is reached. Layer 2 transactions may have different finality models depending on the Layer 2 architecture, but ultimately depend on main chain finality.

Decentralization: Sidechains that want high security need many validators, reducing efficiency. Layer 2s can operate efficiently with fewer operators because the main chain provides the security guarantee.

Historical Context: Sidechain Development

The term "sidechain" was formalized by Poon, Lerner, and Back in 2014 in a white paper proposing how to create assets on alternative blockchains while maintaining bridges to Bitcoin. The motivation was to enable experimentation and innovation (like smart contracts) without modifying Bitcoin itself.

Sidechains saw early adoption on Bitcoin in the form of Liquid (a sidechain developed by Blockstream). Liquid was designed for confidential transactions and faster confirmation. It has real usage among traders and exchanges but represents a small fraction of Bitcoin activity.

On Ethereum, sidechains came later but achieved more adoption. Polygon (originally Matic Network) started as a pure sidechain and is still partially structured that way, though it has evolved to include some Layer 2 properties. xDai (later Gnosis Chain) operated as a sidechain. These sidechains offered Ethereum developers faster transaction times and lower fees, at the cost of reduced security compared to Ethereum itself.

The Naming Confusion

The terms "sidechain" and "Layer 2" are used inconsistently in the industry, creating confusion. Some projects call themselves Layer 2s even though they have sidechain-like properties. Some are hybrids that aren't purely one or the other.

Polygon is a useful example of this confusion. Polygon originally operated as a sidechain: it had its own validators running Proof of Stake consensus. Transactions were finalized by Polygon consensus, not Ethereum. Polygon later added the ability to periodically post commitments to Ethereum and enabled fraud proofs, adding some Layer 2 properties. So Polygon is both a sidechain and a Layer 2 depending on how you use it.

Ronin (operated by Sky Mavis, developers of Axie Infinity) was initially built as a sidechain. Its security came from a small set of validators. When Ronin was hacked in 2022 (stealing over $600 million), the hack was possible because of the sidechain's reliance on validator trust, not because of any Layer 2 flaw.

Sidechains vs Layer 2s in Practice

When a cryptocurrency exchange uses a sidechain, it's betting that the sidechain validators won't collude to steal funds. If they do, the exchange loses money. The main chain can't recover it. Many early sidechain projects had security incidents because validators were too few or insufficiently incentivized to behave honestly.

When a user transacts on a true Layer 2, they're relying on the main chain to verify that transactions are valid. If the Layer 2 operator misbehaves, the main chain's smart contract will catch it and reverse it. The user's funds are ultimately secured by the main chain.

This is why the Ronin hack was possible but a comparable Optimism hack would not be: Ronin's security came from its validators. Optimism's security comes from Ethereum. When Optimism's operator misbehaves, Ethereum can reverse it.

Bridges and Asset Transfer

Both sidechains and Layer 2s require bridges to transfer assets from the main chain to the secondary system. But the bridges have different properties.

A sidechain bridge is essentially a lock-and-mint mechanism: you lock Bitcoin on Bitcoin's main chain, and the sidechain mints equivalent Bitcoin on the sidechain. The sidechain validators maintain the list of locked Bitcoin. If the validators collude, they can mint more Bitcoin on the sidechain than is actually locked, or they can refuse to let users withdraw locked Bitcoin.

A Layer 2 bridge is more secure because the main chain can verify the Layer 2's state. If you deposit Ethereum in a Layer 2 bridge, the smart contract holds the Ethereum and maintains a map of Layer 2 balances. The Layer 2 can't create more Ethereum than was deposited because the main chain's smart contract is the source of truth.

When Each Makes Sense

Sidechains make sense when:

  • You want to experiment with different consensus mechanisms or rules
  • You need to isolate your blockchain from main chain congestion
  • You're willing to accept the validator risk for higher throughput
  • You're building in an ecosystem where Layer 2 technology isn't mature

Layer 2s make sense when:

  • You want to inherit security from an existing blockchain
  • You're building for users who prioritize security over maximum throughput
  • You need to enable withdrawals to the main chain reliably
  • You're targeting Ethereum or other blockchains where Layer 2 infrastructure exists

The practical trend has been toward Layer 2s. As Layer 2 technology has matured (with successful deployments of rollups like Arbitrum and Optimism), developers have less reason to accept sidechain trust assumptions. The ecosystem has consolidated around Layer 2 solutions because they offer better security properties.

Evolution and Hybrids

Some newer systems are hybrids that have properties of both. They might operate with a validator set (sidechain-like) but also enable fraud proofs or validity proofs (Layer 2-like). StarkEx is an example: it uses zero-knowledge proofs for security while having a dedicated operator.

Others started as sidechains and added Layer 2 properties. Polygon evolved this way. This evolution reflects the recognition that true Layer 2 security is valuable.

Summary

Sidechains are separate blockchains with their own validators that connect to a main chain via bridges. Layer 2s are systems designed to depend on a main chain for final security through cryptographic mechanisms like fraud proofs. This distinction has significant implications: sidechains require trust in their validators; Layer 2s inherit security from the main chain. Early scaling solutions like Liquid and Polygon started as sidechains. As Layer 2 technology matured, most new projects have adopted Layer 2 architectures because they offer superior security. The confusion between terms reflects the industry's evolution as it has moved from sidechain experiments to mature Layer 2 solutions.


Next: Rollups Explained