3

In plasma cash, if Alice sends the same coin to both Bob and Charlie and they both try and cash out, who gets the coin?

Does the plasma sidechain have to periodically commit its plasma blocks to the mainchain to avoid this situation? If yes doesn't that mitigate all the supposed speed benefits we get from Plasma cash?

2 Answers 2

1

Alice buys a car from Bob for 10 ETH.

Let's imagine:

  1. Alice moves 10 ETH to Bob. New tx in Plasma chain is created
  2. Plasma Operator packs all new TXs into the Merkle tree
  3. Plasma Operator calculates the Merkle Root and posts it on-chain (mainnet)
  4. Alice (by looking in the plasma chain) generates a Merkle proof and compares the root with the Merkle root.
  5. Bob (by looking in the plasma chain) generates a Merkle proof and compares the root with the Merkle root. Everything is good and he transfers his car to Alice.

--Here we have a chain reorg / "double spend" attempt by Alice+Operator --

  1. Plasma chain is reverted and Alice sends her 10 ETH again, now to Charlie

  2. Plasma Operator packs all new TXs into the Merkle tree

  3. Plasma Operator calculates the Merkle Root and posts it on-chain (mainnet)

  4. Alice (by looking in the plasma chain) generates here Merkle proof and compares the root with the Merkle root.

  5. Charlie (by looking in the plasma chain) generates here Merkle proof and compares the root with the Merkle root.

  6. Now Bob wants to withdraw his 10 ETH. He provides his Merkle Proof on chain which is correct (for the block 123). He will have to wait for 7 days.

  7. But Charlie also wants to withdraw his 10 ETH. He also provides his Merkle Proof on chain which is correct but (for the block 124). Plasma contract should take into account that BOB's block happened earlier. So he gets his money. Unfortunately Charlie is with nothing

0

So yes, the side chain does need to continuously post updates to the root chain. The sidechain submits the Merkle root of each plasma block to the root chain. When someone wants to withdraw his assets from the plasma contract he submits the transaction in which he received the asset as well as the Merkle proof for it.

In terms of speed, it does depend on how often the sidechain updates the root chain. Before the plasma block has been submitted, it is possible for a double spend to happen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.