How DEX aggregators took DeFi space by storm: A comparative essay

Shubham Sonthalia
Coinmonks

--

DEX Aggregators are one of the latest addition to the bourgeoning DeFi toolkit, helping traders to enjoy deep liquidity and better transaction deals.

In this blog, we’ll first consolidate our understandings of DEXs and DEX aggregators, and then move on to compare the offerings of some most popular DEXs.

Starting off with the first question that pops up in our head…

What are DEXs?

DEXs, or decentralized exchanges, leverage the power of web3 protocols to remove central authorities and intermediaries from the exchange process. Or, they snatch their decision-making power and give it to some lines of code in a smart contract.

In any market transaction, one must factor two important players — first, the price taker (trader), and second, the market maker (counterparty).

Say you want to buy 10 shares of XYZ at 1000 a share. Without market makers, you’d have to wait for a seller who’s willing to sell 10 shares at ask price or more. And same goes for the seller’s end. You guessed it right! It’ll be largely inefficient 🤕.

Market makers provide liquidity to the central exchanges and make it more efficient However, they can also manipulate prices of securities exploiting the bid-ask spread 😈. DEXs use order-book model, automated market makers (AMMs) and liquidity pools to facilitate efficient and decentralized trades. You can read more about DEXs here.

Another important highlight of DEXs is that unlike central crypto exchanges (e.g. Coinbase and Binance), DEXs don’t delegate the responsibility of fund management to custodians or intermediaries — we, the owners, manage our funds in what-we-call, non-custodial wallets, like Metamask.

Using DEXs, we can swap cryptocurrencies more securely and with more anonymity. Examples of DEX include UniSwap, PancakeSwap, SushiSwap, etc. (the number is quickly rising every week). Visit exchange.zeroswap.io to try their DEX! 😀

A snapshot of token swap on ZeroSwap DEX.

Some of the big drawbacks, however, come in form of DEXs having low liquidity and a thin order book size. Result? High price volatility and slippage. Slippage is the difference in the displayed cost of the transaction, and the actual cost when the transaction is executed. You can read more about it here. In most DEXs, users can set a slippage tolerance (in %) for a transaction.

Now that we’ve some idea about DEXs, let’s find out what aggregators are.

Understanding DEX aggregators

“Where do I get the best price for a trade? 🤔”

“Where can I get the lowest slippage on my trades? 🤔*”*

At the time of writing, there are 216 listed DEXs on CoinMarketCap. Each platform with their their varying liquidity offer different exchange rates, transaction fees, and gas fees (depending on the network e.g., Avalanche, Polygon, Binance Smart Chain, etc.)

Naturally, we would want to know which platform’s offering the cheapest cost of exchange. However, manually checking all DEXs for best rates is not efficient.

This is where DEX aggregators comes in.

The first ever DEX aggregator, 1inch was built in an EthNewYork hackathon in 2019. As their founders recollect — “1inch was built with a desire to create an elegant algorithm to search every DEX for the best trading price and instantly deliver an optimised trade.”

DEX Aggregators can be used to find crypto at the best price and with the lowest transaction cost and slippage.

How do aggregators work?

Suppose you want to compare the airline prices across platforms. What do we do? We google it, and Google Flights aggregate data of numerous airlines for us to find the best deal for us.

Aggregators are no different!

They compile data from a spectrum of DEXs and offer the best possible prices for a trade. If the trade is big enough, they give users the option to split their trades in small chunks to get an optimised swap cost. There are many other financial tools like yield farming, liquidity mining, arbitrage optimisation, etc. that a single aggregator can offer to traders.

The main function is to offer users better swap rates than any specific DEX in the shortest possible time.

Types of DEX aggregators

Off-chain

  • They offer a lot of flexibility because it’s easy to aggregate data from a large set of networks.
  • They offer less security because of their centralized structure.
  • Front-running trades is a concern for traders.
  • e.g., 1Inch, Paraswap, etc.

On-chain

  • They offer atomic routing, that is to swap cryptocurrencies from one blockchain to another in one transaction using smart contracts.
  • They also offer arbitrage as a service. It involves taking advantage of different swap rates on different platforms.
  • They can get highly inefficient with increasing number of DEXs.
  • e.g., ZeroSwap, SwapSwap, etc.

With some basics under our belt, let’s get on with comparing some of them!

1. 1inch Exchange

1inch leads DEX aggregators in the crypto space. It is an off-chain aggregator that offers the best liquidity and swap rates across exchanges. It currently supports a stag 2491 different token pairs. It supports 5 Blockchain networks and 16 different wallets. You can find more details about them in this post.

The exchange does not charge any fees for sale, purchase or withdrawal of funds. However, if the trading route include a DEX that charge some platform fee, the user need to pay them.

