@rahul-aztec thank you very much for commenting. You’re absolutely right, there are strong similarities between the basket and UTXO model.
About reorg: It works in the way that it takes a set of input baskets and “reorganizes” it to a set of output baskets under the condition that per tokenId, the sum of all basket values from the input set is equals the sum of all basket values from the output set. salt
is primarily used to increase the randomness of the basket hash, so brute-forcing the hash isn’t possible. I didn’t check it in details yet, but nonce is most probably not required since we can avoid replay by following some rules (to be exactly defined).
Moreover, you’re also right that the model used “naively” leaks some information. For instance, if we have the following situation:
A owns basket-a1{salt:<rnd-value>, tokenId:1, value:10}
A: transfer basket-a1 to B
B: transfer basket-a1 to C
the following information is leaked to:
- all observers: A is sending something to B & B is sending something to C
- A: would know what in basket-1 is, since he was in ownership of it, i.e., he would also know B has sent 10 to C
The second one can be solved by using reorg before sending for reshuffling the baskets.
Example with reorg:
A owns basket-a1{..., value:10}
B owns basket-b1{..., value:5}, basket-b2{..., value:15}, ...
A: transfer basket-a1 to B
B: reorg [basket-a1, basket-b1, basket-b2]
to [basket-b3{..., value:10}, basket-b4{..., value:10}, basket-b5:{..., value:10}]
where sum of inputs is the sum of outputs
B: transfer basket-b5{value:10} to C
Now A doesn’t know what B is sending to C, since the basket he sent to B has been reorg-ed together with his other baskets.
Note that we can also create baskets with value:0 to add more noise. Baskets with value:0 can also be sent to random receivers to overlay additional noise.
Example with reorg and null-value basket transfers:
A owns basket-a1{..., value:10}
B owns basket-b1{..., value:5}, basket-b2{..., value:15}, ...
A: transfer basket-a1 to B
B: reorg [basket-a1, basket-b1, basket-b2]
to [basket-b3{..., value:10}, basket-b4{..., value:10}, basket-b5:{..., value:10},
basket-b6:{..., value:0}, basket-b7:{..., value:0}]
where sum of inputs is the sum of outputs
B: transfer basket-b5{value:10} to C
B: transfer basket-b6{value:0} to D
B: transfer basket-b7{value:0} to E
Now still observers can see who is communicating with whom, but since there is noise introduced, they can not tell actually which of these transfers are real and which are noise.