JoinMarket-Org / joinmarket

CoinJoin implementation with incentive structure to convince people to take part
398 stars 119 forks source link

Mixing without cj (payment channels) #385

Open inaltoasinistra opened 8 years ago

inaltoasinistra commented 8 years ago

Hello folks! I was thinking that JM could provide the infrastructure to mix coins without cj. Would be possible use payment channels to exchange bitcoins with a maker without link the coins inside a unique tx. This is possible using 2 unrelated sources of coins (we could use 2 different mixing depth, or we can create a special mixing depth which is never coinjoined, in order to do not link these coins to JM at all).

The 2 parties create a multisign address 2/2 and fund it (e.g. .01Ƀ the maker A and .02Ƀ the taker B).

(If one of them does not fund the multisign address the other loose that money. Am I right? There is a way to avoid this? CHECKLOCKTIMEVERIFY can help here?).

After the confirmation of the 2 transactions the 2 parties exchange their coins off-chain at small steps (steps size is computed from the amount of coins inside the warranty address. Game theory is used to create a loss to both parties if the process is interrupted).

When the coins are exchanged the 2 transactions are broadcasted to the network. A and B exchanged coins without linking them together.

Now they collaborate to get their coins back from the multisign address. They adjust the outputs in order to pay the fee. Example: A funded .01Ƀ and B .02Ƀ. The new tx gives .02Ƀ to A and .01Ƀ to B.

All the process could be implemented into JM.

chris-belcher commented 8 years ago

I've always understood coinswap as the same thing as payment channels but done with privacy in mind instead of micropayments, if so then the issue is #335