Sui opens a new chapter in DeFi with the launch of DeepBook, its first native decentralized central limit order book (CLOB). Built by a community of Sui contributors, DeepBook provides a stable liquidity layer enabling a new generation of DeFi apps.

With DeepBook, DeFi and other builders will find a ready-to-use liquidity layer leveraging Sui's consensus mechanism for optimum performance. Its open API lets builders plug in apps and take advantage of asset trading.

At launch, a number of exchanges leverage DeepBook for trading functionality and contribute to its liquidity. KriyaDEX, Turbos.Finance, Aftermath Finance, Cetus, Kairon Labs, and MovEX helped test and currently use DeepBook to enable their own services. DeepBook will be supported by Kairon Labs as its initial market maker in addition to other liquidity providers.

diagram showing DeepBook's architecture within Sui
DeepBook provides DeFi builders a ready-to-use liquidity layer designed specifically for the Sui network.

DeepBook supports both limit and market orders from sellers and buyers. Designed as permissionless and released as open source, DeepBook exists as a Move package that lets anyone publish a liquidity pool to enable trading between a pair of assets. DeepBook does not have a token, and all the fees it collects are burned. It is a public good providing generic infrastructure that DeFi builders can tap into for audited and efficient code, and for liquidity.

Trading

As a CLOB, DeepBook supports markets where sellers list assets at a specific price, commonly called a limit order, or at a market price. Buyers browse the DeepBook ledger to find assets they want to purchase. This model gives traders the freedom to buy and sell at prices they choose, supporting traditional supply and demand economics.

DeepBook's transparency into the order process and permissionless nature supports Sui's ethos of fairness and decentralization. Users can view the order flow, order book depth, and order matching process. Anyone can buy and sell on the exchange with no restrictions.

Architecture

DeepBook consists of two key components, its core matching engine and its smart order routing engine. The matching engine uses an order book built on per-asset shared object pools. Order matching between assets occurs on-chain, while the routing engine processes transactions off-chain.

For each base and quote asset trading pair, DeepBook creates a globally shared pool to handle order placement, cancellation, and settlement. Under this architecture, transactions involving different trading pairs can be easily parallelized to maximize throughput.

Pools store unfilled maker orders. Taker orders are filled instantaneously from the available maker orders within the same transaction the order is submitted. Bid and ask orders are stored separately, each with a two-level nested crit-bit tree, an efficient means of storing bit strings.

The DeepBook SDK bootstraps DeFi builders with code snippets for trades and swaps, swap routing, and pool queries.

Secure

In an audit commissioned by MovEx, blockchain security company Zellic tested DeepBook and compiled a report discussing vulnerabilities and remediations. Zellic considered specific criteria for its audit, such as whether funds could be drained from the custodian, and whether an attacker could lockup funds or gain an unfair trading advantage.

The audit examined the DeepBook modules for coding mistakes, logic errors, integration risks, and code maturity.

The company found four critical errors, one medium, and one low. As one example, DeepBook allowed zero-quantity orders, which could be exploited to flood the system in a denial-of-service attack. All of the vulnerabilities found during the audit were successfully remediated through code changes.

Contribute

MovEX originally designed and created DeepBook before making it open source and contributing it to Sui. Other contributors, including Mysten Labs, Jump, Kairon Labs, GSR, Wintermute, and Aftermath Finance, played an integral role in DeepBook’s development. Further community involvement will be critical in ensuring that DeepBook evolves to meet the needs of Sui DeFi builders.

Help make DeepBook serve the Sui community by exploring the documentation and SDK, and engaging in the Sui Improvement Proposals process to suggest improvements and features.

Author

Sui Foundation

High-performance blockchain delivering the full stack for a new global economy.

Read more like this

FDUSD Now Available on Sui

First Digital brings its stablecoin to Sui as a native token, giving DeFi users a new option.

1min read
Sui Foundation

Slush Strategies: Earn From DeFi Inside Your Wallet

A new way to earn from DeFi. No external apps or multi-step flows. Choose a strategy, tap, and Slush provides you with effortless access to your desired DeFi protocols

4min read
Abhinav Garg

Build Beyond: How DevRel Supports the Developer’s Journey with Sui

A conversation with Head of Developer Relations Brian Hennessey-Hsieh on open source, decentralization, and developer success with Sui.

8min read
Sui Foundation

Babylon Labs, Lombard, and Cubist Bringing Programmable Bitcoin to Sui

Through this initiative, Bitcoin holders will be able to stake BTC and receive LBTC, a liquid staking token, natively minted on Sui.

2min read
Sui Foundation

Confidential Transfers on Sui: Now in Public Beta

Main Takeaways With confidential transfers, balances and transfer amounts can be kept confidential onchain, while senders, receivers, and auditability remain...

3min read
Sui Foundation

New Blockchain Academy Coming to American University of Sharjah

The American University of Sharjah, partnering with the Sui Foundation, will launch an all-new blockchain academy, giving students a path into the Web3 industry.

1min read
Sui Foundation