A deeper dive into DeFi, Part II: DEX

by Alyona Shepilova

This is part 2 of our DeFi series, and we're exploring decentralised exchanges (DEXs): what they are, how they operate, and your chances to profit on them

DEX explained

Decentralised exchanges are marketplaces that run on blockchains (typically, Ethereum) and allow traders to transact directly with each other without the need for a third party.

Unlike centralised exchanges, DEXs do not store users' funds and thus don't require participants to verify their identity to start trading. It's simply a question of connecting a supported wallet where you keep the asset you'd like to exchange. Another difference is that decentralised exchanges deal exclusively with crypto assets.

There are three main types of DEXs:

  • Liquidity pool-based, also known as Automated market maker (AMM) exchanges
    • Order book-based
      • DEX aggregators

        Let's start with order book-based exchanges. Like on a centralised exchange (CEX), participants set the desired buy/sell price and wait until someone matches their order. But since DEXs basically compete with much more popular CEXs, they often suffer from low liquidity, resulting in longer processing times, which means fewer adepts and less liquidity.

        To solve the problem of low liquidity, DeFi came up with liquidity pool-based exchanges. Liquidity pools are basically smart-contract warehouses for crypto tokens. You don't trade with another person but directly with a smart contract, so orders are executed almost instantly. However, you don't set your own price. Instead, it is established algorithmically by a programme called automated market maker (AMM) based on the current trades.

        Liquidity pools are funded by liquidity providers (or market makers). Being a liquidity provider means you lend an equal value of two assets (a trading pair) to a pool. When AMM traders buy/sell, you get the transaction fee as a reward. This process is also sometimes referred to as liquidity mining.

        If you ever decide to become a liquidity provider, it's essential to know about such a thing as impermanent loss. What is it?

        Imagine a trading pair pool which contains two assets of equal value. When one of the assets changes in price (which is happening continuously), the ratio of amounts for these two assets has to be corrected to preserve the equality of values. When you're done with providing liquidity and decide to withdraw, you will be entitled to the same % share of the assets in the pool you deposited. The only thing is, the amount ratio has changed now and with regard to the current price – not necessarily in your favour. If that's the case – that's impermanent loss.

        There are two things to point out. First, impermanent loss is unavoidable: cryptocurrencies are volatile. The more volatile the asset in relation to the other asset, the more notable the loss. Second, it doesn't always matter because impermanent loss may be smaller than what liquidity providers gain from trading fees, especially for high-volume trading pools. But it, of course, depends on the pool, the trading pair and market conditions on the whole. If you want to try, start small to get the hang of it.

        Be aware that all DEXs suffer from another common problem called slippage. Slippage is when a buyer has to settle for an above-market price on their order because there's not enough liquidity. Typically, it happens with larger orders. For example, if an order-book exchange can satisfy only half of the order for your desired price, but the rest will have to be filled at different, higher prices – this is slippage.

        The same thing happens at AMM exchanges, where prices are determined by an algorithm. To put it simply, larger orders have a more significant effect on the ratio between two assets of a trading pair. And the larger the gap after the trade, the more you will have to 'overpay' as a result.

        Experienced traders would sometimes split one large order into several parts to combat this. If you decide to follow their example, keep in mind that DEX trades are settled directly on the blockchain, meaning traders have to pay a trading fee and a miner fee to boot. During Ethereum's busiest times, you may lose more on the miner fees than on slippage.

        The last type of DEX we will talk about is a DEX aggregator. Not an exchange per se, you can compare it to a search engine – using complicated algorithms, it will sift through a myriad of options on the market to find you the best deal. DEX aggregators also facilitate split trades, so you get the best possible price when exchanging assets. Basically, since calculations performed by a DEX aggregator are so complicated, traders can't achieve the same result independently. Luckily, with the help of a good aggregator, we can now make better decisions about our trades.

        Advantages and disadvantages of decentralised exchanges

        Better said, decentralised exchanges have defining characteristics. Whether they're pros or cons largely depends on how you look at them.

        • More available tokens but low liquidity

          Unlike centralised exchanges, DEXs don't really have a vetting process. This makes it much easier for a new promising project to get a listing. As for traders, it facilitates access to either a new promising project or a new treacherous scam. You should be careful and always research extensively before investing in a new asset. Also, if it's a new niche project, it most definitely means low liquidity.

          • No KYC required

            Good news for those who wish to remain anonymous as users are not required to go through verification (KYC stands for Know-Your-Customer and means that financial services are required to verify your identity to, well, provide you with services). On the other hand, you need to understand that you will be on your own if something is to go awry. As a matter of fact, DEXs do tend to be less supportive and intuitive on the whole. Definitely not an ideal option for a beginner.

            • Security: for and against

              On the one hand, you don't entrust DEX with your funds – they're stored in your own wallet at all times. So even if your DEX gets hacked, you will probably be fine (unless you are a liquidity provider).

              On the other hand, smart contracts can be somewhat vulnerable as they're written by humans. As we've already covered, sometimes humans err, and then bugs get exploited. It always pays to check if the DEX of your choice has been audited by a reputable firm and read reviews. It's not a 100% guarantee, but it helps.

              And then some things don't have a better side to them at all. DEXs, as most DeFi projects, run on Ethereum, which means scalability issues. At times, long processing times and high processing fees are just a given. And yes, let's reiterate: there are two fees – one for liquidity providers and one for miners, as, unlike centralised exchanges, DEX transactions are settled on the blockchain.

              There's also a lack of advanced trading options as most decentralised exchanges don't offer anything more exciting than simply buy/sell. However, this might change as they get wider adoption.

              One of the most prominent examples of DEX is Uniswap. You can buy their native token UNI right here on Cryptopay.

              Time to move on to our next category. You're probably tired of hearing it, but cryptocurrencies are volatile. That's why we have stablecoins; they help us ease the pain of price jumps.

              ***

              Please note: From October 8, 2023, at 8 AM UTC, the new rules governing Financial Promotions come into effect; UK Customers will no longer be able to make Bank Deposits, buy cryptocurrencies with a bank card, and use Exchange functionality to buy or sell cryptocurrencies.

              Check what services are available here.

              Explore other articles