What is a Decentralized Exchange?

Aman Kuvera
4 min readMar 18, 2022

Exchange in the crypto space is a platform where users buy & sell(exchange/trade) their token holdings for other tokens directly from other users without a centralized middleman who does it for you. Let me explain how exchanges work in a centralized system for a better understanding. When you travel from one country to another, you would essentially want to have your money converted to the national currency of that particular company so you can make transactions there. The centralized bank of your country or the centralized bank of the country you are traveling to does this currency exchange for you. In return for this, they take a large amount of your money as fees. This fee is variable based on the amount you exchange. In the crypto space, you do not have to depend on centralized entities for exchanging your tokens, you directly do it from other users using the exchanges. Let's take a deep dive into this!

There are two types of exchanges:

  1. Centralized exchanges (Example: Binance, Coinbase, WazirX, etc,.)
  2. Decentralized exchanges (Example: Uniswap, Quickswap, Pancakeswap, etc,.)

What are Centralized exchanges?

Centralized exchanges are exchanges where you rely on a third party for your crypto trades. Instead of buying/selling your tokens directly on the network and making a public ledger entry for it, these exchanges have their own liquidity out of which the user trades. These trades do not have a transaction entry on the blockchain. The only blockchain entry is when you transfer your tokens to/from some other wallet/platform. Centralized exchanges can restrict a particular person from their platform. These exchanges require the users to submit legal ID and bank details as well, in order to get started with deposits and withdrawals.

*liquidity: the availability of tokens for users to buy and sell. In centralized exchanges, the centralized entity or organization takes care of the liquidity and sometimes they have their own user-based liquidity pools. Whereas, in decentralized exchanges, there are only user-contributed liquidity pools (liquidity pools are where users deposit tokens in order to get rewards, we’ll learn about them in detail in the upcoming articles)

👉 Let me explain this with an example,

In Indian culture, there is a tradition where when guests visit your home, they hand over some amount of cash to the children in the house for pocket money. As soon as the guest leaves, mom takes away the money from the children. Now, think of the centralized exchange as the mother in this scenario. The children do not own the money anymore. It is completely handled by their mother. Even though the mother assures the children that the money is their’s, it actually isn’t because the mother has the custody of the money. At any point in time, the mother can lose the money or claim that the children will not get the money.

This is exactly how centralized exchanges work! You do not have custody of your tokens when you buy/sell using centralized exchanges. The exchanges just tell you that “they have N number of XYZ tokens which belong to you”. You have to believe them and rely on the security measures they take to protect the tokens.

What are Decentralized Exchanges?

👉 Exchanges that aren’t controlled by any human or centralized entities and are completely automated through smart contracts.

👉 These are more secure and unlike centralized exchanges, these do not require any identity verification or KYC and no one can restrict anyone from executing trades on these platforms.

👉 Every transaction or trade made using decentralized exchanges is recorded on the blockchain’s public ledger.

👉 The trading fees on these exchanges are relatively less and the liquidity is also lower when compared to centralized exchanges because of the less user-friendly process of trading.

👉 These exchanges aren’t regulated and they do not require any license to exist.

👉 These exchanges have fewer chances of getting hacked!

👉 Example: Uniswap, Pancakeswap, Spookyswap, Sushiswap, etc.

In order for a token to get listed for people to be able to trade it on centralized exchanges, there are a lot of approvals and processes involved. On the other hand, anyone can list a token with ERC20 standards on Uniswap and people can trade it there.

What are the kind of attacks possible on decentralized exchanges?

Even if the decentralized exchanges aren’t prone to many attacks, there are a few which were witnessed in the past. For example,

In 2020, a decentralized exchange called Sushiswap was launched. Uniswap the most popular existing decentralized exchange had all the liquidity from the users and so to take away liquidity from Uniswap, the Sushiswap team created a native token for their exchange and told the users that they’ll be rewarded with Sushiswap tokens if they provide liquidity on Sushiswap. In this way, Sushiswap aimed to steal the liquidity from the Uniswap exchange. Such attacks are called Vampire attacks.

The most popular decentralized exchange is Uniswap with the highest number of users and transactions.

The different types of Decentralized exchanges are,

  1. Automated Market Makers (AMM)
  2. DEx Aggregators
  3. Order Book Dex

👉 We’ll learn about them in detail in the upcoming article.

Connect

(click here)

--

--

Aman Kuvera

A MERN Stack Web developer and software engineer. I write about Web development, Web3, Crypto Currencies, and Basic concepts of Blockchain for beginners