A Primer on Ethereum L2 Scaling Techniques

Token Terminal
Token Terminal
Published in
3 min readJul 7, 2020

What is meant by L2 scaling?
L2 scaling techniques move transactions off-chain and bundle them into proofs that are submitted back to the main chain (external scaling). L1 scaling techniques try to improve the throughput of the main chain through sharding (internal scaling).

The different L2 scaling solutions can roughly be divided into:

  1. State channels
  2. Sidechains

State channels assume a fixed set of participants where everyone acts as a validator, whereas sidechains have a separate validator set and allow anyone to use the network.

State channels
In state channels, state changes are made by a fixed set of live participants. Any update to the channel must be digitally signed by all channel participants.

Sidechains
Sidechains are either custodial or non-custodial.

  1. Custodial sidechains; assets are moved to a parallel chain with its own consensus mechanism and security.
  2. Non-custodial sidechains; assets are held and state is secured by smart contracts on Ethereum (this means that non-custodial sidechains can survive an attack of the sidechain).

Plasma
Plasma is a general framework for building non-custodial sidechains. However, unlike custodial sidechains, Plasma chains derive their security from the main chain (Ethereum). In Plasma, the block headers (snapshots of the balances) are enforced on Ethereum.

In Plasma, as opposed to submitting individual transactions onto the root chain, transactions are bundled into a Merkle tree & the root hash is submitted.

Rollups
Rollups are non-custodial sidechains that solve Plasma’s data availability problem. Rollup blocks include enough data for anyone to reconstruct and challenge their state. In Plasma, only a subset of validators can challenge blocks sent to the main chain.

Rollups come in two flavours:

  1. Optimistic rollups — ORs depend on a dispute game run by active validators.
  2. ZkRollups — ZKRs rely on cryptographic zero-knowledge (ZK) proofs, which are instantly validated by a smart contract.

Optimistic rollups
Optimistic rollups resemble Plasma sidechains, but tradeoff some of their scalability to run fully general smart contracts (whereas ZKRs are currently better suited for simple payment transactions). Optimistic rollups can run anything Ethereum can.

In an OR, contract calls and their arguments are written on-chain, but the actual computation and storage of the contract are done off-chain.

ZkRollups
In a ZkRollups, validators generate ZK proofs of all state transitions. ZK proofs are instantly verified by the Rollup contract on Ethereum. This means that it is extremely difficult to manipulate a block or commit a block with an invalid state.

In a ZkRollup, every state transition is verified by the Rollup smart contract before it becomes effective. It is strictly not possible for block producers to steal the funds or corrupt the Rollup state.

We recommend checking out Matter lab’s comparison framework of different L2 scaling solutions: https://docs.google.com/spreadsheets/d/19hl6CxG-RfWKsDEa86ZHWkHGvplyW4J1TqKFvcbbyvs/edit#gid=0

Token Terminal provides financial and business metrics on crypto protocols — metrics we’re used to seeing applied to traditional companies, e.g the P/E ratio. Crypto protocols operate like traditional businesses, only they do it directly on the Internet.

For more, check out Token Terminal’s newsletter, website and Twitter.

--

--