“The utility of a smart contract platform is proportional to the amount of interesting shared state a program running on that platform can access atomically.”
Sam Blackshear, Co-Founder and CTO @ Mysten Labs
Many people think of "speed" when they hear "Sui." This is certainly true. After the Mysticeti upgrade, Sui has become one of the fastest blockchains in the world (with latency reduced to less than 1 second). Moreover, thanks to the unique structure of the mempool protocol called Narwhal, Sui also has an enormous network throughput. However, I believe that this speed and scalability are merely features to achieve Sui's ultimate goal.
So, what is Sui ultimately trying to achieve?
In my view, not just Sui but many current monolithic chains are aiming to create an environment where smart contracts can interact perfectly with each other to form a kind of super application. And to create such an environment, they are implementing high scalability and fast speeds, as well as open-sourcing their networks.
Perhaps Deepbook, which I'll introduce today, is the best example that showcases Sui's vision. In this article, we will examine the background and purpose of Deepbook's creation, and analyze the main differences and improvements between V2 and V3. We will also explore Deepbook's core technology and operating principles, understand its role in the Sui blockchain, and investigate its impact on the DeFi ecosystem. Finally, by predicting the future direction of Deepbook's development, readers will be able to gain a deep understanding of how Deepbook is realizing Sui's innovative vision and shaping the future of blockchain technology.
Liquidity is one of the most crucial aspects of blockchain technology. Since blockchain's primary utility lies in tokenizing data, providing liquidity for these tokens is equally fundamental. However, abundant liquidity comes at a significant cost, as it requires capital injection from various sources. In traditional finance, market makers fulfilled this role. Replicating this function in a decentralized manner poses an even greater challenge.
To address this, most DeFi protocols have resorted to minting new tokens and distributing them as incentives to liquidity providers, encouraging voluntary liquidity provision. This practice, known as "liquidity mining," initially seemed to attract substantial liquidity to protocols. However, it proved unsustainable due to the continuous dilution of token value.
The quest for a more sustainable approach led to the development of Unified Liquidity Layer protocols like Deepbook. By providing integrated liquidity at the blockchain infrastructure level, these protocols allow DeFi platforms to access ample liquidity without resorting to token issuance and value dilution. This approach is advantageous for blockchains as well, as it eliminates liquidity fragmentation issues and enables more efficient liquidity management across the ecosystem.
Deepbook is already operational on the Sui blockchain, with V2 currently active on the Sui mainnet and V3 slated for an upcoming upgrade. This article will examine both versions, focusing on the changes and improvements in V3.
1.2.1 Deepbook's Basic Structure
Before delving into the differences between V2 and V3, let's explore Deepbook's fundamental structure. Deepbook primarily employs a Central Limit Order Book (CLOB) structure, allowing traders to place limit orders for token trades. This structure offers users an experience similar to traditional exchanges, differentiating it from Automated Market Makers (AMMs) where prices change in real-time and trades occur at specific price points.
1.2.2 Pools
Pools are spaces for trading cryptocurrency pairs, responsible for recording orders and processing completed trades. They use order books to store orders and employ separate Order Processing Mechanisms to handle these orders. Additionally, pools utilize Order Tracking Systems and Custodian Account Systems to efficiently process orders and manage liquidity.
1.2.3 Changes in V3
The upcoming V3 introduces significant changes compared to V2. It features a more refined pool structure and introduces concepts such as balance managers and pool registries to improve the overall protocol architecture. Let's first examine the changes in the pool structure.
Pool’s Architecture
In V3, the pool structure has been refined and consists of three main components:
Order Book (Book):
Responsible for recording trades
Facilitates the matching and execution of orders
State:
Records the transaction history
Maintains the current status of the pool
Vault:
Handles the actual movement of capital when a trade is executed
Manages the custody of assets within the pool
This tripartite structure in V3 allows for a more efficient and organized handling of trades, record-keeping, and asset management within each pool. By separating these functions, Deepbook can achieve greater modularity and potentially improved performance in its operations.
Pool Registry
Next, we have the Pool Registry, which plays a crucial role in managing the tradable asset pairs within Deepbook. Its functions include:
Pair Management:
The Pool Registry oversees which asset pairs are available for trading on Deepbook.
It ensures that there are no duplicate trading pairs within the system, maintaining a streamlined and efficient trading environment.
Version Control:
The Registry manages package version control for the exchange program.
When updates are made to the exchange program, the Pool Registry determines which version should be used.
This management of tradable pairs and program versions allows Deepbook to:
Maintain consistency across the platform
Prevent fragmentation of liquidity
Ensure that all trades are conducted using the most up-to-date and secure version of the exchange program
The Pool Registry thus serves as a critical component in Deepbook's infrastructure, contributing to its overall efficiency and reliability.
Balance Manager
Lastly, we have the Balance Manager, which is a shared object that holds all balances for different assets within the DeepBook trading system. Its primary functions include:
Fund Management:
The Balance Manager is responsible for overseeing and managing users' account balances.
Order Funding:
The Balance Manager holds the funds, and orders are placed using these funds. it's done through the use of TradeProofs.
Deepbook Trade Flow
Let's examine the flow of a transaction when a user actually uses Deepbook, using these structures as examples.
Order Creation
When a user places an order, an 'orderInfo' object is created.
Order Matching
For market orders, the trade is matched immediately. For limit orders, it first checks if there are any matchable orders. If there are matching orders, a 'Fill' object is created to record the transaction details.
Order Update
If the order is not completely filled, it is added to the order book. If it is completely filled, it is removed from the order book.
State Update
After a trade is executed, the information of the users involved in the trade and the overall exchange state are updated.
Settlement
The actual movement of funds is processed in the vault.
Of course, besides these structural improvements, transaction costs have been reduced through optimization of order processing logic. An AMM (Automated Market Maker)-like swap interface has been introduced, flash loans (the ability to provide unsecured loans and repayments within a single transaction) have become possible, and a dynamic fee structure has been implemented where each pool can have a different fee structure.
Perhaps the most notable change here is the introduction of $DEEP, Deepbook's governance token. In V3, $DEEP can be used to pay trading fees, and through $DEEP staking, users can receive fee discounts and maker rebates, as well as governance rights. Let's take a closer look at the Deep token and its functions.
1.3.1 DEEP’s fee model
As mentioned earlier, the biggest change in V3 is the ability to pay trading fees with the native token, $Deep. Deepbook's token fee model is designed around a dynamic fee structure and maker incentives. Firstly, it's impressive that they've adopted a volume-based dynamic taker fee model where fees fluctuate between 10bps and 5bps based on epoch based(approximately 24 hours) trading volume(0.5 to 0.2 in case of stable pools). Maker incentives are dynamically adjusted according to liquidity depth, giving makers all collected fees when liquidity is low and little to no collected fees when liquidity is high. Lastly, token holders can receive fee discounts and additional incentives through staking, and are granted governance participation rights, thus giving utility to the Deep token. The governance model will be described immediately below.
1.3.2 Deep Governance
Deepbook, like many other protocols, has adopted a staking-based governance model. In this model, users who stake DEEP tokens can participate in adjusting parameters for each pool. Voting power is designed to increase non-linearly based on the amount of staked tokens (non-linear voting power increase means that the relationship between the amount of staked tokens and voting power is not a simple proportional relationship, but is designed in a more complex form). This is to prevent excessive centralization and ensure that opinions from diverse participants can be reflected.
1.3.3 Risk and Defense Mechanism Of course, Deepbook also has various risks and vulnerabilities, notably wash trading (the act of an individual or group simultaneously buying and selling the same financial product) and governance attacks (actions by whales with large stakes seeking rent through governance channels). Therefore, Deepbook has implemented various defense mechanisms against these potential risks. 1) First, to prevent wash trading, it is designed so that the collected tokens are always more than the distributed tokens, and the remaining tokens are burned. And 2) to prevent governance attacks, limitations are placed on governance rights to prevent monopolistic pricing, and centralization is prevented through non-linear increases in voting rights based on the amount staked. These mechanisms play an important role in maintaining the stability and fairness of the Deepbook system.
1.3.4 Token Distribution
Finally, the aspect that those receiving the DEEP token airdrop are likely most curious about is the distribution. Deepbook's token distribution has been designed with long-term ecosystem growth and community participation in mind. 10% of the total tokens (its total supply is 10 billion) have been allocated for community airdrops, and 28.43% has been assigned to core contributors and early supporters. The remaining 61.57% has been reserved for future grants and community programs. This distribution structure is designed to promote sustainable growth of the DeepBook ecosystem and encourage participation from various stakeholders. It is highly anticipated whether $DEEP will be able to demonstrate sustainable tokenomics.
Many people mistakenly believe that Deepbook is not being actively used on Sui. This is actually incorrect. Considering that Sui's mainnet launched last year, Deepbook has already recorded over $5B in trading volume in just one year. This can be seen as a very encouraging achievement, and it's particularly noteworthy that this was accomplished with V2. There's much anticipation about how much more trading volume it can handle after the V3 update, when more protocols start using Deepbook.
Especially, as the Sui blockchain is currently emerging as one of the most notable Layer 1 platforms in the blockchain market, it's expected that a wider variety of DeFi protocols and assets will emerge. Consequently, it is believed that Deepbook will be the biggest beneficiary of this trend.
We have explored the structure and development process of Deepbook. What if all Layer 1 chains had a liquidity layer like Deepbook? Of course, since Deepbook can only operate on an infrastructure capable of processing vast transactions in an extremely fast environment like Sui, not all Layer 1 chains can have a liquidity protocol of similar caliber to Deepbook. However, Deepbook's existence can answer why monolithic chains (integrated blockchains) still have an advantage in this market. Or rather, it can explain why the Sui blockchain can exist and be competitive.
Thanks to Deepbook, Sui's DeFi protocols don't need to engage in indiscriminate token distribution to gather liquidity, and they can allocate the time and capital that would have been spent on liquidity concerns to more productive areas.
Moreover, by utilizing Deepbook's diverse infrastructure, there's now a possibility to build innovative applications that haven't been attempted on other Layer 1 platforms.
From Deepbook's perspective, the more DeFi protocols that utilize Deepbook, the better. This is because it will generate more fees and attract more liquidity. Deepbook might just be one example of the ultimate composability that Sui is pursuing. It's expected that in the future, Sui will see more cases like Deepbook where various smart contracts support each other to create a super app. This is why I am optimistic about Sui's future and why I positively evaluate Sui's prospects. Let's keep an eye on the collaboration between Deepbook and other DeFi protocols going forward.
Overall, @DeepBookonSui is a fundamental element of the @SuiNetwork ecosystem, serving as a core pillar for seamless and cost-efficient DeFi use cases. Imo, @DeepBookonSui is a must-watch for anyone bullish on @SuiNetwork, as it lays the foundation for its DeFi ecosystem.
the DeepBook token (DEEP) represents a new wave of decentralized financial infrastructure. By promoting liquidity, fair governance, and active participation, it sets the stage for a more inclusive and efficient financial future. Whether you’re a trader, a developer, or simply an enthusiast, DeepBook offers a glimpse into the next generation of DeFi.