DEXs & DEX Aggregators

How To Choose The Right DEX Aggregator For Your dApp

How LI.FI Can Help dApps Integrate The Right DEX Aggregator For Them

Zord4n
LI.FI Blog
Published in
9 min readFeb 11, 2022

--

LI.FI’s algorithm chooses the best path for a swap by default based on our algorithm. But, we’d like to give an option to tweak the decision to dApp developers. With our SDK, dApps can whitelist and blacklist specific DEXs and DEX aggregators whenever you please. Here we talk about how to choose the best DEX/DEX aggregator to whitelist and what factors to look out for.

Let’s dive in!

What Are DEXs And DEX Aggregators?

DEX stands for Decentralized Exchange. DEXs are software platforms that allow users to swap crypto assets on an open market without surrendering control of their wallets or the assets within. Smart contracts execute trades on whatever blockchain the asset exists on, and no intermediary is needed.

From the standpoint of a dApp developer who wants to support transactions for multiple assets, integrating the most popular DEX that supports their favorite crypto assets might seem like the best decision — but relying on one DEX can be risky. Negative slippage during market volatility can add up fast and can be worse on some DEXs than others at different times. Breaking up bigger orders can mitigate this issue, but could also lead to heavy losses to gas fees.

A smart alternative would be to integrate multiple DEXs, then compare their liquidity, trade volume, and prices before deciding to execute a trade. You could also build an algorithm to execute swaps when gas fees are at the best feasible rate. Such a solution would take a lot of time and effort to develop — but luckily it already exists. This is where DEX Aggregators come in.

A DEX aggregator is a software platform that aggregates information about multiple DEXs and uses complex algorithms to optimize swap rates and gas fees. The most popular aggregators also use order-splitting to break up big transactions, if doing so will minimize costs and maximize returns.

How To Choose A DEX Aggregator

The biggest benefit of using DEX aggregators is that they optimize transaction costs and profits by monitoring liquidity and trading volume on multiple DEXs. That means you’ll want a DEX aggregator that supports your preferred assets, wallets, and networks, while also mitigating losses from gas fees and negative slippage. Some algorithms optimize these things better for different transaction sizes, so be aware of that as well.

When deciding which DEX aggregators to integrate into your dApp, you’ll want to keep the following factors in mind:

  • Algorithm features — Slippage, Price Impact, gas fee spikes, and other issues related to liquidity and network activity can turn good deals into nightmares, and a good DEX aggregator’s algorithms should be optimized to minimize all these things. At the same time, many market exploits that exist in traditional finance can be more pronounced in DeFi, so the algorithm should also work to curtail issues like front-running.
  • Supported assets, networks, and wallets — Are your dApp’s users going to be trading a particular set of assets that aren’t widely supported on many DEXs? Are you planning to onboard users from one network to another, or perhaps support users across multiple networks? Do you require a DEX to have the simplest possible integration with your users’ wallets? These are questions you must ask when choosing a DEX, as no single aggregator supports all wallets, asset pairs, and networks.
  • Use-case — Not every DEX was built for every use-case. Some have algorithms that are optimized for small transactions, such as exchanges of 1 to 5 ETH, and others are optimized for much larger transactions, such as exchanges of 500+ ETH. Know your use case, and choose accordingly.

With these factors understood, let’s look at the options LI.FI opens up for you.

DEX Aggregators Integrated With LI.FI

LI.FI’s list of available DEXs and DEX Aggregators continues to grow, but here are all the options available to you right now:

1inch

1inch is a DEX aggregator that helps you find the cheapest way to exchange any of its supported cryptocurrencies. Its superpower is its Pathfinder algorithm, which combs across liquidity sources on Ethereum, Binance, Polygon, and other popular chains. You can see their full list of supported protocols here.

Breakdown:

  • Algorithm features — 1inch’s Pathfinder algorithm breaks swaps up and executes trades across multiple liquidity sources, strategically executing trades in a way that minimizes price impact on assets with lower liquidity. It also allows for dynamic and partial order filling, enabling you to reduce loss due to slippage by setting the parameters for when a trade should go through.
  • Supported assets, networks, and wallets — Any Ethereum wallet is compatible with 1inch, and many popular digital and physical Ethereum wallets have integration built-in — they even have guides for connecting some of them. Some of the biggest names include Metamask, Trezor, and Binance Chain Wallet.

As of now, 1inch’s list of supported networks includes Ethereum, Binance, Polygon, Arbitrum, and Optimistic Ethereum.

1inch supports trading any token on any of its supported networks. Many of the most popular tokens will be natively supported in the UI, and those that do not appear as options in the token menu can be added manually.

  • Use-case — The Pathfinder algorithm is fantastic at breaking up larger swaps to reduce price impact and the potential for negative slippage, but at least one study has demonstrated weaker performance on smaller transactions. If your dApp will mainly be making smaller transactions, 1inch may not be the best possible option — but it’s still a great option overall.

Should you integrate 1inch with LI.FI?

If your customers are using Ethereum or ERC-20 tokens, whitelisting 1inch is a great choice. You’ll also love the access to liquidity in the Binance and Polygon ecosystems.

Source: The Paraswap Foundation

Paraswap

Paraswap is a DEX aggregator that optimizes swaps by breaking large orders apart and spreading them across multiple exchanges. Its Multipath functionality also enables it to find optimal trades by using intermediate transactions. For example, say we want to trade asset A for asset B. Paraswap might first trade asset A for asset C, then swap asset C for asset B, if doing so would be more optimal.

