Skip to content

Decentralized Crypto Exchanges: Explained simply DEXs

10 min readArticles

Our last article about Decentralized Finance (DeFi) explored the concepts and ideas that make this emerging trend remarkably attractive as the evolution of Traditional Finance (TradFi). This time around, we’ll talk about one of the most critical tools in the DeFi belt: Decentralized Crypto Exchanges, or DEXs.

It is well-known that DEXs are, for most users, the gateway to cryptocurrencies and an everyday tool. Indeed, one of the essential functions that an exchange serves is receiving national currency deposits in exchange for cryptocurrency. The possibility to buy and sell crypto assets by facilitating these transactions motivated the origin of crypto exchanges (such as Coinbase or Binance) controlled and operated by private entities.

Types of Decentralized Exchanges: Order books vs Automated Market Makers

The current success of DEXs wouldn’t be possible without Automated Market Makers (AMMs), which are the core protocol that enables most of them. DEXs allow users to swap cryptocurrencies without the need for a middleman by connecting users directly. Automated Market Makers, to put it simply, are self-contained trading systems that do away with the necessity for centralized exchanges and associated market-making procedures.

The AMM approach makes trading feasible by using liquidity pools, or collections of crypto tokens, through an algorithm that determines token values depending on the changing ratio of tokens provided. Those that give liquidity to pools in the form of digital assets are known as liquidity providers (LPs) or market makers. In exchange, they are compensated with trading fees distributed in proportion to the amount of liquidity they initially supplied.

This ondequando image showcases the trading volume and competition between DEXs.

Another type of DEXs are Order book DEXs,which were one of the first initiatives in the development of decentralized exchanges. Within this model, all open orders for purchasing and selling assets for specified pairings of assets are kept in order books. A trader’s interest in purchasing or bidding for an item at a specific price is expressed through buy orders. Sell orders, on the other hand, indicate that the trader is willing to sell or want a specified price for the asset in question. The depth of the order book, as well as the asset’s market price, is determined by the price difference.

Order books can either be On-chain or off-chain. On-chain order book DEXs store their open order information on the blockchain. Traders can benefit from on-chain order book DEXs by leveraging their holdings with funds from lenders on their platform.

With the evolution of DeFi and the genesis of DEXs, privately-owned cryptocurrency exchanges evolved to be known as Centralized Exchanges, or CEXs. Since DEXs originated as an alternative to Centralized Exchanges, let’s examine the pitfalls of CEXs before understanding what DEXs are.

Disadvantages of Centralized Cryptocurrency Exchanges

A number of the most commonly cited caveats of CEXs are:

1. Counterparty risk

Centralized exchanges are operated by entities responsible for the holdings of their users. Users have to, essentially, hand over their funds for CEXs to manage them. CEXs are therefore usually accountable for securing billions of dollars worth of assets, making them obvious targets for hackers and theft.

A cautionary tale for users trusting CEXs is the famous downfall of Mt.Gox, once the world’s largest exchange, after being hacked for 850,000 BTC. Because of this, it’s often advised that long-term investors hold their cryptocurrency outside exchanges or using non-custodial solutions.

2. More fees than Decentralized Crypto Exchanges

Unlike peer to peer transactions, CEXs charge transaction fees for their services and convenience (often only at the time of withdrawal or deposit of fiat, but sometimes at other instances), which can be an issue when handling large amounts.

3. Need for trust and permission

Perhaps one of the most important reasons for the evolution of DEXs is that, since CEXs have to adhere to their jurisdictions’ regulations, they often have to limit users’ abilities within their platforms. This is usually through the vetting of tokens to be listed, requiring KYC and AML procedures to start operating, the possibility of shutting down users’ accounts, pressures from local governments to hand over transaction records, and a long etcetera.

4. Manipulation risk

Since CEXs are often avenues for trading cryptocurrencies, users have a reason to suspect that, were one of them to have malicious intentions, their platforms would give them an ideal position to manipulate their internal markets. Of course, this also means that this translates into the general crypto market in the case of prominent exchanges.

What are Decentralized Crypto Exchanges?

The most popular DEX in the market, Uniswap, is famous for its simple interface.

Now that we’ve understood the problems created by CEXs, it’s time to understand DEXs.

Decentralized exchanges are cryptocurrency exchanges that exist solely as code on the blockchain (most of them in the Ethereum blockchain), allowing users to transact based on peer to peer mechanisms and connecting only through non-custodial solutions. Therefore, DEXs users maintain control of their funds at all times. Not all decentralized exchanges are open source, but some, like UniswapHollaEx Kit and Bisq are.

In general, DEXs, by holding no funds, are at less risk of being hacked or attacked by third parties. DEXs are also friendlier towards blockchain projects since they allow them to access high-liquidity markets without listing fees or procedures, based solely on the community’s willingness to create a market for the project and its own resources. This eliminates a problem common just a few years ago, when projects would have to pay millions of dollars to get a token listed on a centralized exchange.

Another key factor behind DEXs’ popularity is that, thanks to their P2P nature and the ease of aggregating different solutions together using smart contracts, DEXs can create direct currency pairings for almost any cryptocurrency in the market.

