Order Book and AMM: Can We Have the Best of Both?

Order books have long been the cornerstone of trading venues, listing the intentions of buyers and sellers with clarity. They offer a straightforward visualization of user orders and facilitate intuitive interactions for placing or canceling various types of orders. The Automated Market Maker (AMM) represents a relatively novel paradigm in trading venue design, wherein a predefined trading function and a set of rules determine the interactions between liquidity takers and liquidity providers (LPs) within the liquidity pool. This trading function establishes the relationship between liquidity and prices, enabling liquidity takers to compute execution costs based on the proposed trade direction and size, while LPs can precisely calculate the quantities to deposit or withdraw. Notably, the Uniswap protocol utilizes a constant product market maker (CPMM) with the trading function f(x,y)=x * y. In crypto trading, centralized exchanges (CEX) typically employ order books, whereas decentralized exchanges (DEX) utilize the AMM mechanism. This design dichotomy stems from key compromises inherent in the fundamental structures of CEXs and DEXs:

  • DEXs struggle to support traditional order book models due to the inherent limitations of on-chain operation, which are not only costly in terms of gas fees but also lack the time sensitivity required for the rapid order matching.

  • CEXs are not enforced by code; they largely rely on users’ trust for fund management. However, they lack robust transparency and trust mechanisms to prove their innocence in potential theft or crisis.

From the users’ perspective, adopting different alternatives means adapting to varied rules to survive the market and maximize earnings. The challenges are significant. Bars are high for CEX users to step into roles akin to professional market makers, aimed at earning maximized fees from providing liquidity. And it’s almost the same difficulty for DEX users to thrive, only by navigating a labyrinth of indirect interactions, wrestling with issues such as price slippage, high gas consumption, and complex transaction lifecycles, all while dodging the pitfalls of MEV bots and phishing attacks. Is it truly impossible to combine the strength of both, and to enjoy the benefits that CEXs and DEXs offer? Could Zero-Knowledge techniques be the game-changer that bridges these performance and transparency gaps? Vessel introduces VAELOB: The Verifiable AMM-Embedded Limit Order Book. This innovative model not only merges the best of both AMM and order book systems, but also ensures that the entire process is verifiable. Our goal is to create a win-win situation, optimizing the experience for both traders and liquidity providers. Now, let’s take a technical deep dive to better understand this innovative model in practice.

Last updated