A decentralised exchange (DEX) is an increasingly popular method to trade cryptocurrencies. Unlike a traditional or centralised exchange (CEX), a DEX does not have a company or intermediary settling trades between buyers and sellers. Instead, a DEX uses software and coding to automatically match buyers and sellers and finalise the peer-to-peer (p2p) exchange transaction.
At least $18 billion worth of digital assets changed hands every day in the crypto market in May 2022 (TheBlockCrypto), a number that has crept higher over the years as more people and institutions buy and sell coins over crypto exchanges.
More than a fifth of that volume or about $4 billion, according to the same source, took place across decentralised exchanges, known in the crypto industry as DEXs.
In this article, you will learn:
- What the modern decentralised exchange (DEX) looks like and how it works
- A brief history of decentralised exchanges (DEXs) and the different types of DEXs that exist as a result
- How a DEX differs from a CEX
- Some of the best DEXs and how to use them
- Why DEXs are important
A decentralised exchange (DEX) is a type of cryptocurrency exchange where users can conduct financial transactions involving the trade of digital assets online directly with each other (or peer-to-peer).
This is different from the most common way of trading crypto, whereby users sign up to an exchange and place their buy or sell orders, allowing the exchange to manage these transactions on their behalf. These types of traditional exchanges are sometimes referred to as centralised exchanges (CEXs). It is also common for a CEX to allow users to swap or exchange crypto directly with the platform’s own funds.
One way to look at DEXs is to see them as a peer-to-peer crypto marketplace like Amazon or Alibaba, where users put up their offers, waiting for others to take them.
However, unlike Amazon or Alibaba, DEXs don’t typically determine what is allowable as a trade listing or arbitrate any trading disputes. They merely operate the software (or dApp) that presents the trades and settles the exchanges between buyer and seller. This is usually achieved through automated algorithms and smart contracts or smart agreements that execute transactions when all the conditions specified by the user are met.
Technically, there are several methods for a DEX to perform the functions of crypto trading and they have evolved over the years. In the next section, we take a look at how and why DEXs started out, the different types that can exist and what a common DEX looks like today.
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.
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:
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.
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.
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.
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.
As we discussed previously, the Mt Gox hack in 2013 was a watershed moment in crypto because it brought to light the risk of CEXs in that you had to sacrifice custody of your crypto assets for the convenience of high liquidity and fast settlements.
Unfortunately, crypto exchange hacks aren’t a thing of the past and the years following Mt Gox have only seen countless other exchanges get hacked or compromised, causing millions of dollars of losses to CEX users.
Using a DEX is one way you can retain authority over your crypto and pay heed to the “not your keys, not your crypto” mantra.
By removing the intermediary in the shape of the company or operator of a CEX, trading with a DEX can mean more savings or better rates or smaller spreads. This is because commissions or fees at liquidity pools on DEXs are usually lower, and in some cases even closer to zero is using the DEX native crypto to pay fees.
Also, there are no fees normally associated with depositing or withdrawing crypto from an exchange. When transacting with a DEX, you only pay the miner fee, just as you would any other crypto transaction.
However, there are significantly more steps required when trading at a DEX. You have to approve smart contracts for particular activities. For example, approving a new token swap, approving a new bridge to access a different network. DEX trading tends to be a lot less straightforward than at a CEX.
The missing gatekeeper element in a DEX also means that just any person could create a fake token to look like the legitimate one. Many a careless user has bought forgeries on DEXs. CEXs need to approve and then list a token before you can trade them, so you are generally assured of buying the legitimate token at a CEX.
Another significant advantage of using a DEX is that no personal data is ever required from you (unless you use a credit card or bank to buy crypto with them).
At a CEX, unverified users don’t have very high trading limits so you’d usually have to successfully complete Know Your Customer (KYC) and Anti-Money Laundering (AML) processes before being allowed to trade there. This usually involves giving over your real name, residence, ID documents and even proof of income like salary slips and tax forms.
While it’s a perfectly valid way to remain regulated and to keep your funds safe, there’s really no way for you to know what happens with your personal data once you’ve handed it over to exchanges – asking them to destroy it would usually also require you to close your account with them.
On the other hand, there are other security risks with regards to your personal data when using a DEX. If someone were to get hold of your wallet address, for example, they would be able to look up all of your transactions quite easily on a blockchain explorer, and would even be able to track your portfolio.
There are many popular DEXs around and many blockchain networks with their own DEXs so choosing the best one depends on your requirements. As a rule of thumb, you want a DEX with high liquidity so you can easily trade at the amount you want. You also want an established DEX to ensure you’re not about to swap with a scam site or a DEX whose smart contracts are vulnerable to hacks.
Ethereum is the most popular network with the deepest liquidity. Here you can use AMM DEXs like Uniswap and SushiSwap. If you still want to use order book DEXs, you can take a look at Serum on the Solana blockchain.
Many new users will appreciate DEX aggregators like 1inch and Zerion, as they enable you to access many major DEXs across several different networks like Ethereum, Binance Smart Chain, Polygon and Gnosis.
In general, they all work the same way:
- You first need your own Web 3 crypto wallet – examples of this are MetaMask and Trust Wallet.
- Then, you connect your wallet to the DEX (you must know how to sign and approve from your wallet).
- From there, you simply select the asset you wish to purchase, and the asset in your wallet you’d like to swap it for. Specify the amounts plus the miner fee or gas fee.
- You should also set a slippage tolerance rate (the higher, the more likely your trade will succeed). Most DEXs already have preset configurations that should work for the average trade.
- You will be asked to sign and approve the transaction type if it’s the first time you’re doing that particular trade. It’s like agreeing to smart contracts.
- Finally, sign and confirm the transaction. Once it confirms on the blockchain network, your trade will execute and you’ll receive the new assets in your wallet in exchange for the one you’ve swapped out for them.
Here are brief answers to some common DEX questions.
- How many decentralized exchanges are there?
There are hundreds! Ethereum has the most active DEXs with the most users and the highest liquidity such as Uniswap and SushiSwap, but Binance Smart Chain’s Pancakeswap is one of the biggest DEXs while Polygon’s AnySwap is also gaining traction.
Not all DEXs have their own native crypto token but if they did, then the best place to get them is usually at the DEX itself. So you might want to buy UNI from Uniswap and CAKE from Pancakeswap, for example.
- What is a good decentralized exchange?
It really depends on what you want or need from a DEX. As discussed in this article, there are even three types of DEXs to choose from and that’s before you consider which blockchain network you’d like to access.
For starters, we’d recommend you check out a DEX aggregator like 1inch, which will give you access to a wide range of other DEXs and networks. Once you’ve familiarised yourself with them, you might prefer to hop on to the DEX you like.
Be wary, however, to always self-verify the DEX to ensure you are indeed on a legitimate dApp before connecting your wallet to it. A good way to do this is to look up the official website by cross-referencing several reputable sources.
- What is an instant decentralized crypto exchange?
As the name suggests, it’s a DEX that lets you swap instantly. Technically, most swaps on any DEX will take place near-instantly if you pay the right miner’s fee and set trading conditions correctly.