Users also need to pay for the gas fees. Gas is the native currency of all Ethereum-based networks. You can consider these networks as a world computer with extremely powerful but limited resources. And thus, to use these resources, we need to pay gas.

Gas fees are a determining factor for using (or not using) the platform!

To protect traders from the high gas fees, 1inch introduced CHI gas token. If users pay for the transaction fees in CHI, they can cut their transaction cost by upto 42%. 1inch also allows users to earn rewards from yield farming by providing liquidity to liquidity pools.

2. OpenOcean

A snapshot of OpenOcean Exchange

OpenOcean is the first fully-aggregated exchange in the crypto space. It is an off-chain aggregator which sources liquidity from DEXs as well as CEXs like Coinbase and Binance. This helps them to provide best swap rates to users and least slippage cost.

It currently supports 143 different token pairs. It supports 9 Blockchain networks. To know more about what CEXs and DEXs it supports, you can visit this page. OpenOcean offers arbitrage as a service to all its users.

Users need to pay the full gas fees of the network on OpenOcean.

Apart from usual exchange, OpenOcean also offers services like yield farming, insurance and lending to its users.

Visit their documentation page to read about OceanOcean in detail.

3. SwapSwap

SwapSwap is a fully-decentralized on-chain DEX aggregator. It sources liquidity from Uniswap and SushiSwap to find the best prices for the trade.

SwapSwap claims to save on average 90% of the transaction fees on trades. How? Well, they are an automated arbitrage market maker, which essentially means on every trade we do on SwapSwap, it automatically executes optimal arbitrage while swapping tokens.

Visit SwapSwap’s homepage for more details about the project.

4. ZeroSwap

ZeroSwap is an on-chain DEX aggregator focused on making zero-fee transactions possible by using transaction fee mining (previously used by platforms like FCoin, BitForex, Coinsuper, Coinbene). It sources its liquidity from multiple DEXs and provides the best fee possible to their users.

It supports 4 blockchain networks —

  1. Ethereum
  2. BSC
  3. Polygon
  4. Avalanche

It also supports 8 different wallets —

ZeroSwap has their in-house ZEE tokens. When users buy and stake ZEE tokens on their platform, they can enjoy gas-free transactions on different networks. Currently users can get 300 swaps/month without staking ZEE tokens.

ZeroSwap also offers services like ZeeDo, which is a platform for DEXs to launch their own token. Along with free transactions, when users stake ZEE, they can avail high APY, and limited-access to IDO of premium projects.

So are DEX aggregators actually better than individual DEXs?

To answer this question, let’s get our hands dirty and try to swap tokens 😃.

Swapping LINK (Chainlink) with COMP (Compound) on Polygon Network

  1. Uniswap Exchange
2.75771 COMP for 1000 LINK on UniSwap

2. SushiSwap Exchange

56.1808 COMP for 1000 LINK on SushiSwap

Clearly, SushiSwap offers a better swap rate. Now let’s compare them with two aggregators.

3. 1Inch DEX Aggregator

56.5196 COMP for 1000 LINK on 1inch

4. ZeroSwap DEX Aggregator

56.3456 COMP for 1000 LINK on ZeroSwap

Observations —

  1. The swap rates across DEX aggregators are identical because of deep liquidity.
  2. Results across individual DEXs can vary largely depending on token-pair. This is because liquidity in DEXs depend on the liquidity pools of token-pairs contributed by LPs, which can vary across platforms.

Clearly, DEX aggregators offer more consistent and reliable swap rates as compared to individual DEXs.

DEX aggregators also offer a wide range of financial tools for users.

Individual DEXs allow users to earn by providing liquidity to a token-pair pool like LINK-COMP pool (as used in our case). Liquidity Providers receive a fixed percentage of every swap of the token-pair.

DEX Aggregators, as already discussed, also offer features like insurance, lending, borrowing, bridges, etc. to become a one-stop solution for all DeFi-related services.

Conclusion

This blog aimed at informing readers about DEXs, aggregators, and compare some prominent aggregators with regard to their transaction costs.

We can see most of the platforms are more than just aggregators. This could be because the space is in its infancy. Even though a lot of traders have jumped into the crypto voyage, a majority are yet to join.

In a market where reducing transaction costs has been the main traction for platforms, ZeroSwap wins the bargain by offering 100% off on gas.

DEX Aggregators outperforms individual DEXs both in terms of consistency of prices and features.

I hope this blog had been informative.

Until next time.

Further Readings

Bid-Ask spread — Investopedia

Liquidity Pools — Binance

Transaction Fees Mining — Bitcoin News

What is Slippage — DexNetwork

Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing

Also, Read

--

--

Shubham Sonthalia
Coinmonks

Backend Software Engineer. Learning and building scalable systems. Languages - C#, Java, Python, English (for blogging ofc)