What is a DEX? Decentralized Exchanges Explained – Part 2

In our previous article “What is DEX – Part 1” we discuss what a DEX is, how it works and the benefits of using it. In this Part 2, the TokenMason team takes a deeper dive into DEX and discuss its different types, how it compares with Centralized Exchanges (CEX) and explain Layer-2 DEX. Types […]

In our previous article “What is DEX – Part 1” we discuss what a DEX is, how it works and the benefits of using it. In this Part 2, the TokenMason team takes a deeper dive into DEX and discuss its different types, how it compares with Centralized Exchanges (CEX) and explain Layer-2 DEX.

Types of DEX

The three main types of DEX are:

  1. Automated-market-makers (AMMs)
  2. Order-books
  3. Over-the-counter (OTC)


Automated-market-maker DEX

Uniswap and Sushiswap– two of the best known and most used decentralized exchanges on Ethereum – are both Automated-market-makers (AMMs). AMMs are one of the simplest types of DEXs to use and tend to have a large array of tokens available to trade.

As someone who wishes to make a trade, you can always execute the order, even if there is nobody who wants to make the opposite trade that you want to make. This is allowed because there is a pool of funds that are always available within the DEX protocol. The price is set based of supply and demand. For example, each time that someone sells some of token X, the price goes down. Similarly, if they buy, the price goes up. This means that the prices naturally adjust based on trades that take place.

Other parties, known as liquidity providers, deposit into the pool and earn fees on behalf of other users who make trades.

Order-book DEX

An order-book DEX alternatively contains a list of orders from different users all over the world. Each time someone wished to trade either buy or sell, their intent is added to a list, and if the two parties want to make opposing trades, they are matched. The DEX protocol then permits the secure transfer of funds between parties. This is often the most efficient was being a fast and cheap way to trade. This is relegated to very liquid markets where there are a lot of market participants willing to trade the same cryptocurrency.

Other decentralized exchanges, such as Deversifi have a hybrid approach where they utilise an order-book model, are also working to add AMM style features as a secondary source of liquidity.

Over-the-counter DEX

Sometimes people wish to trade extremely high value assets and might already have found someone else that they want to complete the trade with e.g. hypothetically you needed to swap 1 million dollars of one token for another. It would be difficult to do this on a traditional market because there will not be enough people willing to complete the order instantly.

In centralised finance, we therefore require the concept of an independent third party in the form of an escrow agent. Two parties wishing to exchange and asset, both send them to the escrow agent. Once the escrow agent has received both, they release the assets simultaneously to the buyer and seller. This prevents one of the parties from absconding with the assets of the other without honouring their part of the deal.

An over-the-counter DEX automates this crucial role of the escrow agent and will, only releasing the assets if both sides have provided them.

How does a DEX compare with a CEX?

The question of DEX vs CEX is one that is the commonly queried, and there is no clear-cut answer as to which is superior. Both have advantages and disadvantages to distinct types of participants, and most use both at various times depending on their requirements. 

Advantages of Centralised Exchanges (CEX):

  • Able to deposit funds with a credit card or by making an online bank transfer which makes it very convenient
  • No requirement to worry about how to protect your wallet, knowledge of blockchains, or securing your cryptocurrency private keys: the exchange takes care of all the aspect of security for you.
  • Are user-friendly and have superior customer service in the form 24-hour online chat support or even a contact centre rep who can answer questions if you are struggling with an action.

Advantages of Decentralized Exchanges (DEX):

  • Often have lower fees than centralised counterparts, this is even more evident when compared to premiums high fees services such as Coinbase.
  • Wider control and flexibility over your assets, and the how they are secured.
  • Pseudonymity and anonymity for funds, and greater access for anyone in the entire world. User can have multiple accounts.

DEXs offer a significantly more flexibility, and there are a wider range of available options afforded to the investors and traders. Importantly, the greater complexity means that they tend to be preferred by individuals who are well versed with the basics of crypto and looking to take a deeper diver and further diversify their portfolio holdings.

What is a Layer-2 DEX?

DEXs were originally built on Ethereum around the same time as tokens started to be created. The earliest version was not widely used and clunky had poor UI and interfaces but were able to prove the concept. Quickly after the validation of this model, a larger range of innovations emerged providing the foundations for many of the exchanges we have today.

Back in 2017 and 18, the initial attraction of using a DEX was that it was cheap to use.  However, DEXs on Ethereum network were to a degree a victim of their own success. As more participants started to make trades and swaps via DEX’s, the blockchain became congested driving up transaction cost (gas price) which started to rise. From a starting point of almost zero, the gas price for a trade on a DEX like Uniswap exceeded $50 in 2021 (without factoring in the trading fees!).

This is how the concept of a ‘Layer-2’ DEX comes in play!

Layer-2 technology assist to reduce the cost of blockchain transactions by utilising innovative cryptographic techniques, resulting in all of the benefits of a DEX without the friction and cost associated with engaging directly with Ethereum.

Uniswap  is one of the earliest examples of a Layer-2 DEX. Whilst there is a transaction cost needed to move funds into Uniswap, once in there, transactions become free, allowing the simple swap and purchase of tokens without needing to worry about congestion.

We hope you have found Part 2 of our DEX blog valuable. Should you need to build out a DEX, smart contract or decentralized app look no further than team of world class developers at TokenMason who will help guide you through and deliver your idea!

TokenMason is a leading blockchain development company that helps organizations build customized blockchain solutions, such as launch ICOs, develop cryptocurrency, smart contracts, apps that use cryptocurrency, decentralized exchanges and other blockchain-related projects.

Submit an enquiry if you would like to receive a quote for your customized blockchain project or discuss a strategy to make your blockchain-related idea a reality. TokenMason welcomes the opportunity to discuss how we may be able to assist.

Categories :


Leave a Reply

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

About Us

TokenMason is the one-stop-shop for blockchain application development services including custom ICO, cryptocurrency and token design, development and distribution.