Plasma — Layer 2 Scaling protocol

Keerthi Nelaturu
Coinmonks
5 min readJul 12, 2018

--

https://www.investopedia.com/news/what-plasma-and-how-will-it-strengthen-ethereum-blockchain/

Ethereum scaling issues have become a widely spoken about topic in the past few weeks. Last year, it was Cryptokitties. This time its an exchange (FCoin) I am hearing for the first time. Everybody is pushing Ethereum to get to the scaling issues sooner than later. Plasma is one of the few scaling solutions. This article is to brief about concepts of plasma.

What is Plasma ??

Many say, future lies in maintaining ethereum’s accuracy and integrity and move the transactional overhead on to a different level. As Joseph Lubin called it “Phase-2” of Ethereum. Plasma is a layer-2 scaling protocol, first proposed as a paper by Joseph Poon and Vitalik Buterin in Aug 2017. It’s a technique to conduct off chain transactions in a highly scalable way. It stands along with State channels and Truebit.

The idea is to have many chains pointing back to parent chain (mainnet). These chains are called child chains. Child chains further can spawn of into more sub-chains. Its like blockchains within blockchains. These chains can run as a independent blockchain by themselves, only intermittently updating to the parent chains (if needed). They can have their own consensus mechanism (Yay!! No more Proof-of-work!).

Plasma Whitepaper — Plasma tree structure

First look of plasma (if implemented properly), would lower transaction fees (way lower in comparison to mainchain!) and faster speed of execution. It would be millions of transactions per second.

How is it implemented ?

Basically, there is Plasma root chain which is created using Smart contracts on main blockchain. The smart contracts enforce proof-of-stake protocol for the root plasma chain. This root chain is connected to main chain and keeps updating to main chain periodically during certain situations like withdrawals, disputes or proof of frauds submitted to root chain.

Plasma Whitepaper — Smart contracts on root chain

The smart contracts will contain the rules of child chain, state hashes of the child chain and they facilitate in exchange of assets from main chain to child chain. Once a plasma chain is established, users can deploy more smart contracts on to the plasma chain independent of the main chain and go through with regular transactions like on main chain. The full details of the smart contract doesn’t have to be available on the main chain. Before, anyone starts transacting on a plasma chain, they would have to move or convert their assets on main chain to the plasma chain.

Plasma Exits are one of the key security features. Parties can withdraw their funds and assets back to main chain anytime. There can be mass exits or individual withdrawals. Withdrawals follow the challenge period protocol, which is similar to the one in lightning network. Anyone can even monitor the plasma chain and submit a fraud proof to the main chain. If proven fraudulent, the issuer of the block is penalized. Fraud proofs can be even submitted to parent plasma chain, which if not resolved can be taken to higher level chains in the hierarchy, in the end leading to the main chain. The worst thing to happen is a whole plasma chain getting compromised. Even at that point, plasma chain can do mass exits and withdrawals on to the main chain.

Design goals of Plasma

  1. One blockchain to rule them all
  2. Minimization of the trust
  3. Ledger scalability
  4. Child chain should be scalable
  5. Localized computations
  6. Fraud Proofs
  7. Every chain is unique

Technical Details

Plasma is based upon on the concept of MapReduce. A highly famous framework used in most of the working with big data sets. Its a 2-phase approach :

  • The map phase publishes the data commitments.
  • Reduce phase includes a merkleized proof of state transition when returning the result.
Plasma whitepaper — How Plasma makes use of MapReduce

Benefits

  • Larger datasets might be possible
  • Complex and computationally intensive transactions can be executed on plasma chains.
  • Fees can be much lower. Faster confirmations.
  • Saves power and memory on main chain.
  • Compatible with other on chain solutions like sharding, blocksizes etc.
  • Many of the computational restrictions in ethereum go away in respective plasma chain.
  • Dispute resolution.
  • Pre-designed exits.
  • Move to other blocks in case of fraud.

As always, what are the issues ?

  • Mass exits in child plasma chain might lead to congestion on the main network and lead to delays crossing the challenge period.
  • If no one is monitoring a plasma chain, there is no scope for submitting fraud proofs.
  • Closing of transactions on main chain even before they are closed on the plasma chains.
  • Root chain is under 51% attack that will effect complete plasma chain eco system.
  • If parent chain has issue and stops producing blocks, child chains are responsible for fixing the parent chain.
  • Once consensus is established, changing it will be very tough. You will have to exit plasma chain and move function to another plasma chain.

Examples of blockchains implementing Plasma protocol

  • Cosmos / Polkadot
  • OmiseGo — Decentralized exchange, currency agnostic

References

  1. http://plasma.io/plasma.pdf
  2. https://medium.com/@argongroup/ethereum-plasma-explained-608720d3c60e
  3. https://medium.com/chain-cloud-company-blog/plasma-in-10-minutes-c856da94e339
  4. https://www.coindesk.com/stanford-university-launches-new-blockchain-research-center/
  5. https://blockgeeks.com/guides/what-is-omisego-the-plasma-protocol/
  6. https://medium.com/@robertgreenfieldiv/simplifying-the-plasma-whitepaper-3b8a4be2bc57
  7. https://medium.com/@collin.cusce/why-business-needs-ethereum-plasma-now-scaling-problems-pt-1-8d6186438b5
  8. https://medium.com/@collin.cusce/why-business-needs-ethereum-plasma-now-how-it-works-key-components-pt-2-37a82737cd54
  9. https://medium.com/@collin.cusce/why-business-needs-ethereum-plasma-now-what-it-enables-pt-3-cb340654e96f
  10. https://coincentral.com/2018/07/07/plasma-an-innovative-framework-to-scale-ethereum/

--

--

Keerthi Nelaturu
Coinmonks

PhD Candidate at University of Toronto. Want to learn and write about everything in Computer Science. Photographer.