1

Is the following correct?:

If I received 5 XMR from Bob, then I wanted to send this 5 XMR to Alice.

Would I create a tx with the input as the 5 XMR from Bob with one output as 5 XMR to alice. Then look for another tx, fetch K inputs and outputs from that tx along with their public keys.

Then add those K inputs as inputs to my tx, along with the corresponding outputs for them. Because if we do not fetch the outputs, then inputs-outputs-fees != 0 and it would be rejected.

The tx is then signed with the ring signature using fetched keys + signer as the ring.

Interim Question: What is stopping me from fetching old inputs plus my own fresh input, then creating new outputs of my choosing, which spend the old inputs + my own? It would be valid since the keyImage I use will be the one for my new input, while the total would add up to my input + old inputs

WeCanBeFriends
  • 670
  • 3
  • 7

1 Answers1

1

Then look for another tx, fetch K inputs and outputs from that tx along with their public keys.

You simply find decoy outputs from anywhere on the blockchain. You'd never only choose decoys from a single transaction.

Then add those K inputs as inputs to my tx, along with the corresponding outputs for them

There is no need to match inputs and outputs from other transactions. The ring signature proves that for at least one combination of inputs, the inputs balance out with the outputs and fees.

knaccc
  • 8,518
  • 17
  • 23