rgb-archive / spec

[OLD!] RGB Protocol specifications for Bitcoin-based digital assets
https://rgb-org.github.io/
148 stars 26 forks source link

No support for spending single RGB output from the proof #94

Closed dr-orlovsky closed 5 years ago

dr-orlovsky commented 5 years ago

In the current spec the proof can contain multiple outputs with different amount of RGB assets in each. However, the input part of the proof references the whole previous proof which it spends, not a particular proof output. Thus, if Alice sends 1000 USD₮ to Bob and 500USD₮ to Carol, both Bob and Carol can't spend their own assets without spending assets of the other party.

The same is true for the original librgb code. Am I missing something?

inaltoasinistra commented 5 years ago

The assets are binded to the UTXO, not to the proof. The input array inside the proof refers to the whole proof, but the bitcoin transaction spends the UTXO.

Bob and Carol will use the same proof, but they spend different UTXOs, so different assets

dr-orlovsky commented 5 years ago

Correct, sorry, it was a silly question