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:
- State channels
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.
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 are either custodial or non-custodial.
- Custodial sidechains; assets are moved to a parallel chain with its own consensus mechanism and security.
- 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 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.
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:
- Optimistic rollups — ORs depend on a dispute game run by active validators.
- ZkRollups — ZKRs rely on cryptographic zero-knowledge (ZK) proofs, which are instantly validated by a smart contract.
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 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.
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.