A hero reports the first and second Monero Atomic Swaps on the mainnet. This is a great day for decentralization and privacy, if you believe in such things. As Seth For Privacy reports, “You can, today, swap Bitcoin <> Monero directly peer-to-peer, over Tor, with no custodian or trusted 3rd-party, no KYC (Know Your Customer) info, nothing.” And he should know, because he and an unknown bitcoiner were the first persons to ever do it.
XMR <-> BTC atomic swaps are live on mainnet! We're delighted to see Seth and others working to make them easily accessible such that anyone can swap trustlessly and privately! #monero #xmr https://t.co/uRm7UCCHox
— Monero || #xmr (@monero) August 17, 2021
The description of the Atomic Swaps process couldn’t sound any more private. It “took 34min, was done entirely over Tor, required no interaction by me, and was peer-to-peer with *no* middle-man or custodian.” However, some of you might be wondering…
Related Reading | Lightning Network 101: How And Why It Works
What Are Atomic Swaps And How Do They Work?
For a simple definition, let’s quote Localmonero’s guide:
An atomic swap is a protocol by which two different cryptocurrencies, on different blockchains, can be exchanged in a trustless manner with no intermediary. This means if someone wanted to exchange cryptocurrency A for cryptocurrency B, they would be able to do it without an exchange, centralized or decentralized.
Overly simplifying, Atomic Swaps use the elements of trust and guarantees present in the cryptocurrencies’ code to perform a trustless operation. When two users enter a transaction, the system creates two multisig vaults, and the users exchange keys. However, there’s always “associated counterparty risk.” For a slightly technical description of how to solve that problem, let’s check Investopedia:
Atomic swaps solve this problem through the use of Hash Timelock Contracts (HTLC). As its name denotes, HTLC is a time-bound smart contract between parties that involves the generation of a cryptographic hash function, which can be verified between them.
Atomic swaps require both parties to acknowledge receipt of funds within a specified timeframe using a cryptographic hash function. If one of the involved parties fails to confirm the transaction within the timeframe, then the entire transaction is voided, and funds are not exchanged.
However, in the case of Monero, there’s a problem that made these type of transactions impossible. Until now. For a simple description of the problem, let’s quote localmonero’s guide once again:
Because of Monero’s ring signatures privacy technology, the sender of a transaction is always uncertain. How can the protocol do a refund transaction if even it doesn’t know where the transaction came from?
XMR price chart for 08/19/2021 on Bitfinex | Source: XMR/USD on TradingView.com
How Did Monero Solve The Problem?
Oversimplifying once again, the system sends Bitcoin first. That way, if there’s a problem, the system can use Bitcoin’s refund method. Of course, the process is far more complex and it took years to work out the kinks. If you’re technically minded, here’s the full explanation of how the Comit Network solved the Monero Atomic Swaps problem. They say:
In an ideal world, one wouldn’t need to worry about refund and punish transactions, but in that case one wouldn’t need atomic swaps in the first place. In the real world, we need a mechanism to incentivize the swap to take place as soon as Bob commits money on the blockchain; and a mechanism to ensure that both parties have sufficient time to refund if they so desire.
Related Reading | Dogecoin Gets Left Out Of S&P 243-Coin Crypto Index
And that’s just what they developed. This brings us right back to Seth For Privacy, who claims, “This is the future of cross-chain swaps, and it’s possible today.” He did his part for the community by providing a step-by-step guide on how to use the tools developed by the Comit Network to perform the Monero Atomic Swaps. It’s worth noting that, so far, you can only swap BTC for XRM. To do the opposite, you’ll have to run the ASB tool and become a Monero Atomic Swaps provider like Seth.
— Seth For Privacy (@sethforprivacy) August 17, 2021
We can’t end this article without quoting this portion of Seth For Privacy’s disclaimer:
Swaps should always end in either a complete swap or both parties getting funds back, but be aware that bugs may exist and you’re very early to atomic swaps in general.
That’s the price of being a pioneer.
Featured Image by Alexander Antropov from Pixabay - Charts by TradingView