Skip to content

xxv-inc/plasma-contracts

 
 

Repository files navigation

Plasma Contracts

Root chain contracts for Plasma MVP, work in progress.

Contents

This version of the contract implements Plasma MVP (Buterin, Poon, Knott). This implementation is a PoA scheme with one operator and multiple watchers (users). Detailed description of our child chain design is in Tesuji document.

Implementation differs from MVP in few regards:

  • Added protection against chain re-orgs (omgnetwork/plasma-mvp#51).
  • Added collected fee exiting for PoA operator.
  • Added ERC20 handling.
  • Merkle tree used is of variable depth.
  • Transaction fee is implicit, not explicit.

Plasma MVP, confirmations, and MoreVP

While this implementation contains confirmations, this is a temporary state as we are going to replace confirmations with the exit game defined in MoreVP (Fichter, Jones) in the future. Reasons include:

  • Bad UX, need to propagate confirm sigs somehow.
  • Receiver can lie about receiving money; to prove sending, sender needs to publish confirmation to Ethereum.
  • Additional signature check per tx is needed.
  • No good way of doing partially signed transactions / atomic swaps.

Re-org protection

See here.

Protection of deposits against malicious operator, pending

Normally funds are protected by M(ore)VP mechanisms. There is an attack vector where operator spots large deposit in Ethereum mempool and produces a block to steal. If malicious block is mined before the deposit, deposit can be stolen. We are intending to use elevated exit priority for deposits so they always wait at most Minimal Finalization Period, while exit from fraudulent block will have to wait for Minimal Finalization Period + Required Exit Period.

Building and running tests

Installing dependencies needed for compilation:

make init

Installing dependencies needed to run tests:

make dev

Building and running tests:

make test

Running slow (overnight) tests:

make runslow | tee raport.txt

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Makefile 1.0%