Ethereum’s Layer 2 Scaling Solutions

Patricio Mosse
Datawallet Blog
Published in
7 min readNov 29, 2018

Making transactions in the Ethereum Virtual Machine is expensive and slow. Every operation needs to be processed by the majority of the nodes to reach on-chain consensus. This sets a fundamental limit on Ethereum’s transaction throughput.

Scaling Layer 1:

Currently, Ethereum can process a maximum of 15 transactions per second, which is far away from Internet-level scalability. Ethereum’s creator Vitalik Buterin expects an endgame of millions of transactions per second to be able to attend the requirements of the decentralized web (for example the demand that will be created by IoT devices), but says billions is still the long-term goal.

Casper, eWASM, sharding and other scalability and efficiency technologies under the umbrella of Serenity are being developed. They are known as Layer 1 solutions as they modify the core Ethereum protocol, and they rely on it for security. They will make Ethereum faster with different tradeoffs, but they won’t change the fundamental limitations of an on-chain consensus.

Ethereum can process a maximum of 15 transactions per second

Scaling Layer 2:

Layer 2 solutions are protocols built on top of Layer 1, in which they rely for security. Scaling solutions in Layer 2 have an important focus on transaction throughput and share the same intuition: Ethereum is used as a kernel of certainty to which you can attach cryptoeconomic systems.

The second layer of economic mechanisms can extend the utility of Ethereum, allowing secure interactions that happen off-chain but can still reliably refer back to that kernel if necessary.

Each layer of solutions and protocols is built on top of the previous one

Off-chain techniques allow participants to execute transactions between themselves directly, instead of doing them in the blockchain, without having to trust each other. Involved parties maintain an off-chain state machine (which is fraud-proof by protocol), and only resume to on-chain consensus when absolutely necessary.

These mechanisms built on top of Ethereum don’t always have the same guarantee as if they were done on-chain, as for example they may require participants to remain online to be able to respond to fraud attempts, but they can be sufficiently final and secure to be very useful.

Some of the mechanisms being developed in Layer 2 are State Channels, Sidechains and Plasma. They improve scalability and reduce transaction fees.

1. State Channels:

State channels improve blockchain performance by moving state-modifying operations off-chain. These operations are executed directly between the participants. Payment channels were the first type of state channel to be described, using off-chain transactions to modify ownership of locked Bitcoin, allowing users to make “off-chain payments” between each other. The term “state channels” generalizes this technique beyond payments, including all types of blockchain state modifications.

In off-chain techniques, most of the transactions occur off of the blockchain

State channels let participants securely modify locked portions of blockchain state known as state deposits. These are typically held in multi-signature wallets or smart contracts. Parties update the state channel by exchanging off-chain messages describing an update to the state deposit. When they choose to close the channel, the most recent state update is sent to the on-chain multisig or smart contract as a single transaction, and the state deposit is withdrawn to the participants according to the final state.

Because participants store a copy of these off-chain state updates, they could potentially execute the most recent state update on-chain if they wanted to. They are prevented from submitting old messages by their counter-parties, who can always prove that there exist a most recent update. This Game Theory design allows participants to treat updates within a state channel as if they were “final”.

2. Sidechains:

Sidechains are unique blockchains that are attached to a “main-chain” using a two-way peg. They allow tokens and digital assets from one blockchain to be used in a separate one and then be moved back to the original if needed. Sidechains are independent from the main-chain and are responsible for their own security, meaning they implement their own mechanism for achieving consensus.

3. Plasma:

Plasma is a framework for creating scalable blockchain applications. This technique has a series of smart contracts running on top of a root blockchain. The root network contract processes only a tiny amount of commitments from child blockchains that are able to do an incredibly large amount of computations in most cases. The commitments are broadcasted periodically from the child blockchain to the root one.

Features and restrictions:

Safety properties for State Channels and Plasma depend directly on the safety of the blockchains where their state deposits are locked. Selective censorship of a participant’s submissions to the blockchain could stop him from safely exiting a State Channel or Plasma chain. In the case of Sidechains, state is sidechained to a blockchain with a different consensus mechanism. If it fails, owners of the state may lose everything.

