What is a Decentralized Exchange (DEX)?

Typically, whenever an investor joins the cryptocurrency community, they have to choose a trading platform or, at the very least, a brokerage that will allow them to convert their fiat currencies to cryptocurrencies. More often than not, that platform will be a centralized exchange serving the same role that banks and conventional stock exchanges do. However, the blockchain protocol ethos discourages the use of ‘gatekeepers’ or intermediaries whose presence within the conventional financial media has apparent bottlenecks. These include counterparty risks that have been exploited severally, high transaction costs, and slow processing and settlement times. Later in this guide, we delve into the benefits of DEXs, but it is worth noting at this point that DEXs were created to address most of these ‘gatekeeper’ shortcomings while also taking advantage of the innovative blockchain tech. They are a crucial piece in propagating the financial sovereignty narrative. Crypto beginners’ corner:

How to Invest in Crypto? Complete Beginner’s Guide Best Cryptocurrency Exchanges – Top 7 Picks 15 Best Crypto Books for Beginners Must-read Crypto Wallets Guide for Beginners How to Mint & Sell NFTs? Beginner’s Guide How to Stake Cryptocurrency? Step-by-Step 11 Crypto Slang Terms Explained Best Crypto Trading Bots – Top 3 Picks What is DeFi? Liquidity Mining Explained

Types of Decentralized Exchanges

Before we look at how DEXs work, let’s consider the various types that exist and how you can differentiate among them as a beginner in this space. These are the three main categories or types of DEXs: Let’s briefly describe each one.

1. Order Book DEX Platforms

Order book-based decentralized exchanges function similarly to their centralized counterparts in that they maintain a record of all open orders in some form, either online or offline. They were the first iteration of the DEX concept on the blockchain. They exist in two forms, i.e.,

On-chain order book DEXs; Off-chain order book DEXs.

On-chain order book DEXs record every instance of a transaction on the blockchain. Essentially, all open orders can be viewed online, and any cancelations of orders are also recorded on the blockchain. As a result, this type of DEX tended to be slow, cumbersome, and expensive to use. Additionally, the on-chain order book DEXs are prone to front-running practices. Unlike in traditional markets, where brokers can take advantage of information unavailable to the public to profit from their clients, this practice is possible in a slightly different way on the blockchain. Since orders are typically added to a ‘pending confirmation’ pool before they are added to the blockchain, investors could potentially place leading orders with higher mining fees, thereby front-running other investors’ orders. However, the chances of this happening are minimized on the blockchain since the record is publicly available. Any investor can take advantage or even cancel their yet-to-be-confirmed orders to avoid losses. Good examples of on-chain order book DEXs include Stellar’s Interstellar DEX and Bitshares’ XBTS DEX. Off-chain order book DEXs keep a record of pending orders offline and only transfer matched orders to the blockchain for settlement. All unmatched orders are maintained offline, which leads to the introduction of centralization since the DEX is vulnerable to an attack on the order book. However, keeping open orders offline is advantageous as it reduces transaction costs and increases blockchain throughput, given that less information needs to be written to the network. Notable examples of off-chain order book DEXs are Binance DEX, IDEX, and EtherDelta.

2. DEX aggregators

Decentralized exchange aggregators are, as the name alludes, aggregators of liquidity from various DEXs. Their main proposition is to connect traders on their platforms to liquidity pools on multiple other platforms exposing them to a wider variety of trading pairs and deeper liquidity. Aggregators offer a win-win proposition whereby low liquidity DEXs benefit from their service, and users enjoy fast transaction speeds at reduced costs. In return, the DEX aggregators gain more users. Other benefits include the reduction of security and safety risks as they limit the number of platforms traders have to engage with to achieve their trading goals. Additionally, DEX aggregators often operate in a centralized manner, and centralized exchanges (CEX) are more user-friendly than DEXs. Therefore, DEX aggregator users will enjoy seamless user experiences that they would otherwise not have on a typical DEX. Examples of DEX aggregators are rhino.fi (formerly DeversiFi), 1inch exchange, Slingshot, and Matcha by 0x.

3. Automated Market Makers (AMM)

Automated market maker exchanges are the more recent versions of the DEX platforms that were designed to address the shortcomings of using order books. AMMs rely on smart contracts and economic incentives to provide liquidity within their platforms. The main idea behind AMM exchanges is that liquidity is kept within a holding contract whereby investors are incentivized to contribute towards holding pools called liquidity pools. These pools ensure that assets are available for trading whenever other users need them. For example, say a trader needs to convert between Ethereum (ETH) and USD Tether (USDT). They will deposit their ETH into a liquidity pool maintained in a DEX and receive USDT back. The larger the pool is, the higher the liquidity and the easier it is to swap between assets. Additionally, larger pools reduce slippage, which is a difference in price between order placement and execution.

