Plasma Protocol Implementation

BANKEX technical team has developed the world’s first private blockchain that supports the Plasma Protocol for public audit.

Plasma is a system that can solve the scalability problem of the Ethereum network and ensure the volume of transactions comparable to centralized systems such as Visa and MasterCard.

Using different structures of blocks, transactions and consensus algorithm, Plasma can reduce the cost of transactions as well as make them faster, simultaneously having a “master” contract on the main Ethereum network that can enforce proposed transaction rules on private networks.

This makes it possible to combine the advantages of distributed systems such as the absence of intermediaries and the reliability of transactions and the with speed and low commission of centralized systems.

The solution provided by BANKEX can increase the transactions
to 100,000 per second with almost zero transaction cost

Why Plasma

Plasma concept is simultaneously a protocol for building blockchains that can are supervised by some upper blockchain (in our case - BANKEX Plasma is supervised by the main Ethereum network) and a possible solution to scalability problem.

Here at BANKEX we believe that efficiency can be improved by offloading some transactions from Ethereum blockchain to Plasma chains, especially if proper incentives are given to Plasma operators (such incentive can we even in a form of completing with other operators for obtaining end-users). Another advantage is the flexibility of Plasma chain implementation as long as it can be effectively cross-checked by contract on a parent chain. With new cryptographic primitives added in Metropolis fork one can extend our PoC implementation with transactions utilizing ring signatures of zkSNARKs for privacy of end user.

Plasma Network Technical Concept

From the technical point of view, Plasma blockchain is just another blockchain, which can be efficiently settled on the parent Ethereum chain. It is well protected by the smart contracts on Ethereum from the misbehaviors of both Plasma operators and Plasma blockchain participants.

Plasma chain itself has very simple structure that allows ETH to be transferred between users in a form of Bitcoin-like unspent transaction outputs (UTXOs). All transactions have inputs and outputs. There are few types of transactions which depend on the required functionality, and in our PoC we used a standard set: “Split” to send parts of your UTXO to some parties (including self), "Merge" to merge two inputs into one output to reduce number of UTXOs that client needs to scan and cache, “Transfer” to transfer output in full, “Fund” and “Withdraw” for depositing ETH from the main network and withdrawing. Full description will be given when the design is more stable. All chain logic is made using Ethereum crypto primitives - sha3, secp256k1 and 65 byte signatures allowing use of ecrecover, so “master” contract on the main Ethereum network can enforce the rules when necessary.

To allow the “master” contract on the main Ethereum network to do proper job, headers of blocks are submitted by operator with the following structure where ParentHash references previous block (by number), MerkleTreeRoot is root hash of a Merkle tree for all transactions in this block, Number of Transactions is total number of transactions in this Plasma block.

A header is submitted by Plasma network operator to the smart-contract on Ethereum chain. Blocks can only be sent one by one, in a sequence enforced by the contract. Any user of Ethereum network can deposit ETH to a contract that will trigger an event and allow (and force) Plasma network operator to make a funding transaction in Plasma chain. Then the users can make transactions freely in Plasma chain with only headers being pushed to the parent contract on Ethereum.

When a user would like to settle one of his transactions in the main network, he/she can make a withdraw on Ethereum by providing a reference number to the transaction. (in a form of BlockNumber, TxNumberInBlock, OutputNumberInTX), full transaction and Merkle proof to prove if this transaction is really included in the block and he/she is a legitimate owner. Parent contract checks a proof versus submitted root hash for this block and if it passes, the withdraw process will start. The process can be finalized in 24 hours. There is a special kind of transaction in Plasma network that can accelerate the process by effectively burning the input (sending it to 0x0). If this block is not published by operator, withdrawal can go as normal, but take 24 hours instead of minutes.