From: Chris Belcher <belcher@riseup.net>
To: bitcoin-dev@lists.linuxfoundation.org
Subject: [bitcoin-dev] Teleport Transactions: A CoinSwap implementation for Bitcoin
Date: Wed, 17 Feb 2021 22:27:28 +0000 [thread overview]
Message-ID: <5fcab0fc-6135-7587-7b3c-a314ccd099ca@riseup.net> (raw)
Suppose 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 bitcoin 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. 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.
In a world where advertisers, social media and other companies want to
collect all of Alice's and Carol's data, such privacy improvement would
be incredibly valuable. And also the doubt added to every transaction
would greatly boost the fungibility of bitcoin and so make it a better
form of money.
This undetectable privacy can be developed today by implementing
CoinSwap. The software could be standalone as a kind of bitcoin mixing
app, but it could also be a library that existing wallets can implement
allowing their users to send Bitcoin transactions with much greater privacy.
For the last few months I've been working on implementing this project.
Here it is:
https://github.com/bitcoin-teleport/teleport-transactions/
The project can create multi-transaction CoinSwaps (intended to avoid
amount correlation), and multi-hop CoinSwaps (intended to stop one
single maker being able to unmix a taker's CoinSwap).
Just for fun I created a 5-hop CoinSwap on testnet. Here are the
transaction IDs of each funding transaction. Each hop has 3 individual
transactions.
taker's outgoing txes:
https://blockstream.info/testnet/tx/f45349bd279bea20b8b218300f8e2416abf28f3858470ad8c5eb2f6cd5ec10a9
https://blockstream.info/testnet/tx/40ea5c9e478b66fa3f615c2b8d3accfd69308443d90a5353de669767cb02c51f
https://blockstream.info/testnet/tx/8fe245e9c433127af4df8ff8853650808e3281fed7de6bfda62066a3fd3ad36e
maker[0] funding txes:
https://blockstream.info/testnet/tx/3d9b879866ad136f9fe6e80599e1b97d610b6330be3ab4aa7df4161fce1e41d4,
https://blockstream.info/testnet/tx/fa11e778d135be28b4e35498fc668c5aba7c70dcc43334b39e7488bd1259e8be,
https://blockstream.info/testnet/tx/a7713452bab711c09be83a8c630fb91127771ed99cf15b528eacd28b00ba6b20,
maker[1] funding txes:
https://blockstream.info/testnet/tx/245e1e87d83a4bef06ceb8933c758137ee2f7ba7aa66800ebb7103707d5de5f7,
https://blockstream.info/testnet/tx/15727b91e09a80634587f6210bdcba8808b93e4a780c55dd113ee85314db45c4,
https://blockstream.info/testnet/tx/94e4e4e9e8fc2012158ed068145c8b883c295b37f5b3b6cba7a21c229d4da103,
maker[2] funding txes:
https://blockstream.info/testnet/tx/1384d58e534543e22e4f23a367728bff12177ee9af01b036c397cfca9bbe2eb8,
https://blockstream.info/testnet/tx/eff3b1367f403c13927ddcb01c6d3c5c0d46076f7cb4419f8a18d6b62d884540,
https://blockstream.info/testnet/tx/617c52caec2f7f17f3ebd1cab80233cdc1b414591f1cc49affbd828ffec10278,
maker[3] funding txes (also taker's incoming txes):
https://blockstream.info/testnet/tx/8fde61974a4e0801ae5b76b620e2effd6c837310c1bd76d738216451ae1226e3,
https://blockstream.info/testnet/tx/6491b85ef73a8f88e276a9b0f951c09e0367851a83aa49ffee8f8ad095f50de2,
https://blockstream.info/testnet/tx/363b6803b7e3ed45472277448ce9938e3e73167a67762d6a9ac621243b8db019,
The so-called taker organized the whole thing. They decided what the
CoinSwap amount should be (0.05 tBTC in this case), decided which makers
to route over depending on their fees, how many transactions and makers
there would be. The only thing the makers do is follow the protocol and
collect their CoinSwap fees, they are not meant to even know their
position in the route. Because the taker chose how much bitcoin to
coinswap and when, they paid a fee to each maker to provide an incentive
for the makers to keep the software running.
To a passive observer of the blockchain a single-hop CoinSwap is as
private as a multi-hop, so I suspect in practice most users will just
create 2-hop CoinSwaps.
The project is still a work in progress. All kinds of attacks are
possible right now, so the it shouldn't be used on mainnet with real
money yet. Also right now the CoinSwap addresses created by the project
appear as 2-of-2 multisignature addresses, but the plan is to use
ECDSA-2P which will make them look the same as regular single-signature
addresses which is needed before the thing massively improves privacy
and fungibility.
CoinSwap is the next generation of bitcoin on-chain privacy tech. It
improves on CoinJoin because it breaks the transaction graph, and even
improves the privacy of people who don't use it. CoinSwap also uses less
block space for the same privacy and therefore is cheaper in miner fees.
Links:
* Design document:
https://gist.github.com/chris-belcher/9144bd57a91c194e332fb5ca371d0964
* Discussion: `##coinswap` IRC channel on the freenode network
next reply other threads:[~2021-02-17 22:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 22:27 Chris Belcher [this message]
2021-02-21 23:28 ` [bitcoin-dev] Teleport Transactions: A CoinSwap implementation for Bitcoin Herman Puller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5fcab0fc-6135-7587-7b3c-a314ccd099ca@riseup.net \
--to=belcher@riseup.net \
--cc=bitcoin-dev@lists.linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox