Revisiting the Exchange Landscape
Maximum Extractable Value (MEV) has become an undeniable part of public blockchain ecosystems. Its emergence has led to broad acceptance as an inherent aspect of crypto asset trading, spurring a wave of new products and protocols aimed at minimizing its negative impacts. Whether through decentralized, centralized, off-chain, or on-chain efforts, these initiatives have attracted skilled teams and significant capital to refine what is now known as the "MEV stack." Before climbing further into the depths of Ethereum’s dark forest, it’s essential to return to the forest floor and reexamine our foundational assumptions.
To glimpse the future of crypto asset trading, we must revisit the critical design challenges faced today. This article is the first in a two-part series exploring the design pathways for cryptocurrency exchanges. It navigates the intersection of market microstructure and distributed systems, shedding light on current opportunities, challenges, and development trajectories in building next-generation crypto asset exchanges.
Where Do We Stand Today?
Execution quality—how closely traders can buy or sell assets at the "true market price"—often depends on market makers providing liquidity. These market makers play a vital role as trading intermediaries and are compensated for assuming the risk of matching buyers and sellers over time. The exchange component responsible for interacting with market makers and traders is the order-matching engine—a digital system that pairs buy and sell orders based on specific rules.
Architecturally, the effectiveness of an order-matching system hinges on the balance between freedom and the constraints imposed on market makers submitting orders. Exchange designs that enable market makers to update quotes efficiently and reliably attract the most competitive liquidity providers, leading to higher execution quality for traders.
Despite paving the way for permissionless, trust-minimized trading, automated market makers (AMMs) have yet to catch up with their off-chain counterparts. Even before considering front-running risks, user fees in decentralized finance (DeFi) are significantly higher than those in traditional finance (TradFi). The average fee for the deepest Uniswap pools is around 0.05%, or 5 basis points (bps), while the typical markup for retail orders on traditional exchanges is about 0.007%, or 0.7 bps—a nearly tenfold difference in cost.
The root of AMMs' execution quality issues lies in their failure to create an environment that attracts sufficient high-quality market makers to facilitate transactions between buyers and sellers.
Over the past year, order flow aggregators—ranging from exchanges like Uniswap to wallets like MetaMask—have become more opinionated in designing order-matching systems that improve execution quality. Some aggregators are building internal solutions, while others rely on third-party software promising to address these challenges. The driving force behind this trend is the persistent inability of AMMs to deliver high-quality trade execution.
A Brief Overview of AMM Challenges
The limitations of classic AMMs have been extensively discussed, so we’ll summarize them briefly. On an AMM, liquidity providers (LPs) who assume market-making risks must publicly declare their strategies. These on-chain strategies specify how each transaction affects the prices of their supplied assets. However, due to slow blockchain updates, LPs cannot adjust prices quickly enough to avoid being arbitraged by snipers. This disincentivizes market maker participation and adversely affects on-chain order execution.
One argument in favor of AMMs is that passive market makers should compete with professional TradFi market makers in offering favorable prices, since competition among the latter often revolves around latency wars and execution priority queues. Thus, the efforts of professional market makers to win this race don’t necessarily translate into better execution quality for traders.
If the only market makers for ETH were AMMs funded by LPs, it would be no surprise to see prices similar to those offered by a monopolistic professional market maker. However, this observation holds only in a vacuum, as the presence of faster, more expressive exchanges with professional market makers would inevitably lead to passive LPs on AMMs adopting loss-prone strategies.
Hooks and TEEs: The Limits of Future AMMs
Innovative designs, such as loss-versus-rebalancing (LVR)-reducing hooks with dynamic fees, are emerging to combat adverse selection by helping market makers anticipate future trades and reprice their inventory. Yet, a critical barrier to adoption remains: AMMs force market makers to publicly commit to strategies, leading to front-running issues.
Generally, front-running occurs because adversaries know a market maker’s order before it is executed. When market makers publicly commit to strategies, they reveal the sequence of trades they will make given certain inputs. This enables opponents to front-run even before orders are placed. The more complex the strategy, the larger the attack surface.
For the same reason that it’s unwise to reveal your poker hand, TradFi market makers like Citadel require employees to sign non-disclosure agreements to keep their strategies confidential. Secrecy is so crucial that former employees are often barred from working for competitors for one to two years after leaving—sometimes while being paid to stay home.
Privacy solutions like trusted execution environments (TEEs), combined with hooks on platforms like Uniswap, could allow automated market makers to incorporate highly sophisticated strategies akin to those used by high-frequency trading firms while keeping them hidden from the public. Despite this potential, the challenge is that mature market makers need to continuously update their algorithms to remain competitive.
For instance, liquidity pool creators on Uniswap v4 using SGX-based hooks to implement their market-making strategies must regularly update their algorithms inside the SGX to adapt to changing market conditions. Moreover, the confidentiality of these algorithms doesn’t guarantee protection against adversaries inferring and exploiting them, which would further necessitate updates.
This creates a trade-off: exchanges can either allow liquidity providers to publicly verify strategies before committing funds or enable customizability to adapt to evolving market conditions. Thus, the value proposition of AMMs as trust-minimized tools with strict asset management rules requires reconsideration.
Does Your Order Matcher Know Too Much, Too Little, or Just Enough?
Given these challenges, we are witnessing a partial transformation of the AMM model and the resurgence of order books and request-for-quote (RFQ) systems in crypto. These alternatives aim to attract market makers, enhance liquidity, and achieve high-quality execution, creating a virtuous cycle.
User-facing order flow aggregators—operating across wallets, dApps, and exchanges—have varied incentives and responsibilities. They profit by capturing trader attention and trust through front-ends and by facilitating transactions through exchange infrastructure. Focusing on the latter, we must understand the trade-offs involved in order matching across different market and asset systems. An exchange’s long-term competitiveness largely depends on its efficiency in matching buyers and sellers, especially in how it constrains—or doesn’t constrain—market makers. A key differentiator among exchanges is whether they employ RFQ systems or order books.
Information Asymmetry in RFQs and Order Books
Stepping outside the blockchain context, academia and industry generally favor order books over RFQ systems for superior order execution. Order books create a dynamic balance of supply and demand by publicly disclosing price intentions from all relevant parties, enabling efficient price discovery and narrower spreads for users.
This can be understood by breaking down the stakeholders in a matched trade:
- Party A (buyer)
- Party B (seller)
- Market makers (intermediaries facilitating the interaction)
In order book systems, price intentions are publicly declared by all involved. Users post orders directly, and market makers compete to execute them. For example, if Party A wishes to buy 1 ETH for no more than $10,000 and Party B wishes to sell 1 ETH for no less than $11,000, the spread is visibly $1,000. By公开izing this information, participants can make decisions based on real-time order depth and liquidity. If market makers or other participants post quotes misaligned with market conditions, their orders remain unfilled until adjusted.
In contrast, RFQ systems involve Party A and Party B requesting quotes without specifying price limits—only the asset quantity they’re interested in. When market makers receive these requests, they are incentivized to widen spreads, anticipating that Party A and Party B might tolerate some slippage. In certain cases, RFQs allow traders better control over information dissemination, including when and to whom it is revealed, limiting adverse market reactions during large trades in illiquid markets. Here, RFQs can be more effective than dark pools, as they enable traders to outsource order execution to professional market makers who take a commission for ensuring smooth transactions.
Generally, market makers in RFQ systems profit more than those in order books because they aren’t required to commit liquidity before Party A and Party B specify their desired asset quantities. Without the pricing pressure of a transparent order book, Party A and Party B may incur higher costs in RFQ systems, benefiting market makers at the traders’ expense.
Given these differences, we should be cautious about accepting claims that the disparities between order books and RFQs are trivial enough to embrace RFQs as the future of crypto trading. Many in the crypto industry point to the zero-fee structure of Robinhood’s RFQ system and the dominance of RFQs in bond markets as evidence of their legitimacy.
However, we must not forget that these markets are characterized by non-competitive behaviors contrary to crypto’s ethos. In Robinhood’s case, while market makers like Citadel receive retail order flow only if they improve the national best bid and offer (NBBO) across multiple stock exchanges, if these users collectively sent trades to Nasdaq, they would pay reduced spreads because Citadel would have to compete with everyone else.
We should not rely on evidence from oligopolistic industries to justify the order-matching systems they use. Opaque market structures like the bond market—controlled by JPMorgan, Citigroup, and Bank of America—benefit those with more information. It goes without saying that when centralized entities control significant market share, they have the information, leverage, and incentive to resist market structure changes that could threaten their dominance.
That said, clear progress has been made in improving how RFQ systems operate industry-wide. For example, RFQ systems in traditional markets are often high-touch and inefficient. Typical RFQ-based interactions in commodity derivatives trading require Party A, Party B, and their market makers to set initial and variation margins. Financial contracts are outlined in legal agreements on traditional corporate ticket systems, coupled with error-prone manual communications at expiry. This complexity, along with T+2 settlement periods, poses challenges for effective validation, reconciliation, and risk management—all of which negatively impact end users. Crypto can play a role here, and there’s substantial room for improvement.
In crypto RFQ development, we’ve also observed rapidly evolving enhancements. In many crypto RFQ systems, market makers no longer need to pre-commit liquidity to match trades but instead adjust based on AMM prices from the previous block.
On the surface, the worst-case price for a trader should be the same as trading directly through an AMM if market makers choose not to improve the quote. However, by examining a buy order example, we can see this isn’t so straightforward.
When the AMM price is below the off-chain price, an RFQ provider might route the order to the AMM rather than filling it themselves. In this case, why would an arbitrageur sell assets to the RFQ trader at the last block’s price instead of selling at a higher price on an exchange like Binance? Thus, the trader is directed to the AMM, where they must compete with specialized arbitrageurs to reach the top of the block. If they succeed, traders might get their initially quoted price, but they won’t necessarily win.
In UniswapX’s RFQ implementation, the fill price for user orders results from competition among fillers, who are not only able but compelled to compete based on speed in accessing and analyzing on/off-chain data and submitting orders. If a filler decides not to honor a trade they won off-chain, the price they previously committed to parameterizes an on-chain Dutch auction.
Returning to the example of a buy order relayed on-chain because it’s unattractive to fillers (who can sell at higher prices off-chain), the trader might end up with a price from the parameterized Dutch auction rather than a better RFQ price. In the RFQ, they have little chance of securing a price at the top of the block.
MafiaEV or MonarchEV? Information Asymmetry Trade-Offs in On-Chain Order Books
The trade-offs between MafiaEV and MonarchEV illustrate the information asymmetry challenges in on-chain order books. So, if order books are more attractive than RFQs, let’s put them on-chain and call it a day! In theory and practice, it’s not that simple.
An on-chain order book is defined as a platform where users can post orders on-chain. Orders are prioritized for execution based on price and submission time, leveraging consensus or leader selection algorithms to resist censorship. Remarkable attempts have been made to create high-performance on-chain order books that compete with off-chain ones. This is often achieved by operating in low-cost computational environments to reduce on-chain order placement costs and enable faster block times, both of which lower LVR. Even with these features, inherent blockchain limitations pose critical challenges, including competition for liquidity and trading volume available off-chain.
On-chain order books lack a unified architecture and vary based on the chain they’re built on. However, the basic process is similar—retail users submit orders, the consensus mechanism determines order sequencing, and orders appear on-chain.
Whether multiple leaders provide input for order sequencing or a single leader decides the order, on-chain order books encounter a form of MEV—MafiaEV and MonarchEV can be categorized into two types of MEV: latency-based LVR from multiple leaders and transaction reordering from a single leader. These MEV types align with the framework presented by @sxysun1, where MafiaEV exploits coordinated information asymmetry strategies, while MonarchEV involves centralized authority controlling extractable value via entities with decisive power over transaction ordering and state finalization, like block builders.
MafiaEV: The Multi-Leader Design
In blockchain-based order book systems using multi-leader consensus, latency stems from three key technical aspects: conflict resolution, network latency, and transaction processing. Multiple leaders handling transactions simultaneously can lead to conflicts, requiring time-consuming consensus rounds. Moreover, geographically dispersed nodes introduce significant network delays. Independent verification and ledger state replication at each node add to processing time.
Regardless of the consensus mechanism specifics, on-chain order books maintained by multiple leaders must contend with MafiaEV—exploitative behavior arising from adversaries capitalizing on market makers’ inability to quickly update liquidity allocations in the order book. Although the absolute latency experienced by market makers interacting with the order book is important, it’s crucial to emphasize that an exchange’s survival depends more on its latency relative to other exchanges.
Suppose the fastest on-chain matching engine Y takes 10 seconds to process a trade, while off-chain order book X takes half a second. In this case, price discovery occurs off-chain, and all arbitrage opportunities migrate elsewhere. Now, assume on-chain order book Y reduces latency to half a second, but Coinbase takes 10 milliseconds. Here, on-chain order book Y’s prices become stale, and its liquidity and user adoption suffer.
Of course, blockchain block times, costs, and delays in submitting/canceling quotes can be reduced through innovation and technological breakthroughs. Consensus and network layers can advance to bring on-chain order book latency closer to off-chain performance.
However, we must still consider latency guarantees across time and order types. On any order book, if order cancellation is slower than order submission (or vice versa), market makers cannot effectively respond to market conditions. While they might tolerate latency when submitting orders, they cannot rely on this to infer how quickly they can cancel stale quotes. In on-chain order books, unpredictable consensus latency exacerbates this issue.
Most importantly, participants must rely on block builders not sequencing transaction requests in ways that sometimes heavily favor themselves. In practice, if on-chain order books attract significant volume, block producers might specialize in capturing the resulting MEV. This could lead to blockchain centralization, potentially compromising its value proposition as a trusted, neutral settlement layer.
MonarchEV: The Single-Leader Design
In on-chain exchanges, to address latency in order matching, it’s possible to eliminate many consensus steps. One straightforward solution is authorizing a single leader to decide order sequence.
MonarchEV is a single-leader design inspired by granting a single market maker temporary monopoly in a permissionless environment, allowing them to reorder transactions.
Some teams, like dYdX, attempt to mitigate this by requiring market makers to post collateral before gaining monopoly privileges, thereby controlling the monarch. However, this increases the capital costs for market makers and, more importantly, risks exchange misvaluation of collateral, potentially harming blockchain producers. As asset types, quantities, and volatility grow, this could ultimately limit exchange scalability.
Another significant challenge exchanges face is setting appropriate slashing conditions. If slashing is too lenient, market manipulation remains profitable even post-slashing. If too severe, it increases capital risk and makes benign errors (e.g., misconfigurations) costlier. Determining the right slashing amount might require auction-like mechanisms, which could reintroduce latency.
Another method to limit the monarch’s transaction ordering power is implementing threshold encryption or new exchange designs. However, these only guarantee that for a specific set of transactions, the leader commits not to reorder or insert their own trades. They cannot ensure fair inclusion for every transaction, thus only partially mitigating attack possibilities.
Rollup Exchanges
One approach to addressing front-running difficulties is designing systems that check the single operator of an order-matching system. This can be achieved by forcing operators to commit to providing users with order receipts upon submission and publishing transaction histories to a data availability (DA) layer.
An exciting development worth highlighting is transforming exchange operations into rollups, as seen with LayerN. By rolling up transactions, order-matching can occur off-chain with verifiable proofs on the DA layer. At a higher level, this system assures market participants that if the sequencer violates matching engine rules, traders can submit fraud proofs and rely on the DA layer’s transaction history for enforcement. This also means exchange throughput is limited by the underlying DA layer’s performance.
By incorporating leader selection algorithms that can replace censoring sequencers (whether automated or governance-based), this transaction model can maintain the censorship resistance needed for permissionless market creation while avoiding the constraints of consensus-based order books. Additionally, exchange rollups can enhance security models, using fraud detection or validity proofs to mitigate censorship and front-running, shifting from honest-majority to honest-minority assumptions.
However, it’s important to note that fraud proofs cannot detect subtle latency manipulations by exchange operators. Affected market makers might be unable to determine if latency issues stem from uniform network problems or targeted actions by the sequencer. While all participants might experience some latency variation, a consistent disadvantage of milliseconds could severely impact market maker viability. Thus, exchanges built on these single-sequencer order-matching systems may struggle to attract market makers who rely on regulations and reputation for protection against these risks.
Notably, TEEs don’t resolve this issue. Yes, if order data could be sent directly to an order-matching engine running inside a TEE, market participants could ensure fair latency application. However, data packets containing transaction orders aren’t sent directly from users to the enclave; they depend on untrusted computers (e.g., routers) to handle communications. Thus, the sequencer can always manipulate when the order-matching engine inside the SGX enclave sees the order.
What About the "Auction" Aspect?
Among the trade-offs between MafiaEV and MonarchEV in on-chain order books, batch auctions present an exciting solution. Batch auctions accumulate a series of buy and sell orders over a predetermined time frame. When the interval ends, collected orders are executed simultaneously at a single clearing price.
A noteworthy advancement is improving batch auction efficiency through privacy enhancements. For example, in Penumbra’s sealed-bid batch auction implementation, orders are first encrypted, then block builders commit to including these encrypted orders in the block. Only then are orders decrypted and executed via batch auction.
However, batch auctions struggle with real-time price discovery, primarily due to the time required to incorporate new market information. This latency, inherent in time-interval-based execution, contrasts with the continuous immediate processing of on-chain order books, which better suits high-frequency traders needing rapid liquidity injection.
When market consensus on asset value changes rapidly, batch auctions cannot keep pace, leading to mismatches between real-time valuations and batch auction prices until the next interval. High-frequency traders (HFTs) find this latency unappealing and avoid these platforms, potentially reducing liquidity and slowing the integration of new price information. While reduced latency arbitrage profits are a positive outcome, traders seeking more immediate prices also avoid placing orders in these batch auctions.
This phenomenon is supported by empirical research on the Taiwan Stock Exchange’s transition from batch to continuous trading. The shift significantly improved price efficiency for small and mid-cap stocks, indicating the critical importance of quickly integrating new information. Note that increased trading activity wasn’t due to latency arbitrage but to the introduction of continuous trading, suggesting price efficiency gains resulted from combining both methods.
That said, the debate over batch auctions’ relative merits and drawbacks seems far from settled, at least in academia. While batch auctions might find a place in traditional financial markets only with regulatory pressure against HFTs, their attractive features—like eliminating sandwich attacks and reducing gas costs—could make them integral to on-chain trading solutions.
When Will Part Two Be Released?
This article aimed to elucidate current challenges and opportunities in crypto exchanges and MEV, including AMM shortcomings, the arrival of order books and RFQs in crypto, and their design spaces in off-chain and on-chain implementations. When examining on-chain order books, these trade-offs can be viewed through the lenses of MafiaEV and MonarchEV. On a higher level, it appears that any attempt to make on-chain trading systems more complex leads us into a struggle between efficiency and integrity.
In Part Two, we will delve further into the opportunities, challenges, and implications of rapidly emerging primitives in cryptography and system design, from intents to OFAs and novel financial products. From this, we hope to paint a clearer picture of how future pipelines for on-chain value might take shape.
We’re excited to see teams tackle these difficult design challenges. If you’re working on the frontier of these open problems, reach out for professional insights!
Frequently Asked Questions
What is MEV in blockchain trading?
MEV (Maximal Extractable Value) refers to the profit that can be extracted by reordering, inserting, or censoring transactions during block production. It arises from information asymmetry and the ability to manipulate transaction sequences, often at the expense of regular traders.
How do AMMs differ from order book exchanges?
AMMs use algorithmic pricing curves to match trades automatically, while order book exchanges rely on buyers and sellers posting orders at specific prices. Order books typically offer better price discovery and tighter spreads, whereas AMMs prioritize simplicity and decentralization but suffer from higher fees and front-running risks.
Can on-chain order books compete with off-chain exchanges?
On-chain order books face significant challenges due to latency and cost constraints. While innovations like rollups and TEEs may narrow the gap, off-chain exchanges currently outperform them in speed and efficiency. However, on-chain solutions offer superior transparency and censorship resistance.
What are the risks of RFQ systems?
RFQ systems can lead to wider spreads and information asymmetry, as market makers aren’t required to pre-commit liquidity. Traders may receive worse prices compared to open order books, especially in illiquid markets or during high volatility.
How do batch auctions address MEV?
Batch auctions accumulate orders over a set period and execute them simultaneously at a clearing price, reducing opportunities for front-running and sandwich attacks. However, they introduce latency and may deter high-frequency traders, potentially impacting liquidity.
Are privacy solutions like TEEs secure for trading?
TEEs enhance privacy by executing code in isolated environments, but they rely on hardware security and secure data inputs. While they reduce certain attack vectors, they don’t fully eliminate risks like latency manipulation or hardware vulnerabilities.