History and Types of decentralised exchanges

After its launch in 2013, the Ethereum smart contract blockchain emerged as a useful platform to develop and deploy so-called decentralized applications or dApps as the concept of open applications operating atop blockchain took hold.

Among the early use cases for this was the idea of a crypto exchange that would allow users to trade in a more decentralized manner.

At the time, the only way to buy and sell crypto was to do it at exchanges, which were managed and operated by commercial companies (and, at first, wealthy individuals). This required users to deposit their funds at the exchange, placing orders to exchange their coins and tokens for those of other users. Only when exchanges were finalised were users able to withdraw back their coins to their own wallets.

However, the infamous hack of Mt Gox in 2013 – then the largest Bitcoin exchange in the world – exposed the biggest risk of a traditional crypto exchange or centralised exchange (CEX). If hacked or compromised, all users at the exchange risk losing their funds, just as thousands of users did at Mt Gox. This was because you have to give over custody of your funds when you deposit assets at a CEX.

Unsurprisingly, the very first type of DEX to launch looked very similar to a regular exchange, except that it did not require users to hand over custody of their digital assets.

1. The first generation: Non-Custodial Order Books

Around 2016, DEX platforms like Bancor, IDEX and EtherDelta made waves in crypto by introducing a way to trade crypto peer-to-peer while maintaining control over the digital assets intended to trade.

The term “non-custodial” was used because at any time, traders would be able to access the funds placed at this DEX, if they weren’t already exchanged. In other words, crypto actually remained in users’ wallets until trade conditions on the DEX were made and executed by smart contracts.

These early DEXs worked almost exactly like a traditional CEX in that the platform was made up of an order book. An order book simply contains all of the orders placed by users, whether it is to buy or sell crypto. Thus, an order book has two sides. The buy side (also called “bid” since buyers are bidding for an asset) and the sell side (also called “ask” since sellers are asking for a price).

Users wishing to sell their assets would either have to make a sell order on the DEX or take an existing buy order. Conversely, users who wanted to buy an asset would have to make a buy order on the DEX or take an existing sell order. Just like on a CEX.

These first-generation DEXs proved to be popular but presented several issues:

a. High cost, low speed

As the majority of early DEXs launched on Ethereum, it quickly became apparent that Ethereum’s transactional capacity simply wasn’t enough to cope with rising demand.

Each peer-to-peer trade on DEXs required at least one transaction, which needed to be submitted to the network for confirmation like any other blockchain transaction. These competed with all the other transactions on Ethereum and other dApp transactions.

As the Ethereum network became congested, mining fees for transactions soared, and trading on DEXs became unreliable.

b. Low liquidity

They weren’t enough users on the DEX buying or selling many types of coins, so it was significantly harder to buy or sell compared to a CEX. Orderbooks were often empty or quickly cleared. Also, because the demand usually outstripped supply, buy/sell rates weren’t very good either.

Orders that were available were also small in size, unlike the larger sizes typically seen on CEXs. This led to high slippage (sudden reductions in rates leading to losses) for DEX traders.

This liquidity problem – the lack of ease with which crypto could be traded – led to the next generation of DEXs.

2. The second generation: Automated Market Makers (AMM) and Liquidity Pools

Order book DEXs never quite took off because of the Catch 22 liquidity issue. There wasn’t enough liquidity because there weren’t enough users. And there weren’t enough users because there wasn’t enough liquidity.

Users didn’t want to lock up their assets on order books at DEXs where they were few takers, certainly not when they would almost certainly find willing takers on a CEX!

So DEXs had to find a way to convince users to provide liquidity, that is, to provide their assets on a DEX. And they did so by providing additional incentives or rewards for doing so.

Newer DEX platforms like Uniswap and SushiSwap popularised what is called a liquidity pool. Users participating in this pool would be called liquidity providers as they simply provided their crypto to the pool.

All the contributed crypto – which came in pairs, e.g. ETH and USDT – combined as one single ETH/USD liquidity source, allowing other users to connect directly to the DEX to buy or sell Ethereum (ETH) against Tether (USDT) with that liquidity pool.

At the heart of these DEXs were smart contracts that:

  • Automated the process of providing liquidity,
  • determined what the market rate for the swap would be, and
  • Completing the exchanges from users swapping with the liquidity pool

In other words, they automatically made the markets, hence why DEXs like Uniswap or SushiSwap are sometimes called Automated Market Makers or AMMs. 

In return for providing liquidity, liquidity providers would get a share of commissions charged by the AMM on individuals swapping crypto there. This proved to be a relatively secure and reliable means of passive income that led to the growth of AMM type DEXs from 2020 onwards.

3. The current iteration – DEX Aggregators

AMM DEXs continue to grow in popularity to this day and have been credited with the rising use of decentralised finance (DEFI) products and services, of which DEX trading is one.

But with crypto markets peaking in 2021, other smart contract platforms jostled with Ethereum for a share in the DEX space. While Ethereum-based DEXs still command the lion’s share of DEX trading volume, other DEXs on challenger platforms are tempting users with cheaper fees and faster transactions (being on newer, less crowded networks).

Some examples are the PancakeSwap DEX based on the Binance Smart Chain (BSC) network and the AnySwap DEX based on the Polygon network. In fact, there are scores of competing blockchain networks vying for a share of the dApp ecosystem.

Owing to this, the DEX ecosystem is somewhat splintered across multiple DEX platforms on multiple blockchain networks. While other networks are working to create “bridges” between these, they can be quite complex for the regular user.

As such, DEX traders are faced with an increasingly complicated process of manually connecting to different blockchain networks and different DEXs to find the right place to trade or the right rates to trade at.

Enter the DEX aggregators: platforms or dApps which aren’t themselves DEXs but tools that put together many existing DEXs in one place so that their users can trade across different DEXs while connecting to a single app. These aggregators also connect users to different wallets and different networks, making them a convenient way to use DEXs without actually needing to manage multiple accounts.

In fact, many popular DEX aggregators like 1inch and Zerion even have their own custom protocols that automatically search their network of DEXs to find the best swap rates for their users, while using the most efficient algorithms for lower fees. Some DEX aggregators claim this can result in even better rates when using their platform to trade from a particular DEX, than when trading directly at the DEX itself.

The key result for users is that they gain convenient access to any and all liquidity from all the major DEX networks from a single point.


by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *