Search post, tags and authors
What is a DEX?
For Beginners

What is a DEX?

By Oreld Hadilberg
Reviewed by Tony Spilotro

Table of Contents

Decentralized exchanges are platforms that use automated smart contracts (self-executing contracts) to facilitate trades between users. Unlike Centralized exchanges that act as a form of intermediary between a trader and liquidity provider.

DEXs uses liquidity pools to ensure that trades can be executed and utilizes the concept of automated market maker. This ensures transactions are completed as long as there’s enough liquidity in the pool. The freedom and anonymity provided by DEXs have resulted in a rise in popularity, and they’ve been central to the DeFi boom.

Ethereum, BNB Chain (formerly Binance Smart Chain) and Solana are three of the most popular blockchains that support DEXs.

How Do Decentralized Exchanges Work?

Decentralized exchanges are designed to ensure scalability, decentralization and trades at the sub-atomic level. Many DEXs implement different systems such as automated market makers (AMM) and order books to achieve this.

Some platforms also implement unique aggregators connected to DeFi oracles, which search different on-chain platforms for the best prices for users to trade their assets. However, these platforms can still be classified as DEXs since users can directly trade on their platforms and access different options — low gas costs, low transaction fees and low slippages.

The significant degree of determinism provided by blockchain technology and irreversible intelligent contracts is one of the critical advantages of DEXs. Whereas centralized exchanges (CEXs) like Coinbase or Binance support trading using the exchange’s internal matching engine, DEXs execute deals through smart contracts and on-chain transactions.

Furthermore, DEXs let users keep full custody of their assets while trading using self-hosted wallets. DEX users are usually charged two sorts of fees: network costs and trading fees. Network fees relate to the on-chain transaction’s gas cost. In contrast, trading fees are paid by the underlying protocol, its liquidity providers, token holders, or a mix of these organizations as stipulated by the protocol’s architecture.

Many DEXs envision permissionless, end-to-end on-chain infrastructure with no single point of failure and decentralized ownership among a community of dispersed stakeholders. This usually implies that protocol administration powers are handled by a decentralized autonomous organization (DAO), comprised of a community of stakeholders that vote on crucial protocol choices.

However, increasing protocol decentralization while remaining competitive in a crowded DEX environment is difficult since the DEX’s core development team can typically make better-informed judgments regarding mission-critical protocol functionality than a dispersed group of stakeholders. Nonetheless, many DEXs use a decentralized governance structure to boost censorship resistance and long-term robustness.

What are Order Book DEXs?

Order Books DEXs use the classic trading paradigm, which predates the development of Defi.

As stated, traders place buy and sell orders for a property, and the order book sorts them according to their pricing. This implies that you may trade any asset as long as it has supply and demand.

There is a reasonable probability you’ve previously used an order book if you’ve ever traded.


An off-chain order book DEX facilitates trading by integrating blockchain-based order books with on-chain settlement. The goal is to enable traders to get the advantages of decentralized and conventional trading.

To conduct transactions, an off-chain DEX employs a peer-to-peer order book. Order books provide data regarding trading activities such as price, volume, expiration date, and whether the order is a buy or sell. It’s possible for a user who sees your order on the order book to put in an order on DEX, and the smart contract will check to see whether funds are available for the transaction. The purchase is finalized if everything goes as expected.


On-chain transactions take place on a blockchain and are reflected on both the distribution and the public ledger. On-chain transactions have been approved and certified by miners or authenticators. These may then result in an overall upgrade to the blockchain network.

Furthermore, miners must have an agreed number of confirmations for an on-chain transaction to be completed. The time it takes to execute an on-chain transaction also depends on network congestion. Therefore, when there is a high number of transactions to be verified, transactions may be delayed.

What are Automated Market Makers (AMMs)?

Automated Market Makers provide a unique way for DEXs to cut off middlemen/intermediate by using smart contracts to determine the price of tokens. Instead of centralised exchanges' traditional order book system, AMM uses a mathematical formula to manage trades and ensure that liquidity is properly channeled into completing transactions.

Vitalik Buterin, Ethereum’s co-founder, inspired this concept when he wrote an article on how to facilitate transactions using smart contracts that held tokens that could be distributed in an even manner to solve the liquidity problem faced by DEXs.

AMM relies heavily on blockchain oracles which provide on-chain information on prices from exchanges and other protocols. Integrating these oracles ensures that the prices offered on DEXs are similar to what is attained on centralized exchanges.

Liquidity on AMM-powered DEXs is maintained using an incentivised method of allowing traders to offer their capital in what is known as liquidity pools. Liquidity miners can deposit on specific liquidity pools with their tokens and get a cut of fees transaction fees paid by traders who complete transactions.

What are DEX Aggregators?

As earlier stated, DEX aggregators provide users with information from different protocols by scanning on-chain information. Users get options on which DEX to interact with and the best platforms to stake their liquidity.

DEX aggregators also safeguard customers from pricing fluctuations and limit the likelihood of failed transactions. Furthermore, some DEX aggregators pull resources from centralized exchange, which provides optimal user experience and more options. However, users make all transactions within their platform, leveraging the benefits of a decentralized system.

What Are The Benefits of Using a DEX?

