Understanding Crypto Bridges: Exploring Cross-Chain Swaps and Interoperability

C2tC...18qu
26 Jan 2024
8

As cryptocurrencies grew, it became evident that instead of different networks racing to be one true crypto, different blockchain networks would have to coexist. Solutions like atomic swaps were envisioned long ago but are hardly a widely adopted choice. A more common way to transfer value from one crypto to another is by trading or using a crypto bridge. In this guide, we will explain how crypto bridges work and whether should you choose it over an instant crypto swap.

Key Takeaways

  • Cross-chain bridge enables the use of crypto assets on another blockchain. It will mint wrapped tokens in return for the assets locked in associated smart contracts;
  • Cross-chain swaps provide a peer-to-peer way to exchange coins with only a smart contract as an intermediary;
  • Both methods require roughly the same amount of time and gas fees. A cross-chain swap is preferable if you don’t want to give up custody of your crypto funds even temporarily.

What Are Blockchain Bridges?

Different blockchain protocols, such as Bitcoin and Ethereum, are not interoperable. It means that you, for example, cannot send ETH to a Bitcoin address, at least, directly. Bridges are a solution that does not fundamentally solve the lack of cross-chain interoperability but it definitely helps to connect various blockchain ecosystems.
Cross-chain or blockchain bridges are chain-agnostic protocols that help transfer value across two or more different chains. They come in a few variations depending on how they work, which we will explain later.

How Cross-Chain Bridges Work

Blockchain bridges work a little bit differently than bridges in the real world. Instead of straightforwardly transferring your crypto assets to another blockchain, they lock up the crypto you’re seeking to transfer in a smart contract. In return, a bridge protocol will mint an equal amount of tokens native to the network you’re bridging to.
If anything, cross-chain bridges are more akin to teleportation devices moving coins! An example of a crypto bridge at work would be Wrapped Bitcoin (WBTC), which brings value from the BTC network to ETH and is an ERC-20 token. Another instance of cross-chain bridges is familiar to anyone who tried to use an L2. To get started on Polygon or Optimism, normally you would need to bridge ETH to these networks first.
These examples also belong to different types of bridges: the Polygon bridge is bidirectional, or two-way, meaning it can turn ETH to MATIC and vice versa. Wrapped Bitcoin is uni-directional, or one-way: you can’t transfer ETH to the Bitcoin blockchain using it.
However, a more important distinction lies in what happens to the locked tokens. Is it handled on-chain or off-chain? Do you give them up or can you still use them? Depending on it, the bridges are divided into the following categories.

Trusted Bridges

As the name implies, these bridges require a degree of trust in the bridge operator and their process, some of which can be off-chain. Moreover, the bridge acts as a custodian, so you temporarily give up ownership of the deposited assets. These bridges are more economical, though, and should anything happen, the operator or custodian can be held liable. Popular cross-chain bridges such as Binance Bridge and Avalanche Bridge are trusted.

Trustless Bridges

On the other side of the scales are smart contract-based trustless bridges. They rely on the underlying blockchain network for security, rather than on the trust in the operator. Most layer-2 bridges are trustless, and some multi-chain ones are Portal Network (formerly Wormhole), Multichain, and Anyswap.

What are Cross-chain Swaps?

Cross-chain swaps, also known as atomic swaps, are a mechanism that allows users to exchange cryptocurrencies directly between separate blockchain networks without intermediaries such as centralized exchanges.
Cross-chain swaps are not just a theoretical concept; they have been successfully implemented and are available for use in various blockchain projects. A few examples of them are:

  • The Lightning Network is a layer-2 scaling solution for Bitcoin that enables faster and cheaper transactions. It also supports cross-chain swaps between Bitcoin and other Lightning-enabled cryptocurrencies.
  • AtomicDEX is a decentralized exchange platform developed by Komodo. It allows users to perform cross-chain swaps between various cryptocurrencies, including Bitcoin, Ethereum, Litecoin, and many others.
  • Thorchain is a decentralized liquidity protocol that supports cross-chain swaps between different blockchain networks. It enables users to trade assets across chains like Bitcoin, Ethereum, Binance Chain, and more.
  • Ren Protocol is a cross-chain bridge that enables interoperability between different blockchain networks. It allows users to swap assets between chains like Bitcoin, Ethereum, and others.

