CEX can hardly escape the fate of regulation, a detailed discussion on the dilemmas and opportunities of DEX
Author: Markus Schmitt
Compiled by: Luffy, Foresight News
## 1. TLDR
Smart contract blockchains are well-suited for running exchanges: they commoditize trust, make custody, fees, prices, and settlements transparent, and allow anyone to become a market maker.
However, the trading volume of decentralized exchanges (DEX) still lags behind centralized exchanges (CEX) due to: uncompetitive pricing; execution being prone to abuse (MEV); and LPs not earning enough.
Improvements will make DEX more attractive: using oracle pricing; batch trading and post-trade settlement; centralized and automated liquidity; shifting to cheaper L2s. We also list some teams working in this space that are trying to address the issues we raise.
## 2. Introduction
DEX is one of the main use cases for smart contract blockchains. They are often criticized as casinos for altcoins, but regardless of whether they lead to speculation, the permissionless token listing mechanism has immense value.
The current cryptocurrency exchange landscape consists of OTC trading, CLOB (Central Limit Order Book), RFQ (Request for Quote), and AMM (Automated Market Maker).
AMM has evolved into the primary use case for creating trading markets without the need for professional market maker participation. However, CLOB remains the main source of trading volume (according to Defillama data, DEX trading volume accounts for only 16% of CEX, and over 60% of DEX trading volume is driven by MEV, including arbitrage between CEX and DEX, see Alastor, page 16).

DEX still accounts for only about 15% of cryptocurrency trading volume. But their share is growing.
Source: Coingecko Q1 2023 Industry Report
In this article, we will first clarify what characteristics a good exchange should have, then we will focus on the current shortcomings of DEX and propose some paths for improving DEX design.
## 3. What Does a Good Exchange Look Like?
As a trader, I need:
Trust: The custody risk before, during, and after the trade should be transparent and minimized.
Best Price: I should always get the best price or close to it on this exchange—so I don't have to worry about losing out on price.
Fairness: Others should not get better prices or pay lower fees than I do.
Speed and Availability: Reduce the waiting time for trades to complete or for the exchange to open.
Information: The exchange helps me make informed choices and monitor my orders. I can see the prices at which trades might settle and get good limit order prices and slippage suggestions. I can also view pending, settled, or canceled orders.
Deep Liquidity and Broad Asset Coverage: High liquidity across a wide range of assets gives me more confidence.
Liquidity providers and market makers (MM) need:
- Yield: Reasonable profits that justify the capital risk and opportunity cost.
Optimal risk-adjusted returns are crucial for market makers; other metrics are merely means to achieve this. High trading volume, low competition, high spreads, good rebates, and lower custody risks all aim to enhance risk-adjusted returns.
Blockchains are a great place to run exchanges, providing traders and market makers with most of what they want: decentralized, open-source settlement mechanisms and open trading histories form a solid foundation of trust, security, transparency, and fairness.
But decentralized exchanges still need some improvements:
Provide reliable pricing;
Offer good yields for LPs;
Address MEV that violates fair execution commitments.
## 4. Why AMM is So Popular
AMM accounts for over 95% of all DEX trading volume, dominating the DEX market. Here are the most important reasons why AMM has outperformed traditional limit order books or RFQ designs so far:
Low liquidity requirements: AMM always provides prices, even with low liquidity.
Passive liquidity: Your liquidity is automatically managed in AMM, making it easy to become an LP and allowing anyone to earn fees.
Simplicity: Compared to order book exchanges, AMM requires less computation and storage, thus consuming less gas;
No gatekeepers: Market maker and exchange listing fees can be prohibitively high, and centralized exchanges can delist tokens at any time. AMM allows any project to easily launch trading and incentivize liquidity.

