Plasma & Rollups: Scaling Solutions in Practice

Xiaoqing Liu
LEVERJ
Published in
4 min readJun 17, 2020

--

Scalability has been an innate problem since Ethereum was born. To improve the performance of the network, Ethereum builders and researchers have been exploring different ways to scale.

Up until a few months ago, Plasma was one of the most effective, significant, and promising Layer 2 solutions for scaling Ethereum. State Channels and Truebit were options as well. More recently, alternatives like Rollup have taken the mindshare.

Rollup solved the problem faced by Plasma — data availability, without sacrificing the security and scalability of Ethereum. Some believe that Rollups is more a Layer 1.5 (or Semi-Layer 2) rather than a Layer 2 solution.

In this article, we’ll illustrate a few important aspects of the two technologies and introduce the major decentralized exchanges (DEXs) that are using them.

Plasma 101

Back in August 2017, a paper named “Plasma: Scalable Autonomous Smart Contracts” written by Vitalik Buterin and Joseph Poon was published.

The core principle of Plasma is to scale Ethereum by offloading the transactions offchain onto a Layer 2 sidechain (sometimes it is called child chain or Plasma chain), and submitting the state transactions (new sidechain blocks) to the Ethereum mainnet (Layer 1) periodically. In this way, it improves its throughput and lowers the transaction fees.

Well architected and technically sound projects like Leverj, Matic and OmiseGO are built on Plasma.

Since each transaction is not submitted to the mainnet by design, “data un-availability” has been one of the most challenging bits for Plasma. If everything is published, things can be reconciled. But in the absence of data, establishing the truth is troublesome. Plasma implementations like Gluon Plasma handle such situations using a consensus based vote to halt and projects like Matic use a backing proof of stake chain to resolve this issue. Theoretically, Rollup seems to avoid the problem of “data unavailability” completely.

To address the problem, researchers turned to another solution: Rollup.

Rollup 101

Rollup and Plasma are similar in many ways: they both scale Ethereum by moving transactions off-chain onto a sidechain (L2). Ethereum mainnet (L1) holds all funds deposited into the sidechain and maintains proof of the sidechain state. The sidechain itself is maintained by users and operators offchain, separate from the L1 main chain.

Rollups comes in a few different flavors. The most popular ones are ZK Rollup and Optimistic Rollup.

ZK Rollup

Barry Whitehat, an anonymous Github user, coined “Rollup” back in 2018:

Roll_up aggregates transactions so that they only require a single onchain transactions required to validate multiple other transactions. The snark checks the signature and applies the transaction to the leaf that the signer owns.

ZK Rollup increases scalability through mass transfer processing rolled into a single transaction.

The aggregation and validation are completed via ZK-SNARKS, reducing the transaction costs, guaranteeing the security and ensuring the data availability. ZK Rollup bundles hundreds of transfers into a single transaction. The L1 smart contract deconstructs and verifies all the transfers rolled up in a single transaction.

This approach reduces computing and storage costs.

Optimistic Rollup

One of the main problems of ZK Rollup is that it takes too much time to generate a SNARK proof and it does not support commonly used smart contract standards. In June 2019, John Adler, the Ethereum scalability researcher, came up with the “Optimistic Rollup” solution, which combines the advantages of ZK Rollup and the fraud proof mechanism of Plasma.

The name “Optimistic” indicates that the aggregators are trusted to publish the most up-to-date and correct data onto the blockchain without committing frauds, otherwise they will be challenged and punished once failed to be verified. This solution ensures to scale Ethereum while still being secure.

Plasma v.s Rollups in Practice

Decentralized exchanges are so far the most popular use case of L2 solutions.

Leverj is build on a flavor of Plasma and Loopring uses ZK Rollups. Here is a comparative table that lists what each of these exchanges offer at the moment.

Leverj v.s. Loopring

If you’re keen to experiment with the newer ZK Rollup technology then give Loopring a try. Alternatively, enjoy the provably secure Plasma constructs driven Leverj.

Conclusion

Scalability is and will be a hot topic in the Ethereum community. Until the scalability challenges of Ethereum are solved, any DApp, DeFi protocol or game would not be able to get mass adoption.

There isn’t a “perfect” solution that solves all the problems in the context of making Ethereum scalable while maintaining its security guarantees. There are interesting choices and tradeoffs. The scalability puzzle in the world of Ethereum continues to draw a lot of attention.

Plasma and Rollups are both very promising solutions. Both will continue to evolve in the times to come. In addition, there will surely be other newer scaling ideas in the mix.

--

--