go BACK
DeFi
11
min read

Decentralized Exchanges: What they are and how they work

SCROLL DOWN

Not too long after Bitcoin’s launch, exchanges entered the world of cryptocurrency. These platforms play a critical role in offering traders and investors a way to buy and sell digital assets. Without exchanges, crypto would have poor trading volume and buying, selling, or trading digital assets would be much more difficult.

Historically, centralized exchanges — like Kraken, for example — have been a dominant player in the industry. However, as technologies progress and evolve, a method to perform decentralized transactions has risen to the forefront. Decentralized exchanges, or DEXs, are trading platforms that don’t require an intermediary like a bank or other centralized entity.

So, what are decentralized exchanges? That’s the question we’re going to answer today.

What is a decentralized exchange?

Technically, any swap that occurs directly between two parties — if I give U.S. dollars in exchange for British pounds — could be defined as a decentralized trade since it's entirely permissionless. However, for the purposes of this post, we’re going to focus on platforms that behave in a manner similar to their centralized counterparts.

A key difference between a centralized exchange and a decentralized exchange is how it works on the backend. On a DEX, the backend resides on the blockchain. A DEX does not take custody of your assets, which means you don’t have to trust a central authority to manage your crypto assets. That’s the beauty of using a decentralized platform.

As a result, users remain anonymous since they don't have to go through the registration process required by many centralized platforms like Coinbase. That means there is also no need for Know-Your-Customer (KYC) and Anti-Money Laundering (AML) processes, as decentralized exchanges aren't custodial platforms.

Of course, that means at the end of the day, you're responsible for the safekeep of your own digital assets. The platform doesn't manage them and track them — you do. Some traders find this reassuring, since they're not relying on someone else to do the work for them. If that's not you, you might be better off using a centralized exchange.

Types of decentralized exchanges

One of the first things to note is that there are multiple types of DEXs available. These types all share a common theme. All orders on decentralized exchanges are performed on-chain with the use of smart contracts, and users are not required to turn over custody of their digital assets at any time.

01-On-Chain Orders

With this type of decentralized crypto exchange, everything takes place on-chain. Every order is written on the blockchain. On-chain is one of the most transparent approaches for decentralized exchanges because you don’t have to trust a third-party entity to relay the order information to you. Plus, the order information is clear and concise.

Unfortunately, on-chain orders are also the most impractical method due to the network requiring every node to keep the data stored forever. As a result, you wind up paying a larger fee. Plus, you’ll have to wait for a miner to add the message to the blockchain, which could potentially lead to a cumbersome experience for users.

Additionally, some users prefer not to use on-chain platforms due to the possibility of front running. Front running takes place in a market when someone on the inside has information about a pending transaction. The user then takes this information and makes a trade before the transaction can complete. As a result, the front runner benefits from the information they have before the public has it. 

02-Off-Chain Orders

Off-chain order book DEXs are more centralized than their on-chain counterpart, since they have to store data in a centralized location. Instead of every single order being kept on the blockchain, they’re stored somewhere else entirely. The question is, where do these transactions take place?

The answer to that question depends on the exchange itself. You may be using a platform that uses a centralized entity to manage its order book. If the third-party is not entirely trustworthy, they could take advantage of users by gaming the markets through front running or misrepresentation of orders. However, the advantage is that you’re still benefiting from non-custodial storage.

A great example of this is the 0x protocol, used for ERC20 tokens that reside on the Ethereum ecosystem. As opposed to behaving as a single DEX, it offers a framework for participants who are referred to as relayers. These parties manage the off-chain order book for the platform. By leveraging smart contracts that use the 0x protocol, hosts have access to a combined liquidity pool while relaying orders between traders. The trade then occurs on-chain when two parties are matched.

From a usability perspective, these types of approaches are better than those that solely use on-chain order books. There aren’t any speed constraints, since the blockchain isn’t used as often. However, the trade itself must be settled on the network, which means off-chain order books are inferior to centralized crypto trading alternatives when it comes to expediency.

03-Automated Market Makers

Automated Market Makers are often referred to as AMMs. These exchanges completely do away with the idea of order book platforms. You don’t need makers and takers with AMMs. You do, however, need users, some formulaic creativity, and game theory.

The way an AMM works depends a lot on how it’s implemented. Usually, this is done by stringing together several smart contracts and then offering incentives to join the platform. Most AMM-based decentralized platforms today are user-friendly and integrate popular wallets like Trust Wallet or MetaMask. However, just like other DEXs, at some point an on-chain transaction has to occur to settle trades and other activities.

​Popular DEX Platforms

There are plenty of DEX options on the market, but usually a trader will have one they prefer to use for one reason or another. Let's take a look at some of the more well-known decentralized exchanges.

Bancor

Bancor was one of the early players in the DEX market, launched and operated by the Swiss-based Bancor foundation. The exchange is built on the Ethereum blockchain and offers yield farming and token swapping, powered by its BNT token. As an AMM platform, Bancor allows you to deposit either ETH or DAI to perform trades, which is not something a lot of other Ethereum-based platforms offer.

1inch

1inch exchange is more of an aggregator than a decentralized exchange, but it offers many of the same features. The goal of the exchange is to help traders reduce slippage by allowing them to access real-time liquidity through multiple DEXs. Slippage occurs when the trade goes through at a price higher or lower than what was expected. As a result, traders get the best rate and most efficient trade currently available. 1inch also provides its users with an active governance model, along with strategies to aid in yield farming.

Uniswap

To many investors and traders, Uniswap is the king of decentralized exchanges because it's an easy-to-use platform and it offers plenty of liquidity for crypto traders and investors. Another AMM model exchange, Uniswap is governed by users who vote for or against features and enhancements via the platform's UNI token. There is a 0.3% trading fee on all token swaps, which are redistributed to yield farmers based on their contribution to the platform. 

Curve

One well-known DEX that's great for those of you who like to keep things “old school” is Curve. This platform is great for users who tend to focus on trading stablecoins. For example, if you want to trade your USDC for DAI or TUSD for Tether, Curve is the platform for you. This popular DEX is the inspiration behind many other platforms as well. For example, Unagii uses Curve strategies for its vaults. All you need to get started is an Ethereum wallet and your favorite stablecoin.

SushiSwap

While SushiSwap had a controversial beginning, the platform is now a popular decentralized exchange, creating unique and revolutionary features. It is a direct competitor of Uniswap and hosts over USD 3 billion in collateralized assets. The DEX itself uses its SUSHI token and is a great platform for those that are bullish on the Yearn ecosystem. If you're looking for a platform that focuses more on yield farming than token swapping, SushiSwap could be for you.

Decentralized exchanges are here to stay

Over the past few years, many decentralized platforms and exchanges have emerged. Each exchange aims to provide better user experience and features while building powerful trading ecosystems. However, the driver behind these exchanges aligns with the core of cryptocurrency: the need to perform transactions without the use or trust of a third party.

As decentralized finance, or DeFi, continues its rise, decentralized exchanges will see a significant uptick in usage and popularity. As innovation and creativity like this increases, so too does the likelihood that this technology will change the crypto industry as we know it.

AUTHORED BY
Unagii Team

We're a distributed team of dedicated strategists and engineers with a mission to redefine the digital asset yield experience.