0

Vitalik Buterin proposed Minimal Viable Plasma in 2018. When describing the functionality, he mentions the format of a UTXO plasma transaction to be

[blknum1, txindex1, oindex1, sig1, # Input 1
 blknum2, txindex2, oindex2, sig2, # Input 2
 newowner1, denom1,                # Output 1
 newowner2, denom2,                # Output 2
 fee]

This structure leads to a misunderstandings for me, which I think is best illustrated by an example:

Assume Alice owns 1 ETH and wants to send 1 ETH to Bob, who owns 4 ETH. We assume the transaction does not require any fees. She received 1 ETH from Charlie in the first (0-indexed) transaction in Block 3, where her output was 2nd. Therefore, she fills the input 1 field with (3, 0, 1, [signature of the previous 3 values with Alice's key]). Alice's second input is empty, as she does not need it to complete the transaction to Bob. The Plasma transaction Alice sends is therefore:

[3, 0, 1, (Alice's signature), # Input 1
 0, 0, 0, 0, # Input 2
 [Alice's Address], 0,                # Output 1
 [Bob's address], 5,                # Output 2
 0]

However, what happens if Alice wants to send 1 ETH to Bob, but got this through 3 transactions e.g. 0.2 ETH from Sender 1, 0.3 ETH from Sender 2 and 0.5 ETH from Sender 3? The field only allows for 2 inputs, but no combination of size 2 consisting of Alice's UTXO's allows for this, how is this addressed?

2
  • A better forum this this question might be ethresear.ch Commented Nov 21, 2021 at 9:43
  • I'm not sure, as etheresearch is mainly for introducing new ideas and the issue I'm asking about here was last actively discussed in 2018.
    – user49342
    Commented Nov 21, 2021 at 9:48

1 Answer 1

0
+50

How does Minimal Viable Plasma handle more than 2 inputs for a transaction?

As per my understanding, it doesn't. That's why it's only the Minimal Viable specification.

"Each transaction has 2 inputs and 2 outputs, and the sum of the denominations of the outputs plus the fee must equal the sum of the denominations of the inputs."

However, what happens if Alice wants to send 1 ETH to Bob, but got this through 3 transactions e.g. 0.2 ETH from Sender 1, 0.3 ETH from Sender 2 and 0.5 ETH from Sender 3? The field only allows for 2 inputs, but no combination of size 2 consisting of Alice's UTXO's allows for this, how is this addressed?

In that situation, ALICE has 3 UTXOs, so she could send a first transaction combining two inputs (2 out of her 3 UTXO's) into a single output sent to her address. She would then be left with only 2 UTXOs that she can combine in a second transaction to BOB for a value of 1 (assuming that fees are 0).

Similarly with >= 2 outputs you can split an input, this is especially usefull when you need to pay an amount X but only have one UTXO with a value greater than X, you can then split it into 2 outputs, the first one of value X to the address you are sending, and the second one is the change that goes back to your address directly.

Your Answer

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