Trading on decentralized exchanges may be expensive, especially if network gas costs are high when the transactions are conducted. However, there are several advantages to using DEX platforms.

No KYC/AML or ID Verification process

Currently, decentralized exchanges are not obliged to follow KYC or AML standards. This is because DEX users conduct trades directly with one another using intelligent contacts, as opposed to a central trading desk seen in a cryptocurrency exchange.

Reduced Counterparty Risk

Counterparty risk is a major problem centralized exchanges face and occurs when an intermediate party fails to complete their end of transactions. This is usually common during periods of high volatility when the risk for liquidity providers is very high and many CEXs pause transactions during this period.

DEXs mitigate against this due to their decentralized nature as all transactions are made P2P with the aid of smart contracts and liquidity pools.

All Tokens Can be Traded With Minimal Requirements

Users may trade new and obscure cryptocurrencies that were previously impossible to swap on a DEX or a DApp (decentralized application) established in conjunction with a DEX. Typically, centralized exchanges allow about a dozen projects, and the majority only support the most popular cryptocurrencies, making it difficult to trade smaller and less popular tokens, especially when regulated exchanges exclude users from other countries. Also DEXs use non-custodial wallets that give users full control of their assets compared to custodial wallets used by centralized exchanges.

There Are Some Risks associated with Dex

However, despite the perks mentioned above, decentralized exchanges have several disadvantages, including a lack of technical understanding required to participate in these exchanges, many smart contract vulnerabilities, and an unvetted token listing list itself. Highlighted below are a few of these demerits;

No Recovery Ability

Unlike centralized exchanges maintained by commercial corporations with workers, DEXs cannot retrieve assets that have been lost, stolen, or misplaced. Due to the lack of a KYC process or the option to cancel a transaction in the event of a hacked account or the loss of a private key, users cannot retrieve data or recover their investments. No support personnel or helpline will notify if funds are missing or a private key is stolen. Refunds are incompatible with the network’s paradigm since all transactions are handled and stored on the blockchain in smart contracts with no owners or overseers. Users are often unable to regain access to their assets.

Low Liquidity

The availability of tokens at DEXs is mainly determined by the growing engagement of individual market makers. This might result in lower levels of liquidity for less popular tokens compared to CEXs. Centralized exchanges facilitate about 99 per cent of crypto transactions, implying that they account for the vast bulk of trade activity. Decentralized exchanges often lack liquidity due to a lack of volume, and it may be challenging to identify buyers and sellers when trade volumes are low.

Limited Execution Speed

Due to the underlying blockchain’s limited scalability, execution times may be slower when compared to CEXs.

Limited Trading Functionality

DEX technology does not let you purchase digital assets using fiat currency. You cannot trade fiat or withdraw monies to your bank account, which may create a barrier to new commerce. Furthermore, special trading markets like leveraged trading and low liquidation levels may not be available on most DEXs.

Scalability Issues

Scalability is a problem that infrastructure blockchains are working hard to tackle, and DEXs should eventually provide comparable execution speeds as their centralized counterparts.

Are Decentralized Exchanges Safe?

Decentralized exchanges vary from centralized businesses in that they allow customers to keep control of their assets by running vital services on the blockchain: they employ the technology that underpins cryptocurrencies to enable safer and more transparent trading.

However, it should be noted that due to their low listing requirements, several scam projects find their way to DEXs. Some common scams in DEX include rug pull and pump and dump. So it is important to do your own research before purchasing a token on a DEX.

How Do I Buy Crypto In Decentralized Exchange?

Buying crypto on a decentralized exchange is relatively straightforward. You need to connect a non-custodial wallet to the platform and select the trading pair you want to trade. You should also have some amount of the native token of the blockchain ecosystem (e.g ETH for Ethereum or BNB for BNB Chain). Once there’s enough liquidity in the liquidity pool, the transaction should be completed and you receive the tokens in your wallet.

What is a DEX Fee?

Unlike CEX transactions, which would charge higher trading fees to cover operational expenses and regulatory charges, DEX transactions may be conducted at a cheaper cost due to eliminating the middleman’s share. Furthermore, some DEX charge a flat rate on swap fees for making buy and sell orders on their platform.


What Are Examples of Decentralized Exchanges?

The following are the top-ranked decentralized cryptocurrency exchanges in terms of traffic, liquidity, and trading volumes:

  • Pancakeswap
  • Uniswap

How Do Decentralized Exchanges Make Money?

Decentralized exchanges make money like centralized exchanges do: by charging fees for each transaction that takes place on their platform. This does not contradict the principle of decentralization, as it may seem at first, since decentralized exchanges need infrastructure to function. In their case, however, the fees are shared amongst the infrastructure providers, or primary nodes, as they prefer.

Running a decentralized exchange with no fees would be uneconomical since the inventor of the exchange takes all risks and receives no benefits.

What Is The Biggest Decentralized Exchange?

With a market share of 43 per cent as of May 2022, Uniswap is now the most prominent decentralized exchange. The Uniswap DEX is an automated market maker (AMM) which uses decentralized liquidity pools driven by smart contracts.

Are Decentralized Exchanges Legal?

Yes, decentralized exchanges, like centralized exchanges, are lawful. DEXs are subject to the same legislation in all countries.