Understanding Cross-Chain Liquidity Aggregation and how it works.

The emergence of a multi-chain world has brought great benefits to DeFi users, who are no longer at the mercy of Ethereum’s erratic network fees and bottlenecks. Now, assets can be swapped quickly and at a low cost across any AMM and network of your choosing. Furthermore, the proliferation of cross-chain bridges has made it easy to migrate assets to different ecosystems, which can be connected to them, from a single web wallet.

We are living through the multi-chain future we all dreamed of. But now we are here, it is clear that this promised land isn’t quite as great as we hoped it would be. Yes, the interface design is light years ahead of what we were lumped with in DeFi’s early days and we are blessed with a cornucopia of financial products that can be traded on-chain. Options; perpetual swaps; NFTs; indexes; you name it, it is all here. There is just one thing that’s missing: liquidity.

The Balkanization of DeFi

To ameliorate this problem, aggregators have sprung up that can fill orders from multiple AMMs on one chain. 1inch, for example, can execute swaps on Ethereum DEXs such as Uniswap and SushiSwap. While such solutions can deliver better pricing and reduce slippage for DeFi traders, they are hampered by intra-chain constraints. The liquidity that resides on other networks remains inaccessible, curtailing the efficacy of aggregators.

The solution sounds simple: develop a cross-chain liquidity aggregator. The implementation, needless to say, is anything but. There are many challenges to solve when going cross-chain, ranging from security to routing assets to their intended destination.

How do you get tokens that exist on networks A, B, and C into the wallet of a user on network D? From a theoretical perspective, it can be done. From a practical perspective, it is a complex undertaking. But the rewards for doing so are huge. Aggregating all liquidity into one place is the holy grail of DeFi. For only then can the industry’s potential to support trades of all sizes and types in a frictionless and price-efficient manner be realized.

Cross-Chain Swaps in Action

Following months of extensive development, refinement, testing, and auditing, Swing’s cross-chain liquidity solution is ready for deployment. It will support swaps across not only EVM chains but also non-EVM networks such as Solana, Elrond, and Cosmos. And it is all implemented from a single interface that provides a seamless user experience. Here is how it works.

Suppose a user wishes to swap 0.5 WBTC on Polygon for ETH on Ethereum. To minimize the cross-chain AMM slippage, Swing will first swap WBTC to stable tokens (USDC/USDT/DAI/BUSD/FRAX and etc) which is what we called the bridge token. The choice of the bridge token depends on the depth of the liquidity pools across all bridges and Swing will simulate the cross-chain swap aiming to find the best price. In this example, let us assume the bridge token is USDC. Swing will then check the liquidity pools of DEXes on both the source chain and destination chain to get the best price for swapping WBTC to USDC (on polygon) and USDC to ETH (on Ethereum).

With all the information above, Swing’s algorithm will calculate and return the most efficient path for the trade. Different bridges might charge differently; in this case, Swing stands firmly on the customer’s side, finding the best, most efficient path with higher return and lower cost.

There are numerous “hops” or steps to this process, including finding the best dexes to do the token swapping on both source and destination chains, finding the bridge with the best pricing, and locking and unlocking tokens using bridge smart contracts on multiple networks. But from the user’s perspective, all of this is abstracted away. All they see is the WBTC leaving their wallet on Polygon and the ETH appears on Ethereum, obtained at the best price available. Users can also monitor the token swap progress with full transparency including where the funds are sent to and when the funds arrive in the wallet on the destination chain. Swing also offers history checks for users with auditing requests.

Follow Swing on:

🐦. Twitter: http://twitter.com/swing_xyz

📘. Medium: swingxyz.medium.com

💬. Discord: https://discord.com/invite/VYgbmdkwsS

💬. Telegram: https://t.me/swingxyzANN

🌐. Website: www.swing.xyz

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Swing Protocol

Swing Protocol

79 Followers

Cross-chain infrastructure for the Internet. Find the best route to trade and move crypto between blockchains. Join our discord: https://discord.gg/gpkeeEetkC