DEXs, Bridges, and Liquality Wallet’s Atomic Swaps

Suppose you want to exchange your crypto assets but wish to avoid a centralized exchange. Usually, you’ll have three options: decentralized exchanges, bridges, and atomic swaps. Each of these has its own merits and consists of entirely different ways to move assets around.

DEXs

Decentralized exchanges, or DEXs, have become the most popular solution with weekly volumes reaching up to $35 billion. This is especially true thanks to the rise of DeFi ecosystems that leverage the deep liquidity enabled by popular implementations.

In most cases, DEXs don’t even use an order book model to satisfy buy and sell transactions, relying instead on automated market maker algorithms to provide the necessary liquidity at a fee. Even though they keep the cost of mediation, AMMs enable any user to permissionlessly add liquidity and earn yield without having to execute complex market making strategies. This adds an important layer of decentralization.

While the new model has proven to be wildly successful, the same technical capabilities that make it possible also create certain limitations. Mainly, AMM algorithms run on a particular network’s virtual machine and are built specifically for them. This means that they’re usually incompatible with DeFi applications on other networks, leaving users locked into an ecosystem. Other known limitations include slippage for takers and a kind of opportunity cost popularly known as impermanent loss.

Some examples of AMM DEXs include the Sovryn DAMM on RSK, 1inch on Polygon, Uniswap on Ethereum, PancakeSwap on BSC, and TerraSwap on the Terra ecosystem. There are even cross-chain DEXs such as Thorchain but these have suffered from security issues in the past.

Before swapping on the Liquality Wallet, be sure to check on the Swap Types section for a detailed description and comparison of the pros, cons, and fee structures of different services we have integrated into the browser extension.

Bridges

If anything, the past few months have put the nail in the coffin of a one chain mentality. Interoperability solutions have become ever more important as users continue to migrate their assets to sidechains, layer-two, and scalable layer-one blockchains.  

This is where bridges are of great help. They’re basically a mechanism that locks the assets holders have in one chain and allow them to use the same assets in an entirely different chain in the form of a synthetic asset. If Alice owns BTC but wishes to participate in a DeFi application on the Ethereum blockchain, she can own a representation of her BTC on Ethereum by using a cross-chain bridge. Oftentimes this comes in the form of a “wrapped token” such as RBTC, wBTC, or renBTC. She has not, however, traded anything with Bob.

Bridges simply offer access to a new chain while still holding an asset from a previous chain, despite any incompatibilities there might be between their respective ecosystems. While they solve the interoperability problem, users still require a DEX to trade their assets once they’re in the new ecosystem. If Alice wants to trade her BTC for an ERC20 token, she’ll still have to resort to a DEX after using the bridge. This makes for a cumbersome user experience, besides other downsides to bridges such as known security issues and counterparty risks created by their implementation of multisig wallets.

Some popular bridges at the moment are RSK’s Powpeg mechanism for RBTC, the Polygon Bridge, and the Terra Bridge. Liquality has also integrated Sovryn’s FastBTC Relay into the browser extension.

Atomic Swaps

However, it turns out that you can have the best of both in a single solution. Atomic swaps are distinct in that they’re a one-step, all-or-nothing way to trade assets with a user in another ecosystem. As we explained in better detail in a previous post, they’re technically a p2p, time-sensitive dual escrow transaction. In simpler terms, they let Alice trade her BTC for Bob’s RBTC token without the need for a DEX or bridge.

This makes atomic swaps a kind of holy grail. They’re the most decentralized and secure option for users exchanging assets across chains and they don’t introduce any third-parties or high transaction fees while they’re at it. What they do introduce is the possibility for secure cross-chain liquidity. Something that is becoming a necessity for all ecosystems as we move onto a multi-chain paradigm.

That is not to say that atomic swaps don’t have any downsides. Some known issues include the free option problem, liquidity DOSing, and the sleeping vulnerability; all of which we’ve covered in a previous post and taken steps to mitigate on the Liquality Wallet.

Swapping with Liquality Wallet

We’ve made sure that our users are equipped for a multi-chain future by integrating atomic swaps into Liquality Wallet. We’ve also made sure to address known limitations in atomic swaps such as Liquidity DoSing and the sleeping vulnerability. At the moment the multi-chain wallet is capable of atomic swaps with major networks such as Ethereum, Bitcoin, Rootstock, Polygon, Binance Smart Chain, Near, Arbitrum, and Terra.


Download the Liquality Wallet now and see for yourself. You can also watch a quick tutorial that will get you familiar with it.