Bitcoin Privacy Through Lightning Network Swaps
Coinjoining on L1 is a bit of a pain. Talking about JoinMarket, it takes a long time, you end up with a lot of "toxic" change, and you pay a lot of fees on the way.
But there's a way to "instantly" swap a UTXO for another that's completely unrelated, and without anyone else but you knowing what went on.
So, how do you do that?
Visual Process Overview
Step 1: Setup Double Swap
┌─────────────────┐ ┌─────────────────────┐
│ Your UTXO │ │ Target Address │
│ (Original) │ │ (Clean Bitcoin) │
└─────────────────┘ └─────────────────────┘
│ ▲
│ │
▼ │
┌─────────────────┐ ┌─────────────────────┐
│ SwapMarket │ │ Boltz.exchange │
│ (BTC → LN) │ │ (LN → BTC) │
└─────────────────┘ └─────────────────────┘
│ ▲
│ Lightning │
└────────Invoice──────────┘
Privacy Layer: Two separate providers = No single party
knows the full transaction path
Step-by-Step Process
Open:
- In Boltz, choose LN→Bitcoin and set the destination Bitcoin address and the final amount. Let's say 1M sats.
- Create the atomic swap and copy the LN invoice that they generate with their fees, currently 1,006,091 sats.
- In SwapMarket, choose another provider other than Boltz (e.g., Middle Way) for Bitcoin→LN.
- Paste the LN invoice that you've got from Boltz. You will see the amount that you need to send in L1 (LN invoice amount+their fees). In our example 1,007,651 sats.
- Create the atomic swap and copy the destination Bitcoin address and amount.
- Send the transaction and wait approximately two blocks. You should receive 1M sats in your destination Bitcoin address.
Cost & Privacy Analysis
This costs ~0.7% and takes just two blocks. The anonymity set is decent if you choose common amounts such as 100k, 1M, 5M, 10M sats.
Why this provides privacy:
- Boltz doesn't know who paid them the LN invoice
- Middle Way doesn't know what Boltz does with the funds from the invoice paid
- The rest of the world has even less clues of what happened
Advanced Privacy Considerations
Of course the privacy would increase a lot by waiting a few blocks between the swap in and the swap out of LN. But that would require a node and at least Middle Way would know that there's a relation between the input in L1 and the destination LN node pubkey. If you wrap the invoice with lnproxy then you're golden. But yeah, you need a LN node for that. The proposed approach previously focuses on simplicity.
Needless to say, you do all this through Tor.