How does a liquidity pool work?

The concept of using liquidity pools is quite simple. Think of it as a pool of water, with the water representing the various components of the pool. A liquidity pool cannot be made up of just one asset; in fact, a majority contains two tokens, but some have experimented with up to eight assets. Investors are incentivized to contribute assets into the pool to provide liquidity and are thus referred to as liquidity providers (LPs). As a reward for their participation, they get a share of the fees traders pay to access or ‘draw’ from the pool. This activity is called liquidity mining. Whenever a trader converts their tokens, they deposit one of the assets contained in that particular pool while simultaneously drawing out the other asset (or one of the other assets held within the pool). The funds are locked and secured using smart contracts, and everything works autonomously. Recommended video: Detailed explainer of the liquidity pool concept Some notable AMM-based DEXs include Bancor, Balancer, Curve, PancakeSwap, Sushiswap, Trader Joe, and Uniswap. Uniswap was among the first platforms to implement this model leading to several other platforms copying it that can easily be identified by using the ‘swap’ tag on their titles.

How Decentralized Exchanges Work

To better understand DEXs and how they work, it is worth understanding how their centralized counterparts work. This is because DEXs are an evolution of centralized exchanges (CEXs). They were introduced to not just take advantage of the blockchain technology but also improve upon and solve some of the challenges facing CEX platforms.

How a centralized exchange (CEX) works

With CEXs, a company serves as an intermediary between traders and investors, offering an interface or ‘market’ to buy, sell, or even hold assets. Due to economic incentives, CEX platforms are generally well-designed to appeal to users, thereby offering more fluid and seamless experiences. The CEX platforms will first register with a regulatory authority that will regulate their activities within a given jurisdiction. After that, they will establish the platform and make it available only to the people it is authorized to serve. The services they can offer include custody of assets and an interface to open and close trading positions. They can do so with digital assets as well as fiat currencies. Support for traditional assets is a major selling point for CEXs over the DEX platforms, and they are able to do this because they are regulated. However, despite their advantages, they also have some glaring shortcomings, including:

Security risks – due to their centralized nature, CEXs attract hackers who may be looking to steal funds, infiltrate systems and make away with customer information, among other reasons; Privacy risks – the CEX platform may abuse its privileges of holding customer data, thereby exposing them to data, privacy, and security risks; Custody risks – holding customer assets could be both a good and bad thing. Some investors need help to self custody their digital assets, and using a CEX platform that takes care of that is a great solution. However, holding large quantities of customer assets also presents a great security risk which has been exploited on numerous occasions in the past; Service availability – due to compliance with regulatory provisions, several CEX platforms are geographically limited and have little to no access to potential customers.

Blockchain technology was created to encourage economic sovereignty, which necessitated the innovation of DEXs.

How a decentralized exchange works

The basic operating principle for DEXs is that they host peer-to-peer marketplaces and help circumvent the need to use centralized platforms. With DEXs, users can interact directly with one another thanks to the following common features:

No geographical limitation – anyone anywhere can access these DEX platforms and trade with other users at any time; Self custody – DEXs do not require traders to deposit their funds anywhere to access services. Users are able to swap tokens directly between wallets; Anonymity – except for some DEX aggregators, some of which operate in a hybrid nature, AMMs and order book-based DEXs do not ask for identifying information from their users; Unlimited asset support – given that DEX platforms avoid compliance with regulatory agencies, they are able to provide unlimited support for all types of digital assets, from cryptocurrencies to non-fungible tokens (NFTs).

Other than the above features, DEXs also have inherent advantages such as reduced fees, simple interfaces, and quick transaction processing times. By cutting out the intermediaries present within the CEX model, it is possible to realize most of these benefits.

How to use decentralized exchanges

DEXs are becoming increasingly more popular compared to a few years ago, and part of this is due to the growing popularity of Bitcoin (BTC) and the recent fall of the FTX exchange. The latter further proved the shortcomings of centralized exchanges and highlighted the importance of self-custody of digital assets. Before you can start using a DEX, it is vital to consider some things since different platforms offer varying features.

Factors to consider when choosing a DEX

