The first CoinSwap on testnet - Massive improvements to bitcoin privacy and fungibility are coming

Imagine a future where a user Alice has bitcoins and wants to send them with maximal privacy, so she creates a special kind of transaction. For anyone looking at the blockchain her transaction appears completely normal with her coins seemingly going from address A to address B. But in reality her coins end up in address Z which is entirely unconnected to either A or B.

Now imagine another user, Carol, who isn't too bothered by privacy and sends her bitcoin using a regular wallet which exists today. But because Carol's transaction looks exactly the same as Alice's, anybody analyzing the blockchain must now deal with the possibility that Carol's transaction actually sent her coins to a totally unconnected address. So Carol's privacy is improved even though she didn't change her behaviour, and perhaps had never even heard of this software.

This undetectable privacy can be developed today by implementing CoinSwap. I've been working on implementing this for the last few months.

Today is a big day: the first multi-transaction CoinSwaps created on the bitcoin testnet.

The user (let's call her Alice) sent 0.05 tBTC split up over three transactions:

https://blockstream.info/testnet/tx/74a584b6ac8c1adb3cdbbe745fb50a75d9ba38072867452fa21a788629cc444e

https://blockstream.info/testnet/tx/adbd17a703d47783f681ea16e947d12d9b9a6855e3b393e4b384c527f0d91ede

https://blockstream.info/testnet/tx/493770838b8fae159e245eeb990d3dcb23b7a8357031d03d864b8272e8caea08

These transactions don't look particularly special (which is the point), but they are CoinSwaps. Following the CoinSwap protocol, those coins are transferred off-chain to the market maker Bob. Even though the coin are unspent at the time of writing, they are unilaterally controlled by Bob.

In return Bob sent coins back to Alice also in three transactions:

https://blockstream.info/testnet/tx/a5f76805a088aedff2e4cc49c6933d99883dcac447d1032a7530cf40cf49432e

https://blockstream.info/testnet/tx/6944b32f9a8388c5a0e706cdfd1f91ec4a8897a35476b4ccf536513894ade0d9

https://blockstream.info/testnet/tx/5334036eda24d265fc2adee37e52c9216a7e108b3ddbe7a550bd9f71d693349c

Bob sent 0.0499 tBTC to Alice, again with the CoinSwap protocol and so those coins are actually possessed by Alice now. The difference between 0.05 tBTC and 0.0499 tBTC is the fee which Bob earns to provide him an incentive (In the real world the fee would be set by market forces, the 0.001 tBTC used here is just an example).

This privacy protocol is non-custodial. Alice and Bob are not able to steal each other's money at any point in this process. Because of the low risk of theft we can expect market forces to push the CoinSwap fees down very low, in the same way that fees for creating CoinJoins today on JoinMarket are very low.

Using multiple transactions (three in this example) is needed to avoid amount correlation. Alice made a CoinSwap for 0.05 tBTC but nowhere on the blockchain is the actual value 0.05 tBTC found, instead any surveillance analyst spy would see the values 0.02919015, 0.01233641 and 0.00847344 for Alice and 0.01286471, 0.02457554 and 0.01245975 for Bob. Those numbers can be generated randomly using any algorithm, and the surveillance analyst spy would have a very hard time figuring out that the transactions are related at all.

These example CoinSwaps have a visible 2-of-2 multisig address. But the plan is to later use a protocol called ECDSA-2P which allows us to create 2-of-2 multisig addresses that look the same as regular single-signature addresses. This allows CoinSwaps to blend in with the rest of the bitcoin transactions out there. Even the old-style p2pkh addresses starting with 1 can be CoinSwap addresses.

CoinSwap is the next generation of bitcoin on-chain privacy tech. It improves on CoinJoin because it provides much greater privacy, and even improves the privacy of people who don't use it. CoinSwap also uses less block space and therefore is cheaper in miner fees.

The future of bitcoin privacy and fungibility is bright. I continue to work on this project every day.

Links:

submitted by /u/belcher_ to r/Bitcoin
[link] [comments]
Quelle: bitcoin-en