Are decentralized crypto exchanges fully decentralized?

Current DEXs implement varying degrees of decentralization: Some might use centralized servers to host order books and other features while remaining non-custodial. There are also hybrid solutions in which the exchange itself is decentralized but it is maintained by a centralized company. Some of the most popular DEXs in the market include Uniswap, SushiSwap, Curve Finance, Pancake Swap, and Mdex.

Although CEXs handle most of the market activity, DeFi’s irruption created a space for the development of DEX protocols and aggregation tools. Platforms like Uniswap, Curve, and Balancer showcase the potential of simple, user-friendly platforms that rely on liquidity protocols rather than order books. As the DEX market matures, the proliferation of new protocols and supporting mechanisms will likely only accelerate.

DEXs do not store users’ funds on the exchange but instead allow users to execute peer to peer transactions without a third party or intermediary. Thanks to the fact that they can exist without storing users’ funds, decentralized exchanges are preferred by some.

However, decentralized exchanges do not facilitate the trading of fiat currencies for cryptocurrencies, known as on-ramping.

Why do some DEXs revolve around a certain currency?

There are two types of DEXs: currency-neutral and currency-centric. Currency-centric exchanges are specific to the blockchain escrowing its native currency. The blockchain can be Ethereum, Monero, Waves, BSC, or any other smart-contract-enabled blockchain. For example, Uniswap is native to Ethereum.

Currency-neutral DEXs like Block DX are not tied to any one blockchain. They can be built on top of several blockchains and are not limited to a specific coin’s ecosystem. This “modern” setup brings about secure order matching, transparent handling of order books, and decentralized asset exchange.

How Do Decentralized Crypto Exchanges (Crypto DEXs) Work?

As we specified above, DEXs are non-custodial, and therefore allow crypto investors to maintain control of their digital assets at all times. This, in a nutshell, is thanks to liquidity setups that connect order books to liquidity pools. There are also some DEXs that use the conventional order book models.

DEXs rely on smart contracts to execute trades. There is a current trend towards building aggregation tools to address the disjointed liquidity inherent in decentralized exchanges. DEXs also enable instantaneous trades. However, since they’re (for the most part) reliant on their native blockchains, they can fall prey to their limitations, as has happened with the recent spikes in Ethereum fees (which ETH 2.0 is set to fix).

The fact that DEXs only exist on-chain also means that most of them have limited counterparty risk and are not required to follow KYC or AML procedures.

To finish this article, let’s go over the pros and cons that DEXs present:

The Advantages Of Using a DEX Crypto Exchange

1. Decentralized crypto exchanges are safer

Users of DEXs do not have to transfer assets to a third party. Therefore, they eliminate the risk of a company, person, or organization being a victim of a hack. This, however, doesn’t mean that they’re risk-free, since the smart contracts that host them could be faulty with bugs and be subject to exploits. Notably, however, this means that DEX security relies on perfecting code, as opposed to being an ongoing process. This, some might argue, is preferable to centralized crypto exchanges, which hold users’ private keys.

2. Less risk of market manipulation

Decentralized exchanges are transparent code that can be audited by anyone, hence preventing market manipulation and protecting users from fake trading and wash trading.

3. Decentralized crypto exchanges’ anonymity

Users are able to use DEXs without registering any of their private information, and therefore anonymously.

4. Permissionless participation for users and projects

As we mentioned in the previous sections, users can access DEXs with little to no barriers. This is also true for projects that can list their cryptocurrencies and tokens directly on the platforms using decentralized tools, surpassing a system that previously charged massive listing fees.

5. Accessibility for new crypto assets 

A typical cryptocurrency exchange might take a long time request payments to launch a new crypto trading pair. The way decentralized exchanges work, being an open market, allows for users to trade existing cryptocurrencies permissionlessly, adding new crypto assets on the fly.

Disadvantages Of Decentralized Crypto Exchanges

1. Decentralized crypto exchanges are complex

Users of decentralized exchanges must be the sole holders of their keys and passwords to their crypto wallets. This implies that they absorb the whole risk of losing them. It also means that they’re responsible for learning and getting acquainted with the technologies that they’re handling.

We did a very special podcast episode with the Founders of Aluna, a social crypto trading platform that aims to be incredibly simple. Both of their founders mentioned the many challenges that DEXs pose in this respect.

2. Lack of fiat payments

DEXs do not allow for the direct trading of fiat currencies, often through credit cards. They’re, therefore, not a way in which users can invest in cryptocurrency directly. Some, however, allow users to purchase cryptocurrencies using fiat in P2P transactions outside the platform thanks to escrow systems.

3. High fee volatility

Since most DEXs are hosted on the Ethereum network, currently undergoing scalability issues (a problem that’s promised to be solved with the release of Ethereum 2.0 in the near future), high network traffic can cause the fees required to run transactions on these networks to be as high as $200 at their peak. Other networks promise to solve this problem but, at the time of writing, they have not built the sufficient number of users, reputation, or delivered to scale up to their purposes.

NEWSLETTER

Subscribe to our newsletter now and get your blockchain guide for free!