Blockchain network – there are several blockchain networks, some of which support smart contracts and, therefore, can host DEXs. The largest of them is Ethereum, but there are several worthy alternatives to consider depending on your needs. To help you choose between different networks, first identify the asset you want to acquire and which one you already have in your wallet to swap; Asset liquidity – liquidity is the measure of how easy it is to buy or sell an asset in the open market. The easier it is, the more liquid the asset. The best way to measure liquidity is to use the total value locked (TVL) figure, which is reported on most DEX scanners. Be sure to check the specific TVL number associated with the pool holding the assets you want to swap; Reputation – it is important to consider how popular a given DEX platform is and whether it has a negative or positive reputation. In the cryptocurrency space, there are several ways to be scammed, but the most common is to use unvetted platforms whose origins hide shady operators. Do your research on every platform you are considering and ensure that the exchange is solid; User experience – several things affect a user’s experience, including the interface, ease of compatibility with users’ wallets, network speed, etc. You may not be able to gauge a platform’s user experience until you use it, so to avoid bad choices, perform thorough research on each exchange and read about other people’s views; Asset support – there are over a hundred thousand tokens in the crypto marketplace hosted on hundreds of independent blockchain networks. Consequently, several DEXs are serving these various networks, and most do not support tokens on unsupported protocols. If you need to swap tokens on different blockchains, you will need a DEX that either supports these different protocols or one that supports a wrapped version of the token of interest. For example, ETH also exists as Wrapped ETH (WETH) on the BNB Chain ecosystem.

How to get Started with DEXs

At this juncture, we assume that you have followed the previous section and chosen a DEX that offers support for your tokens of interest. Next, ensure you have a cryptocurrency wallet pre-funded with the asset to swap. In this section, we will be using MetaMask, one of the best self-custody wallets for storing all types of digital assets. Then proceed through this brief example of how to start using Uniswap, an exchange we mentioned earlier, which has one of the deepest liquidity across a wide range of liquidity pools. Even though you may opt to use a different DEX, the process is similar in the majority of the cases.

Step 1 – Connect your wallet.

Visit the DEX’s dApp (decentralized application) page. To access Uniswap, first head to its official website and click on the [Launch App] link on the top right side or the middle of the page. You will be redirected to the App interface. Locate the [Connect Wallet] button, Most DEXs will have it in a prominent location. On Uniswap, it is on the top right side. Tap it and select an application option from the drop-down or pop-up screen. Login to your wallet account and authorize the connection to the DEX. Once you do, you are now able to start using the exchange.

Step 2 – Swap tokens.

Once you connect your wallet to Uniswap, you will be able to see a swap window, as shown below. On the navigation bar, you can choose an action, including navigating directly to the swap panel or choosing the token selection or NFT swap pages. Alternatively, you can use the search box labeled [2] to search for a token of interest. Once you locate it, it will be pre-populated on the swap window. Note: Uniswap provides the TVL (total value locked) and trade volume numbers for assets, as shown in this image in the [Stats] section. This helps gauge the amount of liquidity held in a particular pool. It is also worth noting that Uniswap currently supports up to five different blockchain networks. To select the network to use, click on the network symbol next to the wallet connect button. The network you choose will affect the assets that will be available for you to trade. Therefore, if you do not find an asset in one network, try switching networks and searching for it on another. If you opt to use the direct swap method, click [Swap] on the top navigation, then choose which assets you want to swap. That is it. Hopefully, you now have a good idea of how DEXs work and how to start using one. You can dig deeper into your DEX of choice and see what other features you can take advantage of. For instance, with Uniswap, you can buy and sell non-fungible tokens.

Pros and cons of using DEXs

Final thoughts

Decentralized exchanges are a great tool for cryptocurrency users to maintain their financial sovereignty. They enable everyone to access services without discrimination which is the original ethos of Bitcoin, the flagship cryptocurrency. As discussed in this guide, several factors should be considered when choosing a platform. It is imperative to go through that list and check it off every time you come across a new DEX you want to try out. This not only reduces your risks but also ensures that any platform that lands into your crypto toolbox does so out of merit. Disclaimer: The content on this site should not be considered investment advice. Investing is speculative. When investing, your capital is at risk.

What is a Decentralized Exchange  DEX   Definition   How to Use It - 39What is a Decentralized Exchange  DEX   Definition   How to Use It - 21What is a Decentralized Exchange  DEX   Definition   How to Use It - 36What is a Decentralized Exchange  DEX   Definition   How to Use It - 31What is a Decentralized Exchange  DEX   Definition   How to Use It - 16What is a Decentralized Exchange  DEX   Definition   How to Use It - 72