This page assumes a basic level of familiarity with Plasma and Ethereum smart contracts.
This Plasma implementation uses FourthState’s plasma-mvp-rootchain as its backing smart contract. As its name implies, it’s a variant of the Minimum Viable Plasma construction. At a high level, this means the following:
- The Plasma sidechain (or “child chain” as some call it) is a UTXO-based blockchain in which a single node is designated as the ‘authority.’ The authority node has the ability to package transactions into blocks and commit their Merkle root to the Plasma smart contract.
- Each transaction has a maximum of two inputs and two outputs.
- Exits can be initiated at any time.
- Initiating an exit starts a challenge timer, during which a transaction spending the UTXO can be provided to the smart contract in order to invalidate the exit.
- Exits are placed into a priority queue that ensures that the most recent UTXOs can be finalized first.
- If nobody challenges the exit during the challenge period, the user can finalize the exit and get their funds out of the Plasma smart contract.
FourthState’s contract provides a number of additional features that improve security and scalability. Specifically:
- Deposits can be spent by providing a ‘deposit nonce’ as one of the inputs to a Plasma transaction. This allows deposits to be spent immediately, without waiting for the authority node to mint a block specifically for the deposit. It also allows multiple deposits to be spent in a single Plasma block.
- Exits must post a bond that exceeds the gas cost of challenging an exit. If an exit succeeds, the value of the bond is provided to the party that successfully challenged the exit. This disincentivizes users from posting bogus exits and incentivizes validators to challenge when necessary.
- Transactions cannot be spent by a recipient until a set of ‘confirmation signatures’ are provided by the sender. This simplifies the exit game, and provides positive confirmation of a particular transaction’s inclusion in a block.
Kyokan is funding a security audit of the
plasma-mvp-rootchain smart contract. Authio is currently conducting the audit, and is scheduled to provide their final report by the end of February 2019.