🎯 LOT Newcomer Limited-Time Airdrop is Live!
Individual users can earn up to 1,000 LOT — share from a total prize pool of 1,000,000 LOT!
🏃 Join now: https://www.gate.com/campaigns/1294
Complete deposit and trading tasks to receive random LOT airdrops. Exclusive Alpha trading task await!🎯 LOT Newcomer Limited-Time Airdrop is Live!
Individual users can earn up to 1,000 LOT — share from a total prize pool of 1,000,000 LOT!
🏃 Join now: https://www.gate.com/campaigns/1294
Complete deposit and trading tasks to receive random LOT airdrops. Exclusive Alpha trading task await!
Far from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?
Original author | Ignas, DeFi Research
Compilation of the original text | Baize Research Institute
How do you convert BTC to ETH? Or convert BTC to ATOM?
Like many people, I usually deposit ETH into a centralized exchange (CEX), trade it into BTC, and then transfer the BTC to an on-chain wallet.
This puts me in an ironic situation: while advocating the use of DeFi, I myself use CEX for these so-called "cross-chain transactions".
In fact, Ethereum co-founder Vitalik Buterin has repeatedly emphasized “keeping assets on the chain they originated on and using atomic swaps to transfer value between chains.”
Sounds simple, but the reality is far from that.
What exactly is an atomic swap? How do they work, and can they truly replace centralized exchanges?
Let's find out in this article.
Atomic Swap: From Idea to Execution
The idea of atomic swaps was originally proposed by Tier Nolan in a Bitcointalk forum post in 2013. However, it wasn’t until 2017 that the first atomic swap was successfully completed. Litecoin founder Charlie Lee shared on Twitter at the time: "Completed a LTC/BTC cross-chain atomic swap!" (Btw, it was a good deal: he made a profit on the transaction 330%)
How do atomic swaps work? We can understand it simply like this:
Atomic swaps take place between two crypto wallets without any intermediary to facilitate the transaction. They are "atomic", like atoms are indivisible, either the trade completes successfully and each trader receives the other's funds, or nothing happens and both traders only have the funds they had before the trade.
The atomic swap mechanism relies on the hash time lock contract (HTLC), which can be understood as a virtual safe with two special guarantees of "hash lock" (HashLock) and "time lock" (TimeLock):
Once both parties submit the contract key, the transaction is complete.
If both parties do not submit within the allotted time, the transaction will be canceled, ensuring that no one loses money.
atomic swap vs cross-chain bridge
Of course, atomic swap technology is far more complicated than explained and is still evolving. The benefits it can provide include:
Although many technologists experimented with atomic swaps in the early days, it seems that they never really took off.
Here's what Vitalik tweeted 3 years ago: We should dedicate resources to a proper (trustless, serverless, maximally Uniswap-like UX) ETH <-> BTC DEX. Embarrassingly, we still cannot easily transfer value trustlessly between the two largest crypto ecosystems.
Three years later the situation is different. I am not referring to atomic swaps, but cross-chain bridges.
In the past three years, cross-chain bridges that pool user assets and issue anchor coins (or packaged tokens, such as wETH on Fantom) have become more and more popular.
According to data from DefiLlama, in the past 7 days, the total assets of 14 cross-chain bridges reached 4.8 billion US dollars!
Vitalik is very picky about the design of the cross-chain bridge. A year ago, he shared on Reddit why he was pessimistic about cross-chain bridges. Here are the gist:
As of this writing, the risk of "anti-network effects" has become very real, with rumors that the Multichain development team holding the multisig key has been arrested.
**As a reminder, Multichain's cross-chain bridge uses an asset pool model to issue anchor coins on supported chains. **
**For example, the BTC on Fantom is actually the "wrapped" wBTC and then issued by Multichain for the second "wrapping". **
On-chain analyst An Ape Prologue conducted research on Multichain. He found that 40% of Fantom assets other than the native token FTM are issued by Multichain. These anchor assets are as high as $650 million, indicating Fantom's high reliance on cross-chain bridges.
Unfortunately, Multichain is not the first nor the last cross-chain bridge to run into trouble. The five largest cross-chain bridge hacks have cost $1.9 billion.
As Vitalik puts it: “Keep assets on the chain they originated from, and use an atomic swap protocol to transfer value between different chains.”
Despite the risks of cross-chain bridges, atomic swap protocols are currently rare, mainly due to these 5 obstacles:
Attempt at "Atomic Swap"
Finally, can we really use the "atomic swap" protocol?
At least 15 related protocols currently use different exchange mechanisms.
However, what really matters to me is the ability to swap native assets between chains, especially when it involves swapping between native BTC and ETH, which in my opinion is the holy grail.
Thorchain’s Thorswap
Thorswap is probably the most famous multi-chain asset trading protocol. It facilitates the exchange of ETH, BTC and other native tokens between 9 chains.
In the image below, it took me 9 minutes to exchange ETH for BTC, and it cost me $37 in fees (mostly the Bitcoin network).
The core of the THOR system is the liquidity pool, each of which contains 50% of THORChain's native token RUNE, and 50% of other assets such as BTC or ETH.
When you want to exchange ETH for BTC, the protocol will exchange your ETH for RUNE in the ETH-RUNE pool, and then exchange the RUNE for BTC in the BTC-RUNE pool.
Therefore, THORChain still relies on liquidity pools, which could be a target for hackers, which means it is not a true atomic swap.
In fact, I contacted the THORSwap team to explain why they gave up using atomic swaps. Here's what their operations manager paperX had to say:
Komodo (AtomicDEX)
Komodo is one of the pioneers in the field of atomic swaps.
Their decentralized exchange, AtomicDEX, uses atomic swap technology to provide a "secure and trustless multi-chain transaction" environment. Komodo proudly asserts, "We cannot freeze funds or stop transactions."
Unfortunately, the platform is not easy to use on both mobile phones and computers. Currently, it does not support Metamask or Keplr, only allowing connections via mnemonic phrases or hardware wallets.
In addition, the conversion limit of BTC is 2 ETH, and the exchange rate offered is 7% lower than that of the centralized exchange (CEX).
This may be the trade-off that users need to make when choosing to use a cross-chain bridge or a true atomic swap protocol.
Summarize
Implementing an atomic swap of BTC<>ETH is challenging.
If using decentralized applications is not a problem and you want to conduct cross-chain transactions, you can also try to use SWFT AllChain Bridge, Maya protocol (fork of THORChain).
In addition, there are three new generation cross-chain protocols worth a try:
(Note: The above is the author's personal opinion and does not constitute investment advice, DYOR)
Anyway, I wonder what protocols Vitalik is bullish on when he recommends moving away from cross-chain bridges and using atomic swaps.
Clearly, though, true atomic swaps appear to be far from mass adoption.
risk warning:
According to the "Notice on Further Preventing and Dealing with the Risk of Hype in Virtual Currency Transactions" issued by the central bank and other departments, the content of this article is only for information sharing, and does not promote or endorse any operation and investment behavior. Participate in any illegal financial practice.