Post
Topic
Board Development & Technical Discussion
Re: How did Charlie Lee do the LTC/BTC atomic swap?
by
DougM
on 08/11/2020, 12:59:19 UTC
Thanks  ChiBitCTy for the link.  I never heard of it before, but your link above provided good insight. In case anyone is equally clueless here is the highlights from the link:

Quote
Decred-compatible cross-chain atomic swapping
This repository contains utilities to manually perform cross-chain atomic swaps between various supported pairs of cryptocurrencies. At the moment, support exists for the following coins and wallets:

Bitcoin (Bitcoin Core)
Bitcoin Cash (Bitcoin ABC, Bitcoin Unlimited, Bitcoin XT)
Decred (dcrwallet)
Litecoin (Litecoin Core)
Monacoin (Monacoin Core)
Particl (Particl Core)
Qtum (Qtum Core)
Vertcoin (Vertcoin Core)
Viacoin (Viacoin Core)
Zcoin (Zcoin Core)
..
These tools do not operate solely on-chain. A side-channel is required between each party performing the swap in order to exchange additional data. This side-channel could be as simple as a text chat and copying data. Until a more streamlined implementation of the side channel exists, such as the Lightning Network, these tools suffice as a proof-of-concept for cross-chain atomic swaps and a way for early adopters to try out the technology.
...
Theory
A cross-chain swap is a trade between two users of different cryptocurrencies. For example, one party may send Decred to a second party's Decred address, while the second party would send Bitcoin to the first party's Bitcoin address. However, as the blockchains are unrelated and transactions can not be reversed, this provides no protection against one of the parties never honoring their end of the trade. One common solution to this problem is to introduce a mutually-trusted third party for escrow. An atomic cross-chain swap solves this problem without the need for a third party.

Atomic swaps involve each party paying into a contract transaction, one contract for each blockchain. The contracts contain an output that is spendable by either party, but the rules required for redemption are different for each party involved.

The image below provides a visual of the steps each party performs and the transfer of data between each party.