Explained: Ethereum Plasma
Written by: Lukas Schor of Argon Group
On August 10th 2017, Vitalik Buterin and Joseph Poon released an initial draft of the Plasma project. As an implementation of the Ethereum scaling solution nears, we want to take a closer look at what Plasma actually is.
Note: As Plasma has some similarities to the Bitcoin Lightning Network, we recommend reading this article first to better understand the fundamental concepts.
Why is Plasma necessary?
Cryptocurrency’s future real-world application and feasibility rely on the technology’s scalability. Unfortunately, in its current state, the two major blockchains, Bitcoin and Ethereum, are still fairly limited in the amount of transactions that can be processed in a given time. This results in cases where a single application can bring the network to its knees. A common example how these scalability issues are limiting blockchain’s competitiveness with centralized systems is the comparison with VISA. While the popular credit card provider is handling up to 2’000 transactions per second, Ethereum is currently capped to roughly 15 transactions per second.
What is Plasma?
Ethereum Plasma introduced a novel scaling solution that could enable Ethereum to reach many more transactions per second than currently possible. Like payment channels in the Bitcoin Lightning Network, Plasma is a technique for conducting off-chain transactions while relying on the underlying Ethereum blockchain to ground its security. Thus, Plasma can be categorized to the increasing group of “off-chain” technologies which also includes state channels and Truebit. While solving different problems, they all take operations away from the Ethereum “main chain” and are performing them “off chain” instead. Still, these techniques sufficiently guarantee a certain level of security and finality.
But Plasma takes this idea even further by allowing for the creation of “child” blockchains attached to the “main” Ethereum blockchain. These child-chains can even spawn their own child-chains, which can themselves have another set of child-chains etc. So Plasma is basically many branching blockchains linked to one root blockchain.
Ethereum will continue to handle smart contracts in a similar way to how they are handled currently, except it will only broadcast completed transactions to the public Ethereum chain. Think of it as a hierarchical tree of side chains that periodically transfers information back to the main-chain.
As a result, more complex operations can be performed on the child-chain than possible purely on the main chain, allowing developers to run entire applications with thousands of users. This Plasma-chain can operate at faster speeds and lower fees than the main chain, as they do not need to be replicated across the entire Ethereum blockchain.
How does Plasma work?
In order to understand how Plasma works, let’s take a look at how the technology could be used in a real-world example.
Let’s imagine that you are creating a digital-collectibles game on Ethereum. The collectibles will be ERC 721 non-fungible tokens (like Cryptokitties), but have certain features and attributes that lets users play against each other — like Pokemon Go. These kinds of complex operations are expensive to do on-chain, so you decide to use Plasma instead for your application.
Initially, smart-contracts are created on the Ethereum main-chain. These smart contracts serve as the “root” of the Plasma child-chain. This main chain entry contains the basic rules of the child-chain, records state hashes of the child-chain, and allows users to move assets between the Ethereum main-chain and the child-chain.
After rooting the child-chain in the main chain, a child-chain is created. This child-chain features its own consensus algorithm, independently from the Ethereum main-chain. Let’s use Proof of Stake (PoS) for this example. This consensus mechanism does not rely on miners using electricity to run a hashing algorithm but rather the block producers are economically incentivized to remain truthful by a collateral that will be destroyed in case of a bad actor behaving fraudulently. This consensus algorithm generally allows for faster block-creation times than PoW.
Now that the child-chain is initialized, the basic rules of the game can be set, deploying the actual game application smart contracts on the child-chain, which contains all of the game logic and rules. The collectibles are still ERC721 tokens, created on the Ethereum main-chain, and then transferred onto the child-chain using the plasma root.
Once the child-chain is up and running, the block creators periodically commit a validation to the main-chain, essentailly proofing that the current state of the child-chain is valid according to the consensus rules. When a user plays this game, they are executing the application, without ever interacting with the main-chain directly.
Is Plasma secure?
While reading the above description, some might ask themselves such as “How secure is Plasma?” and “Are transactions on the child-chain actually immutable and final?”
However, even in a scenario where a single entity has control over 100% of block production on the child-chain (hashrate, stakes, etc. according to the consensus algorithm), Plasma guarantees that every party can always withdraw their funds and assets back onto the main chain at any time. So even in the case of a attacker trying to take control over the network, the worst that can happen is they force you to leave the child-chain.
The main security mechanism behind Plasma are “Plasma exits”, which is the process that allows a user who participates in a Plasma Chain to stop participating in the chain, and move their funds back to the main-chain.
When a user is transacting in a Plasma Chain and wants to transfer their funds to the main-chain, they submit an “exit transaction” (i.e. a merkle proof of their transaction history proving they own a certain amount of money). At that moment, there is a “challenge period.” The challenge mechanism has been seen in most off-chain solutions such as the Bitcoin Lightning Network. Essentially, you allow anyone to challenge your claim by submitting a proof which marks your claim as invalid or outdated (in Plasma this can be a Merkle proof of the transaction history, in Lightning Network channels this can be a signed message from the other party).
In addition, when making a transaction that can be challenged, you are also required to attach a small bounty to it, in order to incentivize people to challenge you, if they believe your behavior was malicious. It’s like trying to steal something and saying “I’ll pay you $5 if you can catch me.”
In the normal case, if Bob wanted to transfer X ETH back to the main-chain, he’d submit an exit transaction (plus the bounty as collateral), and if it went unchallenged he’d be able to claim X ETH on the main-chain. If Bob’s exit transaction was successfully challenged, it would get cancelled and the challenger gets the bounty. So all participants are economically disincentivized from propagating invalid blocks to the child-chain.
What are the main benefits of Plasma?
- Plasma will help the Ethereum blockchain handle much larger datasets than currently possible.
- It enables various computation-intensive applications to run on the blockchain thanks to the big increase in transaction capacity. It will also speed up transactions enough to let decentralized apps run without worrying about backlog.
- Because only a much smaller number of nodes (i.e. block producers) have to process transactions, fees can be much lower and operations can be faster.
- Plasma will get rid of unnecessary data in the main-chain. This saves an enormous amount of processing power and memory for the Ethereum nodes.
- Plasma is compatible with various on-chain scaling solutions such as sharding, various block sizes, etc.
- Plasma vastly improves ledger scalability leading to a higher data storage capacity of Ethereum-based applications.
Does Plasma have drawbacks?
The main concern related to the current Plasma proposal is what would happen if everyone using a child-chain tried to exit the sidechain at the same time. In the case of a mass withdrawal, there might not be enough capacity on the Ethereum main-chain to process everyone’s transactions within the challenge period, meaning users could lose funds. Fortunately, there are many possible techniques for preventing this, e.g. by extending the challenge period in a way that is responsive to demand for withdrawals.
When will Plasma be launched?
Plasma itself is in very early stages. If you are interested in learning more about current work on Plasma, check out Vitalik’s recent proposal for a “Minimal Viable Plasma” (i.e. a stripped-down plasma implementation).
👏 If you enjoyed reading this piece leave us a clap (you can also leave multiple claps of course) or comment below. We are curious to hear your thoughts!
💬 If you are interested in learning more about our pre- & post-ICO services, email us: firstname.lastname@example.org
🔔 To get future updates you can also follow us on Twitter.
Written by: Lukas Schor of Argon Groupmedium.com
Written by: Lukas Schor, Lead Research at Argon Groupmedium.com
For ethereum 2018 is the year of infrastructure. This is the year when early adoption will test the limits of the…medium.com
Part I — Revisiting Ethereum & Digging Into Scaling Issuesmedium.com
Blockchain is helping alter supply chains for the better, and I spend a lot of time leading pilot projects for…medium.com
Today Vitalik Buterin and Joseph Poon released a working draft of Plasma project.medium.com
Highlights from EthCC on Plasma Cash, Minimum Viable Plasma, and More…medium.com