Breakdown:

  • Algorithm features — Paraswap’s Multipath algorithm will break big orders down into smaller ones if doing so will save money, which means it sometimes beats the market rate for a straight-up swap. Paraswap’s algorithm will also consider indirect trading routes, which means that instead of trading two coins straight up, Paraswap might suggest trading for an intermediary coin in order to optimize the exchange.

Multipath also enables composing multiple transactions into one by way of its ParaSwapPool, reducing overall gas fees. The only concern you may have with using ParaSwapPool is that it’s private and centralized, with no clear plans for decentralization in the near future.

  • Supported assets, networks, and wallets — Any Ethereum wallet can connect to Paraswap, but Argent, Monolith, and Metamask have integrated Paraswap to simplify the user experience.

Paraswap’s list of DEXs and networks is large, including the likes of Uniswap, Bancor, and Kyber. It supports swaps of any ERC20-compatible token.

  • Use-case — Smaller swaps are harder for Paraswap’s algorithm to break up, as mentioned in their documentation. When the swap is small, going through a DEX directly may sometimes yield better results, especially for gas fees, than using Paraswap. But they do provide information for any developers interested in maximizing the impact of the Multipath algorithm for smaller transactions in their dApp.

Should you integrate Paraswap with LI.FI?

If your dApp will facilitate larger transactions, such as swaps of 500 ETH, then Paraswap will be invaluable for optimizing both the returns on and the speed of transactions. But if you’re making smaller transactions, there may be DEXs and aggregators with algorithms more optimized for your use case.

Source: Coin Codex

OpenOcean

OpenOcean is a protocol that aggregates swaps, derivatives, yields, lending, and insurance products across major DEXs and CEXs (Centralized Exchanges). The OpenOcean team promises what they call full aggregation, which means their protocol seeks to aggregate as many crypto assets across both centralized and decentralized markets as possible. Through order splitting and slippage mitigation, their algorithm promises better swap rates across the biggest set of liquidity sources.

Breakdown:

  • Algorithm features — OpenOcean’s algorithm uses a three-step process to optimize trades: Aggregate price quotes across their integrated DEXs and CEXs, select the best trade route based on price and slippage, and present these optimal routes to the user.

Their protocol uses the D-star incremental search algorithm for order-splitting, and machine learning to analyze data about their integrated platforms in order to better optimize their routes. After analyzing slippage potential, the algorithm also guarantees the rates shown to the user by subsidizing incidental slippage losses with OpenOcean’s OOE token.

Their list of supported DEXs includes many of the biggest platforms on the Ethereum, Fantom, and Avalanche networks, as well as sources on Solana, Arbitrum, and Boba. Their current list of supported CEXs only includes Binance at the time of this writing.

  • Use-case — One of OpenOcean’s biggest selling points as outlined in their documentation is its ability to expose arbitrage opportunities when prices differ between DEXs and CEXs. Outside of that, it’s also in a rare category as an aggregator that exposes its users to opportunities in centralized markets. Finally, their integration of DEXs in non-EVM-compatible ecosystems such as Solana means they provide users more flexibility than many other DEXs.

Should you integrate OpenOcean with LI.FI?

If your dApp needs access to centralized markets, integrating OpenOcean makes perfect sense. There’s also a lot to benefit from if your dApp or its users are interested in exploiting potential arbitrage opportunities between different platforms. However, if maintaining the highest level of cryptoeconomic security is important, integrating a protocol that utilizes centralized liquidity sources is something you should consider heavily before proceeding.

Source: Dodo Twitter

DODO

DODO is a meta aggregator, which aggregates liquidity sources across multiple DEXs as well as its own liquidity pools. DODO’s protocol is built on capital-efficient liquidity pools optimized to reduce impermanent loss and optimize slippage rates. Their Proactive Market Maker algorithm iterates on the Automated Market Maker paradigm to more aggressively optimize their liquidity pools according to the needs of market makers.

Breakdown:

  • Algorithm features — The PMM algorithm fetches market prices from multiple oracles, then proactively adjusts parameters in its own price calculation formula in anticipation of market conditions, rather than in response. As a result, DODO’s liquidity pools can be adjusted so that liquidity is close to the market prices for the tokens, reducing slippage on trades and impermanent loss for liquidity providers.
  • Supported assets, networks, and wallets — DODO is compatible with all ethereum wallets, though the web client only supports Metamask, Portis and WalletConnect. It supports swaps of all ERC-20 assets.
  • Use-case — DODO is a great fit for dApps that focus on lending and borrowing as it optimizes for slippage and impermanent loss.

Should you integrate DODO with LI.FI?

With its full support for all ERC-20 asset pairs, and its powerful algorithm for reducing slippage and impermanent loss, DODO would be a great fit for dApps that focus on lending and borrowing as it optimizes for slippage and impermanent loss.

Our List Is Growing

LI.FI is integrating new partners all the time! Be sure to check our docs for an up-to-date list of the DEXs and DEX aggregators we’ve added.

We’ve partnered up with the brightest minds and aim to build the best abstraction and aggregation solution available on the market. If you’re a blockchain network, bridge builder, or dApp developer, come talk to us and let’s work together!

Get Started With LI.FI Today

For more information about the LI.FI protocol,

or try our any-2-any swaps NOW at transferto

--

--