Notum logo

Blog

All

DeFi

Blockchain

How-to Guide

Tokens & Coins

Product Updates

Announcements

Lending

Trading

Staking

Crypto

What Is a Decentralized Crypto Exchange? How Do DEXs Work? | Notum

By Notum

Oct 08, 20226 min read

image

Intro

More and more people are becoming aware of the profitability of cryptocurrency trading. Many traders bet on decentralized exchanges (DEXs) to gain even greater financial independence. Due to the growing popularity of DEXs, we invite you to familiarize yourself with such platforms' concepts and operation principles. 

Key Takeaways:

  • DEXs are revolutionary and provide users with benefits such as anonymity, security, and sovereignty.
  • Depending on the type of DEX, they have different operation principles.
  • Despite many undeniable advantages, DEXs are still developing and have some disadvantages that must be weighed.

 

What Are Decentralized Exchanges?

Decentralized cryptocurrency exchanges are one of today's main tools for trading crypto assets. At the dawn of the cryptocurrency industry, exchanges were predominantly centralized (CEX) and had several inherent drawbacks. The scourge of CEXs has always been hacker attacks. History remembers many major hacks, resulting in investors losing huge sums. With the development of the crypto industry and an increased interest from the masses in new financial instruments, DEXs entered the market. A decentralized exchange is an exchange that operates based on a distributed ledger, does not store funds and personal data of users on its servers, and acts only as a platform for finding matches on orders for the purchase or sale of assets. Trading on such platforms occurs directly between participants on a peer-to-peer basis, i.e., without financial intermediaries. This helps to reduce the costs inherent in centralized exchanges and increases the security of all processes. Decentralized exchanges are gradually flooding the market, the list of the most popular ones includes Uniswap, PancakeSwap, and Sushiswap.

How Does DEXes Work?

Surely most traders are already well acquainted with the operation principles of centralized exchanges, such as Binance, Coinbase, Kraken, etc. The trading functionality of CEX and DEX is quite similar, but the principles of their operation fundamentally differ. A centralized exchange acts as a bank. A trader deposits cryptocurrency, and the exchange stores it and uses it for its purposes, executing your buy, exchange, sell, and other orders on request. In the case of a decentralized exchange, the platform does not store funds. That is, you have full control over your funds (i.e., “you are your bank”). As a rule, there is a protocol for matching orders, and funds are transferred between wallets using smart contract technology. This approach guarantees your transactions' security and eliminates the possibility of hacking your exchange account. The basic mechanisms of operation of decentralized exchanges may vary. For example, AMM (automatic market maker) can be used instead of the usual order book. In addition, as part of the DEXs’ work, the fiat transactions are excluded since DEXs rest on the blockchain.

Types of DEXs Exchanges?

AMM-DEX

AMM-DEX (decentralized exchanges with an automated market maker algorithm) operates based on smart contracts that hold funds in pairs of liquidity pools. In such exchanges, liquidity is provided by liquidity providers (LP).

As a reward, liquidity providers receive LP tokens and a percentage of trading commissions. The amount of remuneration is determined in proportion to the contribution of suppliers to the liquidity pools. DEX-AMM does not utilize order books. Trading occurs between pools, and the asset price is calculated using AMM algorithms.

The first AMM-DEX to achieve widespread popularity is Uniswap. It became a model for dozens of clone projects and remained the largest DEX on the Ethereum network.

The Uniswap open source has been repeatedly borrowed to compete for DEX in the Ethereum ecosystem (SushiSwap) and alternative EVM-compatible blockchains.

The largest AMM-DEX in the BSC ecosystem is PancakeSwap. With small differences in design, the exchange mechanics are the same as on Uniswap.

Along with Uniswap, AMM-DEX Balancer and Curve are the largest in terms of the amount of value blocked on the platform.

Decentralized exchanges with backup systems (RS-DEX)

In AMM–DEX, the price is automatically set by smart contracts. Thus, liquidity stability is achieved, but market makers get the opportunity to manipulate the market since AMM-DEX is subject to non-permanent losses.