It wasn't until the end of 2020, two years after Uniswap's launch, that DEX trading volume saw a significant rebound. Source: Dune
When the first decentralized exchange launched, it had low liquidity, few market makers, and high gas costs. Operating a CLOB under these conditions was impossible, but AMM was a perfect fit. They are relatively simple, easy to build, simulate, and audit.
However, DeFi is different now. Order volumes are rebounding, a wide variety of assets are quoted by professional market makers, gas fees on lower-cost L2s are becoming more common, and everyone has some understanding of the weaknesses of CFMMs (i.e., most AMMs today).
AMM remains the best choice for certain markets (e.g., long-tail tokens), but they lag behind centralized exchanges in key areas.
## 5. Problems with AMM
1. High Gas Fees
On-chain transactions are still expensive. AMM trading fees (0.01% - 0.3%) are not much different from CEX, but gas fees can easily impose excessive costs on small trades (< $1000), even on L2.
2. Poor Price Timeliness
AMM often does not provide you with the best price; its price only changes through trades. Therefore, you need to rely on arbitrage traders to ensure that AMM prices stay in sync with current market prices. However, arbitrage traders face risks and are also limited by trading fees and gas costs. As a result, AMM pools with lower liquidity can easily have prices that differ from the best quotes on other exchanges by 1-5%.
3. Losses and Rebalancing (LVR)

In subsequent analyses, Uniswap LPs have been shown to be unprofitable due to LVR from toxic order flow. Please see CrocSwap's summary here.
AMM is passive, so if the price of an asset is determined by other markets (e.g., on Binance), the price on AMM will always lag. If the price rises on Binance, AMM will sell tokens to arbitrageurs at too low a price. If the price falls on Binance, AMM will buy tokens from arbitrageurs at too high a price.
Over time, AMM, especially its LPs, will continuously accumulate losses. This is the cost LPs pay to arbitrageurs to pull the price back to the market price.
In contrast, market makers on limit orders will immediately attempt to adjust their quotes when prices change. They then rebalance their portfolios at market prices. Thus, this mechanism of AMM is referred to as losses and rebalancing (LVR). This is the loss passive LPs incur from trading at incorrect prices with arbitrageurs instead of rebalancing their assets at current market prices.
This tweet from Ankit explains LVR well.
LVR is permanent: If the price returns to previous levels, the losses from LVR cannot be recovered, which is different from impermanent loss.
LVR increases with volatility: The greater the price increase, the larger the losses for LPs. In fact, losses are quadratically related to volatility.
LVR depends on the location of the discovered price: It is important how much worse the price you sell to arbitrageurs is compared to the current weighted average market price.
Since you, as an LP, also earn fees on each trade, this will benefit you if your liquidity pool has a sufficiently large weight in the market. If LVR < fees earned, these trades actually profit you rather than incur losses. Pools with smaller market weights will experience higher LVR, and their profits will be transferred to LPs earning profits in larger pools.
4. Extractable Value
Traders and LPs are easily affected by AMM value extraction:
Traders: Searchers can front-run, insert, or block your trades, affecting your execution price.
Passive LPs: More sophisticated and proactive LPs can provide timely liquidity to capture most of your trading fees.
5. Fragmented Liquidity
On CFMMs, the same token is often paired with multiple different tokens (e.g., USDC-WBTC, DAI-WBTC, ETH-WBTC), and even the same trading pair is divided into multiple fee tiers. This fragments liquidity across multiple pools (in this case, WBTC), leading to reduced fees for LPs and worse depth and prices for traders. Most liquidity is not used for trading (e.g., in Uniswap V2 design), and even on range order AMMs, prices often stray far from areas of concentrated liquidity.
In centralized exchanges, there is usually only one quoting asset (e.g., USD), and market makers actively keep most liquidity near current market prices, minimizing the price impact on traders.
6. More Issues
The above problems also bring more disadvantages to CFMMs:
Price and inclusion uncertainty: Trades often fail.
Fixed slippage: AMM charges a fixed spread on orders. This makes them vulnerable to attacks in highly volatile markets while being less competitive in less volatile markets.
Difficulty attracting liquidity: Losses and rebalancing and liquidity fragmentation lead to lower LP profits on AMM, making it harder to attract liquidity. Therefore, protocols often need to subsidize LPs through liquidity mining incentives to attract sufficient liquidity.
Fragmented liquidity: On DEX, a token often has multiple trading pairs. Most liquidity is not used for trading (even on range order AMMs, prices often stray far from areas of concentrated liquidity).
But these issues do not mean that AMM is doomed to fail. Research and blockchain technology have made significant progress and enabled new solutions that can address these shortcomings.
## 6. Improved Design for DEX
Several methods are currently attempting to address issues such as poor pricing, MEV, losses and rebalancing, and liquidity fragmentation in DEX. Let's summarize the most important methods and propose some new approaches.
1. Lower Gas Fees
(1) Cheaper Block Space
L2 transaction costs are one to two orders of magnitude cheaper than L1. Therefore, transaction costs are no longer a bottleneck. This means that more computation-intensive protocol designs (like order books) are starting to become feasible. However, to compete with CEX on small trades, gas costs may need to be reduced by another order of magnitude.
(2) Cows

