Plasma MVP investigation

Victor Yeo
2 min readJan 29, 2019

--

Plasma MVP is an implementation of minimal viable plasma, at https://ethresear.ch/t/minimal-viable-plasma/426. It is available on github, at https://github.com/omisego/plasma-mvp.

Plasma MVP consists of three parts, a command line client application, a json rpc plasma chain application, and a root chain contract that is deployed in ethereum blockchain.

This is a high level diagram that shows the interaction of client application, plasma chain application, and root chain contract.

To bring the transaction off chain, the client application makes a deposit to the root chain. The root chain then sends a callback (via solidity event) to plasma app. When plasma app is notified, it will create corresponding block in plasma chain.

To send a plasma transaction, the client app calls sendtx command, specifying the two new owners of the two amounts. There is validity checking, the input amount must not be less than the output amount.

To confirm the transaction, the client app calls submitblock command. The command will add merkle root of the transaction in a block to root chain.

To withdraw the funds that is locked (during deposit), the client app calls the withdraw command. It will start the exit procedure for the given UTXO.

To finalize the exit, the client app calls the finalize_exits command. It will adds the exit amount back to the current exit owner.

Command line example:

# deposit 1 million wei to account address

omg deposit 1000000000 0xfd02EcEE62797e75D86BCff1642EB0844afB28c7

# create a plasma transaction and use it to send amount to two account address

omg sendtx 1 0 0 0 0 0 0x0 0xfd02EcEE62797e75D86BCff1642EB0844afB28c7 50 0x4B3eC6c9dC67079E82152d6D55d8dd96a8e6AA26 45 <priv_key>

# add a block in plasma chain, and submit the block to root chain

omg submitblock <priv_key>

# withdraw the block to root chain, 1000 is the block number created during submitblock

omg withdraw 1000 0 0 <priv_key>

The plasma MVP is able to scale payment. Is it able to scale smart contract ? On investigation, it requires modifications to scale smart contract.

One reason is due to the plasma MVP exit mechanism.

The plasma MVP handles exiting with owner account and amount. To be able to scale smart contract, it requires the code to be able to handle custom smart contract variables.

--

--

No responses yet