Centralized Exchanges vs Decentralized Exchanges and the case for Decentralized Echanges.

JimmyGrant
5 min readNov 13, 2023

--

How do centralized exchanges facilitate order matching?

Consider the scenario of a centralized exchange user, Bob, who intends to purchase ETH using the USDT tokens he holds. In this instance:

Bob will transfer his USDT to the Centralized Exchange (CEX).

Likewise, there might be another user, Sara, looking to sell her ETH in exchange for USDT. She, too, will transfer her ETH to the CEX.

Both, Bob and Sara will also declare their desired price for their order.

Similar to Bob and Sara, the centralized exchange (CEX) may have numerous other users interested in buying and selling ETH at various prices. Upon receiving orders from users, the CEX endeavors to match them with counter orders placed by other user(s). The CEX then matches the two orders and executes the transaction.

Frequently, exchanges may break down a single order into multiple smaller orders to enhance efficiency. Additionally, there is no guarantee of finding an exact price match from counter orders. Therefore, the CEX aims to match orders with the closest counter order within a reasonable slippage. However, for the purpose of this discussion, let’s keep the example straightforward and assume the best-case scenario.

Centralized exchanges (CEXs) execute all actions off-chain, enabling them to process complex transactions much more rapidly than on-chain transactions, which are often characterized by slower speeds. Leveraging their off-chain nature and complete control over users’ assets, CEXs demonstrate high efficiency in order matching.

Through the strategic matching of orders and counter-orders, CEXs effectively minimize their risk and exposure to market volatility associated with various assets.

While CEXs offer numerous benefits, there are drawbacks to their design. Many cryptocurrency users are hesitant to transfer ownership of their assets to entities like CEXs. A robust self-custody ethos prevails among many users, prompting them to seek solutions that enable market actions without the necessity of transferring assets from their own custody.

CEXs also require users to undergo a Know Your Customer (KYC) process. During KYC, users must submit necessary documents to validate their identity. Additionally, CEXs may request further documentation, such as income proof, if mandated by regulators and compliance institutions.

In addressing concerns related to asset custody and KYC, many cryptocurrency users opt to trade in Peer-to-Peer (P2P) markets. P2P markets enable direct interaction between two or more users without the involvement of a central controlling institution, like a CEX. Notably, P2P transactions do not necessitate the submission of KYC documents, offering anonymity, a preference for many cryptocurrency users.

Consider Bob and Sara once again. If Bob and Sara meet each other’s buy-sell requirements, there is a possibility for them to interact directly and complete the transaction, with the CEX overseeing the process.

However, in the absence of a CEX, crypto transactions can be inefficient. Without a centralized platform, there is no efficient way for Bob and Sara to discover each other. They may be in different locations, expressing their buy-sell intentions at different times, making it nearly impossible for them to match. Bob and Sara are now confronted with a discovery challenge.

To address challenges related to discovery, asset custody, and KYC, Decentralized Exchanges (DEXs) like Uniswap and Curve utilize a specialized mechanism known as a liquidity pool.

What is a Liquidity Pool?

A liquidity pool typically consists of two crypto assets, enabling users to swap one crypto asset for another.

Consider an example: the ETH-USDT liquidity pool. In a straightforward ETH-USDT liquidity pool, both ETH and USDT are required. Any user can exchange one for the other within this pool. For instance, a user may arrive with ETH and exchange it for USDT, and vice versa.

The effectiveness of an ETH-USDT pool in facilitating asset exchanges is contingent upon the pool maintaining sufficient liquidity.

Liquidity pools deployed by Uniswap work on x*y=k equation.

x = token0
y = token1
k = constant

When the liquidity pool maintains balance, it operates effectively. However, if liquidity begins to diminish for one token, obtaining that particular token from the pool necessitates progressively higher amounts. This built-in defense mechanism is designed to preserve the pool’s equilibrium. A skewed pool in a certain direction results in an increased cost to acquire that token, providing an incentive for movement in the opposite direction.

In simpler terms, if the pool has fewer tokens than initially, the price of that token will rise. As the volume of the token decreases in the pool, the price continues to increase. Eventually, the price becomes prohibitively high, making it impractical to obtain that token from the pool. This situation also creates profitability in supplying that token to the pool, and arbitrage from the market to the pool becomes a lucrative option. This influx of tokens into the pool contributes to a balanced state.

Returning to the example of Bob and Sara, let’s consider their situation. Bob, holding USDT, can directly swap with the liquidity pool, eliminating the need to wait for a counterparty. Similarly, Sara can exchange her ETH for USDT using the same mechanism.

The utilization of liquidity pools enables Decentralized Exchanges (DEXs) to facilitate exchanges without necessitating the transfer of assets to the DEX or undergoing a Know Your Customer (KYC) process.

In summary, liquidity pools offer a solution to the challenges users encounter with Centralized Exchanges (CEXs). They provide a mechanism for direct asset exchange without the need for asset transfers to the exchange or the requirement of KYC procedures, addressing concerns related to custody and privacy.

--

--

JimmyGrant
JimmyGrant

Written by JimmyGrant

Mostly talking about Defi, Stablecoins, Crypto Markets and Macro. Also interested in cooking, movies and people.

Responses (1)