An example of a CoW (Coincidental Order Matching) trade among three traders. Each person makes the exchange they want, providing liquidity for each other—without routing through DEX or paying DEX fees.
Coincidental Order Matching (CoW) is essentially a P2P asset exchange between traders trading complementary pairs simultaneously. Traders do not pay AMM trading fees and pay less gas (just transfers). However, to make them work, you need excellent oracles with current best bids and asks.
CowSwap fully supports matching demand (all, partial, and multi-party circular trades)—settling many trades without paying DEX fees.
(3) Off-chain Computation, On-chain Verification
If you move the computation-intensive parts off-chain and only use the chain for custody, settlement, and verification, more complex functionalities can be achieved. For example, tracking and matching limit orders off-chain while keeping funds and settling trades on-chain.
2. Improve Price Timeliness
(1) RFQ
With RFQ, you can buy directly from market makers. Since market makers can trade across all venues (off-chain and other chains), you can access prices and liquidity from those venues through them. RFQ orders are also more gas-efficient (just transmission and signature verification, no need for pool routing).
Hashflow and Airswap provide easy on-chain access to RFQ.
(2) Instant Liquidity
To compensate for the risks of toxic order flow, market makers do not provide the tightest and deepest quotes on exchanges. In fact, ordinary users pay market makers to subsidize toxic order flow.
However, if market makers price trades after users submit them, they can quote better prices because they bear less risk. This provides ordinary users with better prices and makes life harder for arbitrageurs.
This idea comes from the design of ChainFlip's JIT AMM model.
(3) Lower DEX Fees
One reason for high fees is to protect LPs from LVR. However, if DEX can protect itself from LVR (see below), it can also set lower fees.
One way to keep prices up to date and prevent unprofitable arbitrage is to use Oracles to set prices.
3. Fix LVR
(1) Oracle-based Pricing
As long as AMM passively sets prices, they may be susceptible to toxic order flow. One way to avoid this is to actively update the prices on AMM before arbitrage traders come in.
Oracles need to be fast and accurate enough to avoid leaving arbitrage opportunities. As long as the fees generated by trades < the spread of market prices, arbitrage becomes unprofitable. Therefore, to avoid toxic order flow, the accuracy of oracle prices needs to be better than the trading fees of AMM.
AMM can even set prices after users sign trades. This further protects LPs from providing outdated prices, thus avoiding arbitrage risks.
Swaap uses oracle-guided pricing to significantly reduce LP's LVR.
(2) Incentivized Delays
If AMM can distinguish between informed (potentially very profitable) and uninformed (average profitable) order flow and only retain uninformed order flow, many issues will be resolved.