State Channels are differentiated from Plasma in that any change of state requires explicit consent from all participants. They depend directly on the records and liveness of State Channel participants. These factors make State Channels one of the mostly tightly constrained techniques for improving the performance of blockchain-based applications.

Plasma users must wait for confirmations in order to consider their transactions completed and secure. This is because Plasma relies on merkle proofs submitted to the main chain by Plasma validators. In the case of State Channels, the requirement of total consent is the reason of a rapid finality, as all participants have access to the last signed state update. This enables cooperating and available participants to make immediate withdrawals of state from their channels.

Conclusion:

Layer 1 serves as a security layer, enabling data transactions that are both immutable and cryptographically secured. Layer 2 cuts down data processing on the blockchain, contributing to the transaction capacity. The off-chain techniques developed in this layer will help address some of the challenges involved in scaling Ethereum, leading to decentralized systems with Internet-level scalability.

Projects working on scaling solutions:

Below you can find a list of projects working on protocols and implementations for different scaling solutions.

State Channels:

  • Lightning Network: Micropayments in Bitcoin’s blockchain. Find a broader explanation here: Scale with Speed: The Bitcoin Lightning Network Explained
  • Raiden Network: Micropayments in Ethereum’s blockchain.
  • Counterfactual: Generalized state channels framework on Ethereum.
  • FunFair: State Channels (called Fate Channels) for online casinos.
  • SpankChain: A cryptoeconomic powered adult entertainment ecosystem built on the Ethereum network using micropayment technology.
  • Liquidity Network: Off-chain payment hubs.
  • Celer Network: Platform for highly scalable decentralized applications, with a payment network being one component of the ecosystem.
  • Connext Network: State channel hub that allows you to securely move transactions to a networked, trustless, off-chain layer.
  • Perun Network: Framework that supports off-chain protocols for simple payments and generic smart contract off-chain execution. Virtual Channels.
  • Trinity: Neo’s version of Lightning network, using State Channels and Zero-Knowledge-Proofs.
  • Decentraland: Off-chain auctions of land.
  • Machinomy: Node.js library for micropayments in Ether and ERC20 tokens over HTTP.
  • Magmo: Force-move games framework designed only to support turn-based games whose moves don’t depend on time or data that is external to the channel.

Sidechains:

  • Parity Bridge: Bridge between any two ethereum-based networks.
  • Proof of Authority Network: Ethereum-based platform offering an open-source framework aimed at providing easier, cheaper, and faster execution of smart contracts. It is a sidechain to Ethereum that uses proof of authority (PoA) as its consensus mechanism.
  • OmiseGO: Public, currency agnostic decentralized exchange network that will be secured by Ethereum and built to scale using Plasma architecture.
  • Loom Network: Network of sidechains connected to Ethereum that use a delegated proof of stake consensus mechanism. First implementation of Plasma Cash, which is Plasma with much less per-user data checking.
  • Rootstock: Open-source smart contract platform with a two-way peg to the Bitcoin blockchain.
  • Matic Network: Decentralized platform that uses an adapted version of the Plasma framework.
  • Liquid Network: Production sidechain and inter-exchange settlement network for Bitcoin utilizing a federation as nodes.
  • Hivemind: Peer-to-Peer Oracle Protocol which absorbs accurate data into a blockchain so that Bitcoin-users can speculate in Prediction Markets.
  • MimbleWimble: Privacy and fungibility focused cryptocoin transaction structure proposal.
  • The Elements Project: Open source, sidechain-capable blockchain platform.

Sharding:

  • Diamond Drops: Ethereum Sharding implementation in Rust.
  • Lighthouse: Open-source implementation of the Serenity Beacon Chain.

Multi-chain:

  • Cosmos: Decentralized network of independent parallel blockchains, each powered by classical BFT consensus algorithms like Tendermint.
  • Polkadot: Many parachains with potentially differing characteristics which can make it easier to achieve anonymity or formal verification, and allowing many transactions more to be processed.

Others:

  • TrueBit: Computation offloaded to an off-chain virtual machine, powered by Game Theory.

Thanks for reading! Feel free to clap this article if you had enjoyed it.

Thanks to Daniel Hawthorne, Santiago Palladino, Martin Triay and Guillermo Mosse for their comments on an earlier draft of this article.

--

--