Construction of the Tunkhannock Viaduct railway bridge in Pennsylvania (cc). Roman engineering principles being extended to new uses.

Making Sense of Ethereum’s Layer 2 Scaling Solutions: State Channels, Plasma, and Truebit

Josh Stark
Feb 12, 2018 · 22 min read
  • Second, we’ll cover the different approaches to solving the scaling challenge, distinguishing between “layer 1” and “layer 2” solutions.
  • Third, we’ll delve into layer 2 solutions and explain how they work — specifically, we’ll talk about state channels, Plasma, and Truebit

1. The scaling challenges of public blockchains

First, it’s important to understand that “scaling” isn’t a single, specific problem. It refers to a collection of challenges that must be overcome to make ethereum useful to a global user base of billions of people.

I. What if each node didn’t have to process every operation in parallel?

The first approach rejects our premise — what if we could build a blockchain where every node didn’t have to process every operation? What if, instead, the network was divided into two sections, which could operate semi-independently?

II. What if we could squeeze more useful operations out of ethereum’s existing capacity?

The second option goes in the opposite direction: rather than increase the capacity of the ethereum blockchain itself, what if we could do more things with the capacity we already have? The throughput of the base-layer ethereum blockchain would be the same, but in practice we would be able to do many more operations that are useful to people and applications — like transactions, state updates in a game, or simple computations.

2. Layer 2 solutions are cryptoeconomic solutions

Before diving into specific layer 2 solutions, it’s important to understand the underlying insight that makes them possible.

I. State channels

State channels are a technique for performing transactions and other state updates “off chain”. However, things that happen “inside” of a state channel still retain a very high degree of security and finality: if anything goes wrong, we still have the option of referring back to the “hard kernel” of certainty found in on-chain transactions.

Features and limitations

State channels are useful in many applications, where they are a strict improvement over doing operations on-chain. However, it’s important to keep in mind the particular tradeoffs that have been made when deciding whether an application is suitable for being channelized:

  • They’re particularly useful where participants are going to be exchanging many state updates over a long period of time. This is because there is an initial cost to creating a channel in deploying the Judge contract. But once it is deployed, the cost per state update inside that channel is extremely low.
  • State channels are best used for applications with a defined set of participants. This is because the Judge contract must always know the entities (i.e. addresses) that are part of a given channel. We can add and remove people, but it requires a change to the contract each time.
  • State channels have strong privacy properties, because everything is happening “inside” a channel between participants, rather than broadcast publicly and recorded on-chain. Only the opening and closing transactions must be public.
  • State channels have instant finality, meaning that as soon as both parties sign a state update, it can be considered final. Both parties have a very high guarantee that, if necessary, they can “enforce” that state on-chain.

II. Plasma

On August 11 2017, Vitalik Buterin and Joseph Poon released a paper titled Plasma: Autonomous Smart Contracts. The paper introduced a novel technique that could enable ethereum to reach many more transactions per second than currently possible.

plasma.io/plasma.pdf

But how can this be safe?

By moving more operations off the main-chain and onto a child-chain, it’s clear we can perform more operations. But how secure is it? Are transactions that happen on the child-chain actually considered final? After all, we’ve just described a system where a single entity controls the block production for our child chain. Isn’t that centralized? Can’t the company steal your funds or take your collectible cards whenever it wants?

plasma.io/plasma.pdf
plasma.io/plasma.pdf

III. Truebit

Truebit is a technology to help ethereum conduct heavy or complex computation off-chain. This makes it different from state channels and Plasma, which are more useful for increasing the total transaction throughput of the ethereum blockchain. As we discussed in the opening section, scaling is a multi-faceted challenge that requires more than high transaction throughput. Truebit won’t let us do more transactions, but it will let ethereum based applications do more complex things in a way that can still be verified by the main-chain.

Simplified conceptual diagram of Truebit

Conclusion

Layer 2 solutions share a common insight: once we have the hard kernel of certainty provided by a public blockchain, we can use it as an anchor for cryptoeconomic systems that extend the usefulness of blockchain applications.

L4 blog

We're building Web 3.

Josh Stark

Written by

Co-founder @ L4

L4 blog

L4 blog

We're building Web 3.