While cross-chain swaps have been implemented in these projects, it’s important to note that the technology is still evolving, and there may be limitations or challenges associated with different blockchains and implementations. Additionally, not all cryptocurrencies or blockchain networks may support cross-chain swaps at this time. However, the concept of cross-chain swaps has gained significant attention and is an area of active research and development in the blockchain space.

How Cross-chain Swap Works

Dai, Chris. (2020). DEX: A DApp for the Decentralized Marketplace. 10.1007/978-981-15-3376-1_6. 
The concept of cross-chain swaps is based on a technology called Hash Time-Lock Contracts (HTLCs). HTLCs are smart contracts that ensure the secure and trustless exchange of assets between blockchains. Here’s how the process typically works:

  1. Alice and Bob agree to swap cryptocurrencies. Let’s say Alice wants to exchange Bitcoin (BTC) for Bob’s Ethereum (ETH).
  2. Alice and Bob both generate a unique secret and create a hash of it. The hash is shared with each other.
  3. Alice creates an HTLC on the Bitcoin blockchain, locking her BTC in the contract. This contract includes the hash of the secret, the recipient’s Ethereum address (Bob), and a time lock.
  4. Bob does the same on the Ethereum blockchain, locking his ETH in an HTLC with the same secret hash, Alice’s Bitcoin address, and a time lock.
  5. Alice reveals the secret, which unlocks Bob’s HTLC on the Ethereum blockchain.
  6. Bob can then use the revealed secret to unlock Alice’s HTLC on the Bitcoin blockchain.
  7. The swap is complete! Alice has received Bob’s ETH, and Bob has received Alice’s BTC, all without the need for a centralized exchange.

How Crypto Swap & Exchange is Different from Crypto Bridges

Aside from everything under the hood, the result of transferring tokens using a crypto bridge is drastically different from simply trading the crypto. After using a bridge, what you get is not the other native token.
A bridge does not work as an exchange because it does not have the liquidity of the digital assets on its own. It only mints a synthetic asset on the destination blockchain. The bridge protocol will give you a wrappedversion of the asset you deposited. Therefore, your uses for the token after bridging are limited.
Moreover, crypto bridges carry certain risks. Curiously, many of them are the same as when using an exchange!

Risks of Bridging Tokens

  • Smart contract risk (i.e. faulty code => stuck or lost funds);
  • Technology risk (i.e. hacks, bugs, exploits);
  • Custody risk (censorship, collusion to steal funds from the operator).

Top ten exploited crypto bridges! Make your own conclusion. (Source: de.fi)

Which Should You Go For: Crypto Bridge or Cross-Chain Swap?

On the most basic level, the end result is the same: your owned value travels from one specific blockchain network or ecosystem to another. However, as we have learned, even the intermediate result is wildly different. Should you use a blockchain bridge? Or should you swap crypto to get the equivalent in the native coin instead of the wrapped token?

Go for the Cross-Chain Swap if…

  • Time is of the essence. Bridging and an instant swap take up about the same amount of time;
  • You prefer self-custody. Swapping crypto does not require you to lock any tokens, and bridge hacks surface the news every couple of weeks;
  • You need or own a less-known token. Cross-chain bridges support dozens but not hundreds of assets;
  • You don’t want to stumble over the UI/UX of the bridge, the wallet, and related apps.

Go for the Cross-chain Bridge if…

  • You are looking for a specific wrapped/synthetic asset. More often than not, these are provided only by the bridges and not traded freely on exchanges.

How to Swap Crypto Cross-chain on ChangeHero?

ChangeHero provides the same results as a cross-chain swap without the hassles of finding capable decentralized swap applications. It is already ready for you to use, with no registration attached.

  1. Choose the currencies on the home page, amounts, and the type of exchange. Provide your crypto wallet address in the next step and check the details;
  2. Double-check the provided information, read and accept the Terms of Use and Privacy Policy;
  3. Send the cryptocurrency for the swap in a single transaction. In a Fixed Rate transaction, you have 15 minutes before it expires;
  4. Sit back and relax. Now we are doing all the work: checking the incoming transaction and making the exchange as soon as it arrives;
  5. As soon as the exchange has been processed, your crypto is on its way to your wallet. And so, the transaction is finished!

The flow is simple enough but if you struggle with something, don’t worry.

Bottom Line

Today we learned about crypto bridges and how they are different from just exchanging crypto. Both options are viable depending on your needs, and we hope we helped you understand when to use each.


Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to dafeot

4 Comments