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%)

Away from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?

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):

  • Hash Locking: Ensures that funds are locked in the contract before the transaction initiator sends the key to unlock the HTLC contract to the other party.
  • Time lock: If the transaction is not completed within the specified time period, the cryptocurrency of the transaction is refunded to the trader.

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.

Away from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?

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:

  • Trustless: no trusted third parties involved
  • Mitigate Counterparty Risk: If one party fails to meet the transaction requirements, the other party will not lose assets
  • Ownership Control: You maintain control of the asset until the transaction is completed
  • Privacy: The transaction is private and only known to both parties.

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.

Away from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?

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:

  • Although the multi-chain ecosystem provides diversity advantages, cross-chain bridges will bring security problems due to contract loopholes.
  • Even if attacked by 51%, the blockchain can still maintain its rules, keep user balances unchanged and ensure the consistency of transactions. *However, during a 51% attack, if the smart contract of the cross-chain bridge loses control, then the cross-chain assets may depreciate.
  • Therefore, it is safer to keep native assets on their original chain than to cross-chain them to other chains.
  • Cross-chain activity exhibits an "anti-network effect": the more used, the greater the risk, especially if the cross-chain bridge holds a large amount of assets.

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.

Away from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?

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.

Away from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?

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:

  • DIFFERENT LANGUAGES: Different blockchains use different languages, which makes direct atomic swap difficult.
  • Limited functionality: Bitcoin's language lacks the smart contract functionality of Ethereum's Solidity, which complicates implementing certain atomic swap conditions.
  • DIFFERENT CONSENSE MECHANISMS: Bitcoin uses Proof of Work, while Ethereum has transitioned to Proof of Stake. This difference can complicate the atomic swap mechanism.
  • COMPLEXIBILITY AND RISK: Atomic swaps require multiple steps and there is a risk of losing funds if not performed properly.
  • Liquidity Requirements: Effective atomic swaps require sufficient liquidity on both chains, otherwise, there will be exchange rate fluctuations in the transaction.

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).

Away from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?

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:

Due to limited liquidity, THORChain had to abandon atomic swaps. Because if we want to provide a decentralized cross-chain transaction protocol that can replace CEX, we must provide competitive transaction quotations.

As early as 2018/2019, THORChain had researched atomic swaps as a technology option, but eventually turned to building a decentralized cross-chain liquidity protocol that uses Tendermint consensus engine, Cosmos-SDK state machine and GG20 Threshold Signature Scheme (TSS). It does not anchor or "wrap" assets, it manages funds directly in on-chain vaults.

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.

Away from cross-chain bridges, V God advocates the use of atomic swaps: but are they really useful?

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:

  • InterSwap - Full chain AMM with unified liquidity.
  • Orion Protocol - users can trade between major CEX/DEX using DeFi wallet. No KYC required.
  • Chainflip - Enables cross-chain swaps with extremely low slippage to replace centralized exchanges.

(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.

View Original
The content is for reference only, not a solicitation or offer. No investment, tax, or legal advice provided. See Disclaimer for more risks disclosure.
  • Reward
  • Comment
  • Share
Comment
0/400
No comments
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)