On August 10, 2017, Vitalik Buterin and Joseph Poon released the first draft of the Plasma project. As the implementation of the Ethereum expansion solution approaches, we hope to study carefully what the plasma is actually.
FYI Plasma has some similarities to the Bitcoin Lightning Network.
What is Plasma?
Plasma is an extended scaling solution that helps Ethereum to achieve more transactions per second than it currently does. Like Bitcoin Lightning Network’s payment channel, Plasma is an offline transaction technology that secures security using the basic Ethereum blockchain. Therefore, plasma can be categorized as more and more “off-chain” technologies, including state channels and Truebit. When solving different problems, they take the operation out of the Ethereum “main chain” and execute them in “off-chain”. Nevertheless, these techniques are still sufficient to ensure a certain degree of security and finality.
Plasma accepts this idea even more by allowing the creation of “child” blocks associated with the “main” Ethereum blockchain. These child chains can even create their own child-chains, which can have another set of child chains, etc. Kind of like the movie Inception, Dream within a dream within a dream. Plasma is basically branched to one root chain block.
Ethereum continues to process smart contracts in the same way as current processing, but broadcasts completed transactions only to the public Ethereum chain. This can be thought of as a hierarchical side chain tree that periodically returns information to the main chain.
Because of this, a lot of complex operations can be performed on the subchain than on a pure chain, allowing developers to run the entire application with thousands of users. This plasma chain does not need to replicate across the Ethereum blockchain, so it can operate faster and at lower cost than the main chain.
Necessity of implementing Plasma
The practical application and feasibility of cryptocurrency in the future depends on the scalability of the technology. Unfortunately, in the current state, the volume of transactions that can be processed by the two major blockchains of bitcoin and Ethereum at a given time is still quite limited. This leads to a situation where one application can paralyze the entire network. A common example of how these constraints limit the competitiveness of blocks and centralized systems is a comparison with VISA. A typical credit card company handles up to 2,000 transactions per second, but Ethereum’s current limit is about 15 transactions per second.
Working of Plasma
Imagine you want to create a digital collectibles game on Ethereum. The collection will be an irreplaceable token for ERC 721, just like Cryptokitties, but this game has some features and attributes that allow users to fight each other – such as Shadow Fight 3. This complicated operation is expensive on the chain, so you decided to use Plasma instead of your app.
Initially, smart contracts were created on the Ethereum main chain. These smart contracts are the “roots” of the Plasma subchain. This main chain entry contains the basic rules of the child-chain/sub-chain, records the state hash of the child-chain, and allows the user to move assets between the Ethereum main chain and the child-chain.
After a child-chain is generated in the main chain, a child-chain is created. This child-chain has its own consensus mechanism that is independent of the Ethereum main chain. Lets use Proof of Stake (PoS) in this example. This consensus mechanism does not rely on miners to use electricity to run hash algorithms, but block producers are economically motivated to remain collateral to remain true, and these collateral can be destroyed in the event of fraud by bad actors. This consensus algorithm typically allows for faster block creation times than PoW.
Now initialize the sub-chain, you can set the basic rules of the game, deploy the actual game application smart contract on the child-chain, which contains all the game logic and rules. The collection is still ERC721 token, created on the Ethereum main chain, and then transferred to the child-chain using plasma roots.
Once the child-child is up and is ready for launch, the block creator periodically sends the validation to the main chain and verifies that the current status of the child-chain is in accordance with the consensus rules. When a user plays the game, they execute the application without direct interaction with the main chain.
How secure is Plasma?
Even in the case of 100% block production on a single entity control child-chain (according to the hash value of the consistency algorithm, bets, etc.), Plasma guarantees that each party can always extract its funds and assets back to the main-chain at any time. Therefore, even in the case of an attacker trying to control the network, the worst case is that they will force you to leave the child-chain.
The main security mechanism of the plasma is “plasma exit”. Plasma exit enables users participating in the plasma chain to stop participating in the chain and return funds to the main chain.
When users trade in the plasma chain and want to transfer their funds to the main chain, they submit “exit transactions” p.s. proof of their trading history that they have a certain amount of money. At that time, there was a “challenge period.” The challenge mechanism has emerged in most off-chain solutions, such as the Bitcoin Lightning Network. Basically, you allow anyone to question your claim by submitting proof that your claim is invalid or outdated (in Plasma, this can be a Merkle proof of trading history, on the Lightning Network channel, this can be from the other side Signed message).
Benefits of Plasma:
- Plasma will help the Ethereum blockchain handle larger data sets than is currently available.
- It enables a variety of compute-intensive applications to run on the blockchain due to the large increase in transaction capacity.
- It also speeds up transactions and allows distributed applications to run without worrying about backlogs. Only a very small number of nodes (ie, block producers) processes transactions. The cost can significantly lower and the operations can be faster.
- Plasma will eliminate unnecessary data in the main chain. This saves a lot of processing power and memory for the Ethereum node.
- Plasma is compatible with a variety of on-chain scaling solutions, such as sharding, various block sizes, and more.
- Plasma greatly improves the scalability of ledgers, enabling applications based on Ethereum to have higher data storage capacity.
Cons of Plasma:
The main problem associated with current plasma proposal is that, “what happens if everyone using a child-chain tries to exit the sidechain at the same time?” In the case of a large-scale evacuation, there may not be enough capacity on the Ethereum main-chain to handle the transactions of everyone during the challenge period, which means that users may lose money. Fortunately, there are many possible techniques to prevent this, such as extending the challenge period by meeting exit requirements.
When is Plasma going to be launched?
The plasma itself is at a very early stage. If you want to learn more about the current work of the Plasma, then you can check out Vitalik’s recent recommendations for “minimum viable plasma” (which is a compact plasma implementation).