Reserve Systems solve the problem of potential market manipulation. They are similar to AMM protocols, with one difference — AMM protocols are controlled by algorithms, whereas the RS model puts the control in the hands of users. RS controls asset prices using its own rules and can set low slippage for large transactions.

An example of a backup system model is the Kyber Network on-chain protocol, which collects smart contracts that operate on any blockchain. Some Kyber reserves (professional market makers) set and control prices based on their rules. Prices adapt to market conditions. When necessary, low slippage is set for large transactions. To become a reserve, a liquidity provider must obtain managers (maintainers) approval. Similarly to Uniswap, Kyber Network also integrates liquidity pools from other platforms, providing additional liquidity for assets with high demand and offering the best rates for trading pairs.

Other participants in the exchange process are takers (any user addresses, DEX, smart contracts) who receive liquidity from reserves. Although there is no order book in the Kyber Network, the protocol uses a limit order tool that allows participants to set the price at which they want to trade their assets.

P2P DEX

P2P exchanges use an order reconciliation system. Order books include records of all open transactions for the purchase and sale of specific trading pairs.

A buy order indicates that a trader is ready to buy or bid on an asset at a certain price. A sell order means the trader is ready to sell the asset or ask the buyer about the price.

P2P DEX can be divided into the following subgroups:

  • DEX with atomic swaps on-chains, for example, AtomicDEX.
  • Off-chain DEX (off-chain reconciliation of orders and online calculations), for example, 0x.

DEX Aggregators 

DEX aggregators have recently become increasingly popular. According to Binance CEO Changpeng Zhao, such protocols contribute to the DeFi sector's rise. DEX aggregator is a platform that combines several DEX exchanges into one platform to provide its users with the most efficient routes for swaps on all platforms. One of the most famous such platforms is 1inch. The protocol collects liquidity from DEXs, using smart contract technology for this. Smart contracts divide one transaction across several exchanges, providing the most profitable and optimized transactions.

How to Use Crypto DEX Exchanges

The way to work with DEX depends on its type. Some, like Binance DEX, require the creation of a separate cryptocurrency wallet. In addition, you will need to set a password and save the keys, and a passphrase, which you will later need to access the funds.

Other DEXs work with web3 wallets (for example, Metamask or Trust Wallet) or Ledger and Trezor hardware wallets. In this case, you have to click the “Connect Wallet” button or similar and then enter the password from your wallet to use the funds in working with the protocol. With each transaction, the wallet will request the user’s permission.

In both cases, the user is not required to provide any data, i.e., no phone, email, name, etc. Trading takes place anonymously.

Pros & Cons

Undoubtedly, DEX is another step towards the revolution and significantly contributes to the development of DeFi. However, such platforms, along with advantages, have a fair share of disadvantages. It is extremely important to weigh the pros and cons before diving.

Advantages

Disadvantages

Full control over funds. There is no need to trust them to third parties and companies.

Transaction speed. Platforms may face scalability problems because the blockchain imposes certain restrictions on the number of TPS.

Anonymity. It is not required to provide any personal data or undergo verification.

Trade restrictions. It is difficult to organize the exchange of cryptocurrencies located on different blockchains. Although this problem is already partially solved by synthetic assets.

Safety. Since all funds are stored in users’ wallets, hacking risks are reduced.

Limited features. Many options for traders, such as stop loss or margin trading, are unavailable to users of most decentralized exchanges.

A huge variety. If you want to find a hot token in its infancy, DEX is what you need. 

 

Availability. While regulators in various countries impose a ban on the use of crypto exchanges, DEX platforms can be used by anyone and from anywhere.

 

Of course, today, DEXs cannot become a complete replacement for CEXs. However, many experts are confident that it is for DEX that the future and the shortcomings that they bear today will be corrected over time.

Conclusion

The DEX concept is still developing. Against the background of incidents with centralized exchanges, users are paying more and more attention to decentralized ones, recognizing their advantages. In a few years, DEX may leave CEX far behind. It should also be noted that, in general, DEX fits much more logically into the ideology of blockchain and cryptocurrencies, which are initially based on decentralization and independence.