Dynamic fees and trade delays can help AMM distinguish between toxic orders and retail orders.
Trade signals decay quickly, so long delays from oracles will make it harder for informed traders to catch AMM off guard. Here's how it works:
Slow settlements are cheap: If you can wait 5 minutes for your trade to settle, then transaction fees will be cheap (e.g., 0.1% fee). Trades will settle at the oracle price 5 minutes later. Uninformed traders won’t mind this option, as they can save on fees and the cost of waiting 5 minutes is minimal.
Fast settlements are expensive: Settling at the current oracle price is costly (e.g., 0.4%). Higher fees reduce the likelihood that informed traders' signal advantages will make AMM unprofitable. Moreover, this still provides a quick settlement option for users willing to pay for it.
Delays allow DEX to separate toxic order flow from non-toxic order flow, or DEX can simply prohibit fast settlements altogether. To effectively block toxic order flow, fast settlement fees must consider the impact of market volatility on currency pairs.
An exciting example in this regard is a recent vote where Balancer decided to reduce trading fees for all order flow from CowSwap by 50-75%. CowSwap conducts batch auctions, which introduce delays that make them unattractive to toxic order flow, allowing Balancer to safely lower its fees and increase profits for its LPs.
(3) Active Liquidity Management
Concentrated liquidity positions (Uniswap V3) allow LPs to direct their liquidity to specific price ranges. This enables LPs or third parties to keep liquidity near current market prices, significantly improving LP capital efficiency.
Active liquidity management can even protect LPs from certain LVR impacts.
With reliable oracles, AMM can even set liquidity near the current oracle price by itself, thus eliminating the need for active LP management.
Maverick has successfully utilized this strategy to greatly enhance LP capital efficiency.
(4) Dynamic Slippage and Volatility Oracles
Since AMM losses depend on the magnitude of arbitrageurs' signal advantages, toxic order flow is more likely to occur in more volatile token pairs. In traditional order books, market makers widen spreads during high market volatility. AMM can do the same and dynamically adjust fees based on current market volatility.
Uniswap v3 already has a rough version that offers different fee tiers for the same trading pair, allowing LPs to choose fee tiers suitable for the price volatility of that token pair.
Market makers also adjust their slippage to rebalance their positions to meet their targets—AMMs can do similar things for their LPs.
4. Anti-MEV
(1) Private Transaction Submission
Using private RPCs to bypass public mempools is an effective way to protect transactions from front-running and sandwich attacks.
(2) Batch Auctions
Batch auctions are a good way to ensure fair pricing: you can batch orders over a period, and all trades for the same trading pair are executed at the same price. This reduces the likelihood of your trades being front-run. Batch auctions also increase the delay that prevents toxic order flow. Like negative delay oracles, batch auctions have lower composability.
They also greatly improve trade pricing, available liquidity, and paths. This primarily eliminates the possibility of trade backtracking.
As mentioned earlier, CowSwap has been running batch auctions, providing traders with fairer and safer settlements.
(3) Dynamic Slippage Tolerance
Setting slippage is not easy. If the price of a trading pair is highly volatile, too small a slippage can cause your trade to fail, while too large a slippage makes you vulnerable to sandwich attacks. Therefore, to avoid trade failures, decentralized exchanges typically have a high default slippage tolerance.
However, with volatility and depth oracles, DEX user interfaces can do better and predict the correct slippage for each trade. This helps users avoid sandwich attacks or trade failures.
1inch has already implemented logic to dynamically set slippage.
(4) All LPs Become Instant LPs
Another way to mitigate instant (JIT) liquidity attacks is similar to the "last look" for LPs above: if you change the model to determine the price after the user signs the trade, you can allow everyone to submit their instant quotes and compete fairly. However, this only applies to LPs willing to run active strategies and able to respond individually to each trade.
Structurally, batch auctions are also instant liquidity trades because liquidity and prices are found after the user submits the trade.
## 7. Conclusion
While public blockchains are excellent infrastructure for exchanges, DEX has not yet handled most trading volume. There are many reasons why trading volume and market makers have not fully migrated on-chain: uncompetitive pricing, poor user experience for traders, low yields, and insecure execution. Fortunately, all these issues already have good solutions, which are expected to bring most trading volume on-chain.
Special thanks to @ankitchiplunkar, @thegostep, @orbmis, @SimonAHarman, @paulburlage, @CyrillePastour, and @senkenio for their valuable input and in-depth feedback.
Popular articles













