The security premise of blockchain distributed ledgers is that they constitute a system where everyone verifies everything, similar to how polygraph lie-detector machines operate – replicating the same output in several databases. However, as blockchains and the cryptocurrencies they sustain grow in popularity and adoption picks up, such an arrangement cannot adequately scale and requires significant rethinking in the context of increasing transactional capacity to accommodate growing demand and prove a viable public service on a global scale.
Scalability has thus become the main focus of discussion, effort, and experimentation in regard to the blockchain paradigm of architecting distributed ledger systems. Both Bitcoin and Ethereum have already accumulated significant amounts of value they store and secure within their respective systems and have formed the largest consensus networks and most powerful computational resources in history to date.
The approaches to scaling blockchains broadly fall in two categories: first and second layer solutions. The first layer, or so-called on-chain scalability solutions, involve the rearchitecting of the base layer and the protocol level of how the entire system operates and coordinates itself. In Ethereum, those include sharding and the transition from Proof of Work to Proof of Stake consensus – that is, switching the role of miners to one of validators or from a proof of resource to “proof of what one stands to lose should he misbehave and/or attempt to sabotage the system.”
Second layer solutions on the other hand utilize the base layer as it is, extending its functionality. With Bitcoin, this is the Lightning Network – an extended network of payment channels that engage the Bitcoin blockchain only in cases of dispute or the opening or closing of channels between transacting parties. Raiden is an analogous solution for Ethereum, but one seemingly much easier to implement given Ethereum’s smart contracts capabilities and the using of the remove two-phase confirmation in MVP, providing for simpler transaction finality blockchain as a component of a more general computational framework.
Joseph Poon, who co-authored the Lightning Network paper, further expanded on and refined the concept with Plasma on Ethereum, resulting in the conditioning of an entire new design space with its own slightly different dynamic. Plasma constitutes a mechanism for scaling the blockchain by branching off side-chains within a main chain smart contract – it is not a specific implementation, but rather a set of protocols and guidelines enabling the easy deployment of layer two sub-chains connected to the overall jurisdiction of the main (or, in the language of Plasma, root) chain. Second layer solutions generally rely more on crypto economic arrangements rather than fundamentally re-engineering the system at the core.
Presently, there are a number of basic Plasma prototype implementations: Minimal Viable Plasma (MVP), Plasma Cash and Plasma Debit. It must be understood that Plasma is an application-specific approach where side chains are constructed on a per use-case basis. Loom Network is one group actively engaged in designing DPoS side chains for large scale gaming and social networking applications. Omise Go and BankEx are other projects that make use of variants of Plasma customized to their own specific needs.
A key property of Plasma chains is the so-called exit mechanism that allows users to abandon the chain and withdrawal their funds on to the main chain should anything go wrong. This keeps parties and central actors in check by making it easy for honest parties to provide solid proofs about the ordered history of transactions and quickly challenge illegitimate withdrawals on-chain.
Minimal Viable Plasma
Plasma MVP is an UTXO (Unspent Transaction Output) chain, a model popularized by Bitcoin. The Ethereum main chain is itself a balance-based accounts chain. UTXO chains are best suited as settlements blockchains, but unsuitable for more complex, stateful applications like the DApps smart contracts enable. UTXOs basically constitute stateless objects designating spendable coins as remainder transaction outputs that only the person who owns them has the key for spending them.
MVP allows for the creation of arbitrary units of PETH (Plasma Ether) and also removes the need for two-phase confirmations, providing for simpler transaction finality resulting in increased throughput. The UTXO model furthermore makes both exits and fraud proofs much easier, significantly reducing complexity – one could just exit with his unspent tokens.
Sketch of how Bitcoin UTXOs are structured.
MVP is also a proof of authority chain, similar to the Kovan testnet. PoA consensus generates faster transactions since transactions are validated and blocks produced by a number of authorized accounts or nodes with their reputation at stake. In MVP, the Plasma operator is a constrained central actor under the higher authority of the Ethereum public main chain.
Implementing Plasma is fairly straightforward. Omise Go’s implementation of Plasma MVP includes a Solidity root chain contract with a deployment script, a Python implementation of a Plasma client (similar to what Geth or Parity are for Ethereum itself) and a Python wrapper for the child chain API.
Plasma Cash: Unique Coin Identifiers
The Plasma Cash prototype iteration involves assigning unique token identifiers to deposits, making the transaction history stored in such a way that users need to only process the subsections of the Merkle tree storing their transactions, without the need to go through the entire chain. This is done by assigning the IDs to slot indices (or leaves) on a sparse Merkle tree (called ‘sparse’ because most leaf nodes are empty).
A Merkle tree is a compact data structure that blockchains employ as the layout for ordering transactions in blocks.
Plasma operators can now simply isolate the history of the relevant tokens with their unique ID, making the whole process more efficient for applications such as exchanges. Converting a coin’s ID to its binary notation (of zeros and ones) translates to the Merkle path to the valid transaction in its respective “slot” on the sparse Merkle tree. This form of sharded client-side validation allows for much less data that needs to be verified per user. When the history of a coin becomes too large to transact, it gets checkpointed or cryptographically stamped with guarantee of economic finality.
Plasma Cash essentially allows owners to transfer assets to the side chain while keeping the original value secure on the Ethereum mainnet, where accountability takes place. All this makes Plasma cash especially suitable for applications such as decentralized exchanges, as already noted, since the operator’s role is limited to one of an order matching engine, while users are in possession of their private keys to the assets they own (operators could only temporarily interrupt service by withholding blocks, but they still stand to lose more than they could potentially gain). Should anything go wrong, users could always resort to the exit procedure and get their money out on the root chain.
Another distinctive feature of Plasma Cash is that it allows for significantly larger blocks and therefrom, coupled with the sparse Merkle registry of coins traceable via the assigned serial numbers, greatly increased scalability and capacity to efficiently handle streams of transactional activity in volumes much larger than what we have so far been accustomed to.
One early implementation with support for ERC-721’s is Loom’s. Loom Network is dedicated to designing Plasma DPoS (Delegated Proof of Stake) side-chains for large scale gaming and social applications – a bit like EOS, but subordinate to Ethereum.
Plasma Debit: Plasma Cash With Partial Balances
Since Plasma Cash is not fully fungible as it is, Plasma Debit is a construction that extends Plasma Cash to allow for partial payments and divisibility. Plasma Debit coins are essentially equivalent to bidirectional payment channels between coin holder and chain operator, but with regular on-chain notarization. With Plasma Debit participants can join the network without having to do an on-chain transaction.
The proposed Plasma design space for custom Ethereum side-chains seems to offer a lot of flexibility as to how one could feasibly organize a growing blockchain economy, such that entire ecosystems could differentiate themselves from Ethereum, while inheriting the security and decentralization guarantees of the main chain. It can be conceived as Merkle trees within similarly arranged hierarchical trees of chains type of construction.
Plasma also makes use of MapReduce, one of the core tricks in distributed computing originally invented by Google. MapReduce provides a framework for high scale computation across thousands of nodes, formulated as complementary functions of mapping and reducing big data into smaller chunks between states and across chains (easily representing state transitions as hierarchical trees, in line with the overall basic rationale of Plasma).
MapReduce format computations in Plasma.
It seems to also allow for constructions with implications for interoperability, as a meta-chain connecting two layer 1 chains – for example, Ethereum and Ethereum Classic (given also their common origin and similarities).
Smart contracts are something in an early phase of thinking out ways in which that could be implemented safely. Since the current Plasma prototypes utilize the UTXO model as the network’s means of expression, it is not yet clear how exactly will smart contracts (i.e., EVM-compatible computations) be implemented, but there’s a number of suggested ways, like for example modifying the Truebit VM to take EVM calls, standardizing an accounts-based Plasma or modifying a Plasma version of the EVM.
Some of the groups invested in the research and development of Plasma chains for their specific applications are, as already mentioned, Omise Go (the well-known Southeast Asian payments processor), BankEx (an organization and a fintech company working on the provision of tokenization services and the liquidity assets require in order to unlock their true market value) and the Loom Network (famous for their CryptoZombies interactive Solidity tutorial). A Rinkeby testnet demo of BankEx’s implementation can be tried out at plasma.bankex.com and the parent main/root chain Solidity contract can be seen here.
CryptoZombies is an interactive Solidity course teaching beginners how to construct their own game from scratch.
Ethresear.ch is the official semi-public board for all things Ethereum research and the go-to place for up-to-date information regarding the main departmental areas encompassing Ethereum, as well as the place to suggest proposals and participate in competent discussions that often shed a lot of light on the subjects they address.
In short, Plasma appears to be a reasonable approach to the scalability matter that might establish itself as a fruitful ground for further developments and experimentation and it appears to be fairly straightforward to work with, making it accessible to wider audience of users and adopters who wish to take advantage of the benefits of permissionless public blockchains like Ethereum.