What Is A Bitcoin CoinSwap?

Bitcoin Coin swap

Share this article

Using bitcoin means you’re conducting your business out in the open; when you transfer funds, every person with a node or access to a block explorer can track your transactions. They might not know what it all means or the extent of your transactions, but with some clever overlay tracking, chain analysis firms can quickly start to follow the breadcrumbs you leave on the bitcoin network.

We live in a data-driven world, and information has become as valuable as any commodity. All types of data can be collected and processed to be sold for profit and at the top of all data collection has to be financial data.

The exchange of value is what makes trade and modern life possible, but it has been historically governed by middlemen who watch over it all and extract their share at various intervals.

Bitcoin disintermediates these institutions like banks, payment providers and of course governments, and when you come after their revenue, they’re not exactly going to take it lying down.

The growing eyes of big brother on bitcoin

So you can imagine that if someone can offer institutions the ability to track bitcoin transactions and attribute it to individuals so they can be taxed or restricted, that information would become very valuable, and companies would race in to try and dox as many people as they can for a profit.

These spy tech companies promote the growing encroachment on financial privacy, deterring people from using bitcoin. So the need for the bitcoin network to evolve is evident; we now have so many data points outside the blockchain we cannot fully eliminate, so breaking ties within the blockchain is the name of the game when looking to improve privacy.

CoinJoins have been a popular medium, while other methods like stealth addresses and CoinSwaps have also been proposed to add new privacy tools to a bitcoiners kit.

What is a coinswap?

Coinswap is a separate protocol that allows two or more users to create a set of transactions that look like independent payments but actually swap their coins with each other, optionally making a payment in the process. Having the option to Coinswap when conducting a transaction improves the privacy of not just those coinswap users but all Bitcoin users, as anything that looks like a payment could have instead been a coinswap, no one could tell the difference looking at the on-chain data. 

Coinswaps are often compared to coinjoins, but the two are different, and coinswaps have fewer restrictions on them than coinjoins. 

From a technical standpoint, a key difference is that a coinjoin uses a single transaction, but a coinswap uses two or more transactions. Although it’s possible for a coinjoin to look like payment batching, they can be fairly easy to identify on-chain—and some Bitcoin exchanges have refused to accept coins that have a recent history of coinjoining. 

Coinswaps look like payments, so they may be harder to discriminate against and blacklisted. Coinswaps may also be performed across different blockchains and side chains —often under the name atomic swap—but that’s not possible with a coinjoin.

To ensure that coinswaps either successfully swap funds or any unswapped funds are refunded, they need to use a locking mechanism such as an HTLC or a PTLC.

How CoinSwap works?

To clear out the technical talk and give you an easier understanding of how a CoinSwap works, let’s look at a simple example between two parties, Alice and Bob (A bitcoiners favourite guinea pig).

Both Alice and Bob send a UTXO to separate 2-of-2 multi-sig addresses. These two transactions are completely separate and could be sent at different times and could be different amounts, so the two transactions should not be linkable by chain analysis.

Next, Alice and Bob cooperate to spend the bitcoin from both multi-sig addresses to each other. The bitcoin Alice sent to her multi-sig address will be sent to an address belonging to Bob, while the UTXO Bob contributed will be sent to Alice.

At the end of this process, Alice and Bob will each control the same amount of bitcoin—minus the transaction fees—and will have superior privacy.

Why CoinSwaps improve privacy?

CoinSwaps avoid the correlation of quantities between its parts. If someone wants to change BTC, their transactions can be sent in several operations in order to break with that correlation scheme of operations and amounts. Adding additional doubt into the possession of coins means no analysis will be able to establish a relationship between our operations and our privacy improves.

  1. No single point of trust. CoinSwap has been designed to be a completely decentralized protocol where the only parties involved are those who perform the exchange.
  2. Easier to use with multiple values. The combination of multiple transactions with routing and multi-transaction make it easier for CoinSwap when compared to CoinJoining at a set transaction amount. 

Strengths of CoinSwap

CoinSwap presents several benefits as technology and protocol are applied to Bitcoin and used in conjunction with second-layer solutions. 

  1. It offers a very high level of privacy, which rivals and even exceeds that of CoinJoin, by solving several problems of the latter.
  2. CoinSwap operations are more difficult to track. This is because these would not differ in any way from a normal bitcoin transaction.
  3. Its ability to mix sources of funds between centralised, decentralised way, P2P and decentralised exchanges (DEX) and mix up history improves fungibility. 
  4. It is a system that does not require changes over the Bitcoin protocol and is easily adaptable to the network, so there is no need for major upgrades. 

Weaknesses of CoinSwap

CoinSwaps, like every other protocol, has its limitations, and it’s not perfect; it has several weaknesses, which would undermine privacy and even cause you to lose your funds.

  1. If two users send each other equivalent amounts of money with the intention to CoinSwap, chain analysis might be able to match the amounts across the different transactions and deduce that a CoinSwap has occurred. In order to prevent this, the CoinSwap can be split into several transactions, obfuscating the total amounts sent by each party.
  2. Additionally, a hypothetical CoinSwap market is ripe for denial of service (DoS) attacks and eclipse attacks. In a DoS attack, an attacker can repeatedly initiate a CoinSwap with an honest participant and halt it midway, forcing the victim to pay on-chain fees without reaping the privacy benefits. 
  3. Attackers can sucker users into a false sense of security by using CoinSwaps and trick users into thinking they have established privacy when they have simply been executing one or more CoinSwaps with the same observer, who can then deanonymise the victim’s coins.
  4. CoinsSwaps is a highly interactive protocol, the operations between the parties are multiple, and this requires additional bandwidth over the network.
  5. CoinSwaps depend on whether the information on the participants’ nodes is accurate. If the nodes for some reason are not well synchronised or are even victims of some attack, a CoinSwap might not be entirely safe. You shouldn’t conduct CoinSwaps unless you’re running a node yourself and should not trust third party nodes as many do with day to day wallet transactions. 

CoinSwaps are another layer of privacy tech

CoinSwaps are an incredibly powerful privacy tool because they help break ties with addresses and UTXOs and provide an additional layer of anonymity. However, any additional level of anonymity comes with additional complexity that may turn away some users. Until technology like this becomes a default option within wallets, people will continue to consider privacy as a non-priority until it’s too late.

As the bitcoin privacy tech stack continues to improve, and we get more options, it will make chain analysis harder and reduce the ability of governments to issue outside control over touchpoints of the bitcoin network.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

BTC ZAR Escape Hatch

Bitcoin The South Africans Escape Hatch

South Africa is becoming a hotspot for Bitcoin adoption; with a high internet penetration rate and a population looking for alternatives in an economic climate

Pros/cons LN banks

The Pros & Cons Of Lightning Banks

Xapo Bank’s recent integration of Bitcoin deposits through the Lightning Network (LN) marks another step towards the adoption of Bitcoin by tradFI. For some strange reason, this dirty

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.