Tagged

What is a decentralized exchange?

A guide on decentralized exchanges and how to use them with Argent

Updated

Apr 22, 2021
Edward Wilson

Quick summary

A decentralized exchange (or DEX) enables buyers and sellers to directly exchange their cryptocurrency on a peer-to-peer basis without needing to trust an intermediary or each other. That is just one of the many benefits of a DEX, and this article will go into more detail about them.

What is a Decentralized Exchange?

A centralized exchange (or CEX), e.g. Coinbase or Binance, is a company that facilitates the buying and selling of assets. A CEX takes custody of funds and can shape - and reshape - the rules that govern the platform. Too often in crypto, they’ve proven vulnerable to hacks and theft, e.g. Mt. Gox. As the saying goes, “Not your keys, not your crypto”.

In contrast, DEXs are autonomous decentralized applications (Dapps) that enable buyers and sellers to exchange their cryptocurrency without losing custody of their funds. They operate 24/7 and remove the need to trust a third party to manage trades.

The Rise of Decentralized Exchanges

CEXs used to be the only viable option to exchange cryptocurrencies, but this changed with the summer of 2020, known as “DeFi Summer”.

DeFi Summer started with Compound rewarding users with its COMP token for using the protocol. Other DeFi Protocols saw this model and iterated on it to drive growth. Every day, new DeFi tokens entered the market, available on DEXs, and as money began to flow into DEXs, it opened the floodgates for their growth.

A chart showing the monthly trade volume of Coinbase and Uniswap

In June 2020, Uniswap had $452m in monthly volume, but this rose to $15.3bn by September. In doing it became the first DEX to overtake Coinbase. Since then, Uniswap has more than doubled its monthly trading volume to $31.6bn. Uniswap may be the leading DEX but isn’t the only option, as alternatives have also grown rapidly.

How do Decentralized Exchanges Work?

There are three types of DEX, and they are:

  • Automated Market Maker (AMM): A fully decentralized exchange that relies on liquidity pools and liquidity providers, not buyers and sellers like traditional financial exchanges. The tokens in liquidity pools are priced by an algorithm that automates the prices depending on market demand. Since AMMs do not rely on buyers and sellers, they operate 24/7, as trades can happen at any time. Uniswap, the leading AMM, has never gone down since it went live in 2018. Other AMMs are Curve, Balancer and SushiSwap. 
  • Off-Chain Order Book: A model that decentralizes the traditional financial exchange. Users trade on peer-to-peer order books with the trading activity occurring outside of the blockchain to reduce gas costs and increase speeds. Only trade settlement happens on-chain. Some examples of off-chain order book DEXs are dYdX, IDEX and 0x.
  • On-Chain Order Book: The most decentralized option but isn’t viable for most blockchains as each transaction will have to occur on the blockchain. Ethereum, for example, can only process around 15 transactions per second, compared to 76,000 per second with Visa. So using Ethereum to trade will be slow compared to centralized options. If the network is congested, this option can also be very expensive. There are currently no options for on-chain order book DEXs.

Benefits of DEXs

Security

Counterparty risk is drastically reduced on DEXs, compared to CEXs, as they do not have access to user funds. Mt. Gox. is one example where user funds were compromised, but sadly, this isn't the only example.

Reputable DEXs will be audited, with their reports being accessible for anyone to read. They will also have bug bounties to reward hackers if they find any issues to prioritize security.

Permissionless

AMMs like Uniswap are permissionless as anyone, anywhere, can create liquidity pools and trade them. Teams that have a project with a token can create a liquidity pool and subsequent trading pair. This means teams can rapidly create liquid markets for their tokens

Control

Users are free to use their funds however they wish with a DEX, giving them full control. In contrast, CEXs can prevent access to specific markets, limit your activity and, at worse, freeze your funds. 

Privacy

CEXs require users to give up their sensitive personal data to use the platform. That information could get compromised if the exchange gets hacked, causing significant harm to the user. In contrast, all you need for a DEX is an Ethereum wallet and some Ethereum to pay for transactions.

DEX Aggregators 

While you can trade directly on a DEX, the rates offered may not be the best in the market. That’s what DEX aggregators solve, as they provide a convenient solution to find the best possible trade available quickly and efficiently. They achieve this by using the liquidity from a wide range of DEXs, to find the best route for your trade. For larger transactions, a DEX aggregator may split the transaction into smaller ones to utilize different liquidity pools and this is known as pathfinding.

Think about DEX aggregators as a search engine for DeFi. It is important to find the best rate for each trade. We use search engines to find the best price for our flights and hotels, so why not use one for exchanges?

An example trade between ETH and DAI on Paraswap with routing between Uniswap and Balancer

There are three DEX aggregators that are most commonly used, with each aggregator focusing on one or more specific points, like cheapest gas or best price. Here is a list of DEX aggregators ordered by market share, explaining their niche:

  • 1inch: The dominant DEX aggregator by market share. They let users optimize either the price or gas usage. 
  • Matcha (0x): An alternative to 1inch that specializes in what they call 'adjusted price', which is the final price paid per transaction when adjusting for the price of gas by optimizing Matcha’s API. 
  • ParaSwap - is rising in popularity as the prices quoted are often better than other aggregators when compared directly. ParaSwap is also available on Polygon (formerly Matic), an Ethereum sidechain.

How can you use DEXs with Argent?

At Argent, we have partnered with ParaSwap so that users get the best exchange rate for each trade. To do this, go to the invest tab and go onto the token exchange. From there, you can search for any ERC-20 token and make your trade knowing you’ll get the best price.

With an Argent wallet, you can also connect to any DEX that is compatible with WalletConnect. You may want to do this for the benefits of using a specific exchange at the time.

With most DEXs, you will need to pay gas with each transaction, which will impact the overall price.

Further resources 

An interview with Uniswap founder Hayden Adams by Bankless

A list of the most popular DEXs by DeFi Pulse

A comprehensive analysis on DEX liquidity aggregators’ performance by 0x

Ready to get started with DeFi?

Argent is a simple, secure, all in one wallet for investing in DeFi

Download Argent

Related Articles

Where can I learn more about DeFi?

There are a lot of great resources out there for learning about DeFi, but it can be hard to track them all down. Here's some of our favourites!

What are off-chain order book DEXs?

A guide on off-chain order book DEXs, an alternative to AMMs

What are Automated Market Makers (AMMs)?

A guide on what AMMs are and why they’re important to DeFi

We use 🍪 cookies to personalise your experience on Argent. Privacy Policy

Accept

HQ London, made with ❤️ across Europe