` objects for bids and asks, as well as some metadata. It is responsible for storing, matching, modifying, and removing `Orders`.
+
+When placing an order, an `OrderInfo` is first created. If applicable, it is first matched against existing maker orders, accumulating `Fill`s in the process. Any remaining quantity will be used to create an `Order` object and injected into the book. By the end of book processing, the `OrderInfo` object has enough information to update all relevant users and the overall state.
+
+### State
+
+`State` stores `Governance`, `History`, and `Account`. It processes all requests, updating at least one of these stored structs.
+
+#### Governance
+
+The `Governance` module stores data related to the pool's trading params. These parameters are the taker fee, maker fee, and the stake required. Stake required represents the amount of DEEP tokens that a user must have staked in this specific pool to be eligible for taker and maker incentives.
+
+Every epoch, users with non zero stake can submit a proposal to change these parameters. The proposed fees are bounded.
+
+| min_value (bps) | max_value (bps) | Pool type | Taker or maker |
+| --- | --- | --- | --- |
+| 5 | 10 | Volatile | Taker |
+| 2 | 5 | Volatile | Maker |
+| 0.5 | 1 | Stable | Taker |
+| 0.2 | 0.5 | Stable | Maker |
+| 0 | 0 | Whitelisted | Taker and maker |
+
+Users can also vote on live proposals. When a proposal exceeds the quorum, the new trade parameters are queued to go live from the following epoch and onwards. Proposals and votes are reset every epoch. Users can start submitting and voting on proposals the epoch following their stake. Quorum is equivalent to half of the total voting power. A user's voting power is calculated with the following formula where ${V}$ is the voting power, ${S}$ is the amount staked, and ${V_c}$ is the voting power cutoff. ${V_c}$ is currently set to 100,000 DEEP.
+
+$\LARGE V=\min\lparen S,V_c \rparen + \max\lparen \sqrt{S} - \sqrt{V_c} ,0 \rparen$
+
+The following diagram helps visualize the governance lifecycle.
+
+![DeepBook Governance Timeline](./images/governance.png)
+
+#### History
+
+The `History` module stores aggregated volumes, trading params, fees collected and fees to burn for the current epoch and previous epochs. During order processing, fills are used to calculate and update the total volume. Additionally, if the maker of the trade has enough stake, the total staked volume is also updated.
+
+The first operation of every epoch will trigger an update, moving the current epoch data into historic data, and resetting the current epoch data.
+
+User rebate calculations are done in this module. During every epoch, a maker is eligible for rebates as long as their DEEP staked is over the stake required and have contributed in maker volume. The following formula is used to calculate maker fees, quoted from the [Whitepaper: DeepBook Token](/doc/deepbook.pdf) document. Details on maker incentives can be found in section 2.2 of the whitepaper.
+
+
+
+The computation of incentives – which happens after an epoch ends and is only given to makers
+who have staked the required number of DEEP tokens in advance – is calculated in Equation (3) for
+a given maker ${i}$. Equation (3) introduces several new variables. First, ${M}$ refers to the set of makers
+who stake a sufficient number of DEEP tokens, and $\bar{M}$ refers to the set of makers who do not fulfill
+this condition. Second, ${F}$ refers to total fees (collected both from takers and the maker) that a
+maker’s volume has generated in a given epoch. Third, ${L}$ refers to the total liquidity provided by
+a maker – and specifically the liquidity traded, not just the liquidity quoted. Finally, the critical
+point ${p}$ is the “phaseout” point, at which – if total liquidity provided by other makers’ crosses this
+point – incentives are zero for the maker in that epoch. This point ${p}$ is constant for all makers in
+a pool and epoch.
+
+$\LARGE \textsf {Incentives } \textsf {for } \textsf {Maker } i = \max\Bigg\lbrack F_i\Bigg\lparen 1 + \large\cfrac{\sum_{j \in \bar{M}} F_j} {\sum_{j \in M} F_j} \Bigg\rparen\Bigg\lparen \LARGE 1 - \large\cfrac{\sum_{j \in M \cup \bar{M}} L_j - L_i}{p}\Bigg\rparen \LARGE ,0 \Bigg\rbrack$ (3)
+
+
+
+In essence, if the total volume during an epoch is greater than the median volume from the last 28 days, then there are no rebates. The lower the volume compared to the median, the more rebates are available. The maximum amount of rebates for an epoch is equivalent to the total amount of DEEP collected during that epoch. Remaining DEEP is burned.
+
+#### Account
+
+`Account` represents a single user and their relevant data. Everything related to volumes, stake, voted proposal, unclaimed rebates, and balances to be transferred. There is a one to one relationship between a `BalanceManager` and an `Account`.
+
+Every epoch, the first action that a user performs will update their account, triggering a calculation of any potential rebates from the previous epoch, as well as resetting their volumes for the current epoch. Any new stakes from the previous epoch become active.
+
+Each account has settled and owed balances. Settled balances are what the pool owes to the user, and owed balances are what the user owes to the pool. For example, when placing an order, the user's owed balances increase, representing the funds that the user has to pay to place that order. Then, if a maker order is taken by another user, the maker's settled balances increase, representing the funds that the maker is owed.
+
+### Vault
+
+Every transaction that a user performs on DeepBook resets their settled and owed balances. The vault then processes these balances for the user, deducting or adding to funds to their `BalanceManager`.
+
+The vault also stores the `DeepPrice` struct. This object holds up to 100 data points representing the conversion rate between the pool's base or quote asset and DEEP. These data points are sourced from a whitelisted pool, DEEP/USDC or DEEP/SUI. This conversion rate is used to determine the quantity of DEEP tokens required to pay for trading fees.
+
+### `BigVector`
+
+`BigVector` is an arbitrary sized vector-like data structure, implemented using an on-chain B+ Tree to support almost constant time (log base max_fan_out) random access, insertion and removal.
+
+Iteration is supported by exposing access to leaf nodes (slices). Finding the initial slice can be done in almost constant time, and subsequently finding the previous or next slice can also be done in constant time.
+
+Nodes in the B+ Tree are stored as individual dynamic fields hanging off the `BigVector`.
+
+## Place limit order flow
+
+The following diagram of the lifecycle of an order placement action helps visualize the book, then state, then vault flow.
+
+![Place limit order flow](./images/placeorder.png)
+
+### Pool
+
+In the `Pool` module, `place_order_int` is called with the user's input parameters. In this function, four things happen in order:
+ 1. An `OrderInfo` is created.
+ 1. The `Book` function `create_order` is called.
+ 1. The `State` function `process_create` is called.
+ 1. The `Vault` function `settle_balance_manager` is called.
+
+### Book
+
+The order creation within the book involves three primary tasks:
+ - Validate inputs.
+ - Match against existing orders.
+ - Inject any remaining quantity into the order book as a limit order.
+
+Validation of inputs ensures that quantity, price, timestamp, and order type are within expected ranges.
+
+To match an `OrderInfo` against the book, the list of `Order`s is iterated in the opposite side of the book. If there is an overlap in price and the existing maker order has not expired, then DeepBook matches their quantities and generates a `Fill`. DeepBook appends that fill to the `OrderInfo` fills, to use later in state. DeepBook updates the existing maker order quantities and status during each match, and removes them from the book if they are completely filled or expired.
+
+Finally, if the `OrderInfo` object has any remaining quantity, DeepBook converts it into a compact `Order` object and injects it into the order book. `Order` has the minimum amount of data necessary for matching, while `OrderInfo` has the maximum amount of data for general processing.
+
+Regardless of direction or order type, all DeepBook matching is processed in a single function.
+
+### State
+
+The `process_create` function in `State` handles the processing of an order creation event within the pool's state: calculating the transaction amounts and fees for the order, and updating the account volumes accordingly.
+
+First, the function processes the list of fills from the `OrderInfo` object, updating volumes tracked and settling funds for the makers involved. Next, the function retrieves the account's total trading volume and active stake. It calculates the taker's fee based on the user's account stake and volume in DEEP tokens, while the maker fee is retrieved from the governance trade parameters. To receive discounted taker fees, the account must have more than the minimum stake for the pool, and the trading volume in DEEP tokens must exceed the same threshold. If any quantity remains in the `OrderInfo` object, it is added to the account's list of orders as an `Order` and is already created in `Book`.
+
+Finally, the function calculates the partial taker fills and maker order quantities, if there are any, with consideration for the taker and maker fees. It adds these to the previously settled and owed balances from the account. Trade history is updated with the total fees collected from the order and two tuples are returned to `Pool`, settled and owed balances, in (base, quote, DEEP) format, ensuring the correct assets are transferred in `Vault`.
+
+### Vault
+
+The `settle_balance_manager` function in `Vault` is responsible for managing the transfer of any settled and owed amounts for the `BalanceManager`. It starts by validating that the trader is authorized to use the `BalanceManager`. For each asset type, if the `balances_out` exceeds the `balances_in`, the difference is split from the vault's balance and deposited into the `BalanceManager`. Conversely, if the `balances_in` exceeds the `balances_out`, the difference is withdrawn from the `BalanceManager` and joined to the vault's balance. This process is repeated for base, quote, and DEEP asset balances, ensuring all asset balances are accurately reflected and settled between the vault and the `BalanceManager`.
\ No newline at end of file
diff --git a/docs/content/standards/deepbookv3/flash-loans.mdx b/docs/content/standards/deepbookv3/flash-loans.mdx
new file mode 100644
index 00000000000000..561785f0a62590
--- /dev/null
+++ b/docs/content/standards/deepbookv3/flash-loans.mdx
@@ -0,0 +1,63 @@
+---
+title: Flash Loans
+description: Use DeepBook to perform flash loans, uncollaterized loans that are borrowed and repaid within the same programmable transaction block.
+---
+
+{@include: ../../snippets/deepbook.mdx}
+
+Flash loans by definition are uncollaterized loans that are borrowed and repaid within the same programmable transaction block. Users can borrow flash loans in the base or quote asset from any DeepBook pool. Flash loans return a `FlashLoan` hot potato (struct with no abilities), which must be returned back to the pool by the end of the call. The transaction is atomic, so the entire transaction fails if the loan is not returned.
+
+The quantity borrowed can be the maximum amount that the pool owns. Borrowing from a pool and trading in the same pool can result in failures because trading requires the movement of funds. If the funds are borrowed, then there are no funds to move.
+
+## API
+
+Following are the endpoints that the `Pool` exposes for flash loans.
+
+### Borrow flash loan base
+
+Borrow base assets from the `Pool`. The function returns a hot potato, forcing the borrower to return the assets within the same transaction.
+
+```move
+public fun borrow_flashloan_base(
+ self: &mut Pool,
+ base_amount: u64,
+ ctx: &mut TxContext,
+): (Coin, FlashLoan)
+```
+
+### Borrow flash loan quote
+
+Borrow quote assets from the `Pool`. The function returns a hot potato, forcing the borrower to return the assets within the same transaction.
+
+```move
+public fun borrow_flashloan_quote(
+ self: &mut Pool,
+ quote_amount: u64,
+ ctx: &mut TxContext,
+): (Coin, FlashLoan)
+```
+
+### Retrieve flash loan base
+
+Return the flash loaned base assets to the `Pool`. `FlashLoan` object is unwrapped only if the assets are returned, otherwise the transaction fails.
+
+```move
+public fun return_flashloan_base(
+ self: &mut Pool,
+ coin: Coin,
+ flash_loan: FlashLoan,
+)
+```
+
+### Retrieve flash loan quote
+
+Return the flash loaned quote assets to the `Pool`. `FlashLoan` object is unwrapped only if the assets are returned,
+otherwise the transaction fails.
+
+```move
+public fun return_flashloan_quote(
+ self: &mut Pool,
+ coin: Coin,
+ flash_loan: FlashLoan,
+)
+```
\ No newline at end of file
diff --git a/docs/content/standards/deepbookv3/images/DBv3Architecture.png b/docs/content/standards/deepbookv3/images/DBv3Architecture.png
new file mode 100644
index 00000000000000..17acf888e21a23
Binary files /dev/null and b/docs/content/standards/deepbookv3/images/DBv3Architecture.png differ
diff --git a/docs/content/standards/deepbookv3/images/governance.png b/docs/content/standards/deepbookv3/images/governance.png
new file mode 100644
index 00000000000000..0d412b8155156b
Binary files /dev/null and b/docs/content/standards/deepbookv3/images/governance.png differ
diff --git a/docs/content/standards/deepbookv3/images/placeorder.png b/docs/content/standards/deepbookv3/images/placeorder.png
new file mode 100644
index 00000000000000..527fdb210a88f5
Binary files /dev/null and b/docs/content/standards/deepbookv3/images/placeorder.png differ
diff --git a/docs/content/standards/deepbookv3/images/pool.png b/docs/content/standards/deepbookv3/images/pool.png
new file mode 100644
index 00000000000000..29de96feb701ec
Binary files /dev/null and b/docs/content/standards/deepbookv3/images/pool.png differ
diff --git a/docs/content/standards/deepbookv3/orders.mdx b/docs/content/standards/deepbookv3/orders.mdx
new file mode 100644
index 00000000000000..2ba69d840e75aa
--- /dev/null
+++ b/docs/content/standards/deepbookv3/orders.mdx
@@ -0,0 +1,289 @@
+---
+title: DeepBook Orders
+sidebar_label: Orders
+---
+
+{@include: ../../snippets/deepbook.mdx}
+
+Users can create limit or market orders, modify orders, and cancel orders. The `BalanceManager` must have the necessary funds to process orders. DeepBook has four order options and three self matching options. Initially, all trading fees are paid with the DEEP token. Consequently, if you set the `pay_with_deep` flag to `false`, orders automatically fail until the following upgrade.
+
+Users can modify their existing order, reducing the size, lowering the expiration time, or both. Users cannot modify their order to increase their size or increase their expiration time. To do that, they must cancel the original order and place a new order.
+
+Users can cancel a single order or cancel all of their orders.
+
+## API
+
+Following are the order related endpoints that `Pool` exposes.
+
+### Order options
+
+The following constants define the options available for orders.
+
+```move
+// Restrictions on limit orders.
+// No restriction on the order.
+const NO_RESTRICTION: u8 = 0;
+// Mandates that whatever amount of an order that can be executed in the
+// current transaction, be filled and then the rest of the order canceled.
+const IMMEDIATE_OR_CANCEL: u8 = 1;
+// Mandates that the entire order size be filled in the current transaction.
+// Otherwise, the order is canceled.
+const FILL_OR_KILL: u8 = 2;
+// Mandates that the entire order be passive. Otherwise, cancel the order.
+const POST_ONLY: u8 = 3;
+```
+
+### Self-matching options
+
+The following constants define the options available for self-matching orders.
+
+```move
+// Self matching types.
+// Self matching is allowed.
+const SELF_MATCHING_ALLOWED: u8 = 0;
+// Cancel the taker order.
+const CANCEL_TAKER: u8 = 1;
+// Cancel the maker order.
+const CANCEL_MAKER: u8 = 2;
+```
+
+### OrderInfo struct
+
+Placing a limit order or a market order creates and returns an `OrderInfo` object. DeepBook automatically drops this object after the order completes or is placed in the book. Use `OrderInfo` to inspect the execution details of the request as it represents all order information. DeepBook does not catch any errors, so if there’s a failure of any kind, then the entire transaction fails.
+
+```move
+public struct OrderInfo has store, drop {
+ // ID of the pool
+ pool_id: ID,
+ // ID of the order within the pool
+ order_id: u128,
+ // ID of the account the order uses
+ balance_manager_id: ID,
+ // ID of the order defined by client
+ client_order_id: u64,
+ // Trader of the order
+ trader: address,
+ // Order type, NO_RESTRICTION, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, POST_ONLY
+ order_type: u8,
+ // Self matching option,
+ self_matching_option: u8,
+ // Price, only used for limit orders
+ price: u64,
+ // Whether the order is a buy or a sell
+ is_bid: bool,
+ // Quantity (in base asset terms) when the order is placed
+ original_quantity: u64,
+ // Deep conversion used by the order
+ order_deep_price: OrderDeepPrice,
+ // Expiration timestamp in ms
+ expire_timestamp: u64,
+ // Quantity executed so far
+ executed_quantity: u64,
+ // Cumulative quote quantity executed so far
+ cumulative_quote_quantity: u64,
+ // Any partial fills
+ fills: vector,
+ // Whether the fee is in DEEP terms
+ fee_is_deep: bool,
+ // Fees paid so far in base/quote/DEEP terms
+ paid_fees: u64,
+ epoch: u64,
+ // Status of the order
+ status: u8,
+ // Is a market_order
+ market_order: bool,
+}
+```
+
+### OrderDeepPrice struct
+
+The `OrderDeepPrice` struct represents the conversion rate of DEEP at the time the order was placed.
+```move
+public struct OrderDeepPrice has copy, store, drop {
+ asset_is_base: bool,
+ deep_per_asset: u64,
+}
+```
+
+### Fill struct
+
+The `Fill` struct represents the results of a match between two orders. Use this struct to update the state.
+
+```move
+public struct Fill has store, drop, copy {
+ // ID of the maker order
+ maker_order_id: u128,
+ // account_id of the maker order
+ balance_manager_id: ID,
+ // Whether the maker order is expired
+ expired: bool,
+ // Whether the maker order is fully filled
+ completed: bool,
+ // Quantity filled
+ base_quantity: u64,
+ // Quantity of quote currency filled
+ quote_quantity: u64,
+ // Whether the taker is bid
+ taker_is_bid: bool,
+ // Maker epoch
+ maker_epoch: u64,
+ // Maker deep price
+ maker_deep_price: OrderDeepPrice,
+}
+```
+
+### Events
+
+DeepBook emits `OrderFilled` when a maker order is filled.
+
+```move
+public struct OrderFilled has copy, store, drop {
+ pool_id: ID,
+ maker_order_id: u128,
+ taker_order_id: u128,
+ maker_client_order_id: u64,
+ taker_client_order_id: u64,
+ price: u64,
+ taker_is_bid: bool,
+ base_quantity: u64,
+ quote_quantity: u64,
+ maker_balance_manager_id: ID,
+ taker_balance_manager_id: ID,
+ timestamp: u64,
+}
+```
+
+DeepBook emits `OrderCanceled` when a maker order is canceled.
+
+```move
+public struct OrderCanceled has copy, store, drop {
+ pool_id: ID,
+ order_id: u128,
+ client_order_id: u64,
+ price: u64,
+ is_bid: bool,
+ base_asset_quantity_canceled: u64,
+ timestamp: u64,
+}
+```
+
+DeepBook emits `OrderModified` on modification of a maker order.
+
+```move
+public struct OrderModified has copy, store, drop {
+ pool_id: ID,
+ order_id: u128,
+ client_order_id: u64,
+ price: u64,
+ is_bid: bool,
+ new_quantity: u64,
+ timestamp: u64,
+}
+```
+
+DeepBook emits `OrderPlaced` when it injects a maker order into the order book.
+
+```move
+public struct OrderPlaced has copy, store, drop {
+ balance_manager_id: ID,
+ pool_id: ID,
+ order_id: u128,
+ client_order_id: u64,
+ trader: address,
+ price: u64,
+ is_bid: bool,
+ placed_quantity: u64,
+ expire_timestamp: u64,
+}
+```
+
+### Place limit order
+
+Place a limit order. Quantity is in base asset terms. For current version `pay_with_deep` must be true, so the
+fee is paid with DEEP tokens.
+
+You must combine a `BalanceManager` call of generating a `TradeProof` before placing orders.
+
+```move
+public fun place_limit_order(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ client_order_id: u64,
+ order_type: u8,
+ self_matching_option: u8,
+ price: u64,
+ quantity: u64,
+ is_bid: bool,
+ pay_with_deep: bool,
+ expire_timestamp: u64,
+ clock: &Clock,
+ ctx: &TxContext,
+): OrderInfo
+```
+
+### Place market order
+
+Place a market order. Quantity is in base asset terms. Calls `place_limit_order` with a price of `MAX_PRICE` for bids and `MIN_PRICE` for asks. DeepBook cancels the order for any quantity not filled.
+
+```move
+public fun place_market_order(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ client_order_id: u64,
+ self_matching_option: u8,
+ quantity: u64,
+ is_bid: bool,
+ pay_with_deep: bool,
+ clock: &Clock,
+ ctx: &TxContext,
+): OrderInfo
+```
+
+### Modify order
+
+Modifies an order given `order_id` and `new_quantity`. New quantity must be less than the original quantity and more than the filled quantity. Order must not have already expired.
+
+The `modify_order` function does not return anything. If the transaction is successful, then assume the modification was successful.
+
+```move
+public fun modify_order(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ order_id: u128,
+ new_quantity: u64,
+ clock: &Clock,
+ ctx: &TxContext,
+)
+```
+
+### Cancel order
+
+Cancel an order. The order must be owned by the `balance_manager`. The order is removed from the book and the `balance_manager` open orders. The `balance_manager` balance is updated with the order's remaining quantity.
+
+Similar to modify, `cancel_order` does not return anything. DeepBook emits `OrderCanceled` event.
+
+```move
+public fun cancel_order(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ order_id: u128,
+ clock: &Clock,
+ ctx: &TxContext,
+)
+```
+
+### Withdraw settled amounts
+
+Withdraw settled amounts to the `balance_manager`. All orders automatically withdraw settled amounts. This can be called explicitly to withdraw all settled funds from the pool.
+
+```move
+public fun withdraw_settled_amounts(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+)
+```
\ No newline at end of file
diff --git a/docs/content/standards/deepbookv3/query-the-pool.mdx b/docs/content/standards/deepbookv3/query-the-pool.mdx
new file mode 100644
index 00000000000000..e8b80f796cadf6
--- /dev/null
+++ b/docs/content/standards/deepbookv3/query-the-pool.mdx
@@ -0,0 +1,120 @@
+---
+title: Query the Pool
+---
+
+{@include: ../../snippets/deepbook.mdx}
+
+The `Pool` shared object represents a market, such as a SUI/USDC market. That `Pool` is the only one representing that unique pairing (SUI/USDC) and the pairing is the only member of that particular `Pool`. See [DeepBook Design](./design.mdx#pool) to learn more about the structure of pools.
+
+To perform trades, you pass a `BalanceManager` and `TradeProof` into the relvant `Pool`. Unlike `Pool`s, `BalanceManager` shared objects can contain any type of token, such that the same `BalanceManager` can access multiple `Pool`s to interact with many different trade pairings. See [BalanceManager](./balance-manager.mdx) to learn more.
+
+## API
+
+DeepBook exposes a set of endpoints that can be used to query any pool.
+
+### Check whitelist status
+
+Accessor to check whether the pool is whitelisted.
+
+```move
+public fun whitelisted(self: &Pool): bool
+```
+
+### Check quote quantity against base
+
+Dry run to determine the quote quantity out for a given base quantity.
+
+```move
+public fun get_quote_quantity_out(
+ self: &Pool,
+ base_quantity: u64,
+ clock: &Clock,
+): (u64, u64, u64)
+```
+
+### Check quote quantity against quote
+
+Dry run to determine the base quantity out for a given quote quantity.
+
+```move
+public fun get_base_quantity_out(
+ self: &Pool,
+ quote_quantity: u64,
+ clock: &Clock,
+): (u64, u64, u64)
+```
+
+### Check quote quantity against quote or base
+
+Dry run to determine the quantity out for a given base or quote quantity. Only one out of base or quote quantity should be non-zero. Returns the (`base_quantity_out`, `quote_quantity_out`, `deep_quantity_required`).
+
+```move
+public fun get_quantity_out(
+ self: &Pool,
+ base_quantity: u64,
+ quote_quantity: u64,
+ clock: &Clock,
+): (u64, u64, u64)
+```
+
+### Retrieve mid price for a pool
+
+Returns the mid price of the pool.
+
+```move
+public fun mid_price(
+ self: &Pool,
+ clock: &Clock,
+): u64
+```
+
+### Retrieve order IDs
+
+Returns the `order_id` for all open orders for the `balance_manager` in the pool.
+
+```move
+public fun account_open_orders(
+ self: &Pool,
+ balance_manager: ID,
+): VecSet
+```
+
+### Retrieve prices and quantities for an order book
+
+Returns vectors holding the prices (`price_vec`) and quantities (`quantity_vec`) for the level2 order book. The `price_low` and `price_high` are inclusive, all orders within the range are returned. `is_bid` is `true` for bids and `false` for asks.
+
+```move
+public fun get_level2_range(
+ self: &Pool,
+ price_low: u64,
+ price_high: u64,
+ is_bid: bool,
+): (vector, vector)
+```
+
+Returns vectors holding the prices (`price_vec`) and quantities (`quantity_vec`) for the level2 order book. `ticks` are the maximum number of ticks to return starting from best bid and best ask. (`bid_price`, `bid_quantity`, `ask_price`, `ask_quantity`) are returned as four vectors. The price vectors are sorted in descending order for bids and ascending order for asks.
+
+```move
+public fun get_level2_ticks_from_mid(
+ self: &Pool,
+ ticks: u64,
+): (vector, vector, vector, vector)
+```
+
+### Retrieve balances
+
+Get all balances held in this pool.
+
+```move
+public fun vault_balances(
+ self: &Pool,
+): (u64, u64, u64)
+```
+
+### Retrieve Pool ID
+
+Get the ID of the pool given the asset types.
+
+```move
+public fun get_pool_id_by_asset(registry: &Registry): ID
+```
\ No newline at end of file
diff --git a/docs/content/standards/deepbookv3/staking-governance.mdx b/docs/content/standards/deepbookv3/staking-governance.mdx
new file mode 100644
index 00000000000000..29d3dc6a52e2ac
--- /dev/null
+++ b/docs/content/standards/deepbookv3/staking-governance.mdx
@@ -0,0 +1,92 @@
+---
+title: Staking and Governance
+---
+
+{@include: ../../snippets/deepbook.mdx}
+
+DeepBook’s novel approach to governance allows users to update a single pool’s three parameters:
+ - taker fee rate
+ - maker fee rate
+ - stake required
+
+Stake required is the amount of DEEP tokens a user must have staked in the pool to take advantage of taker and maker incentives. Each individual DeepBook pool has independent governance, and governance can be conducted every epoch. See [Design](./design.mdx#governance) to learn more about governance.
+
+![DeepBook Governance Timeline.png](./images/governance.png)
+
+## API
+
+`Pool` exposes the following endpoints for staking and governance.
+
+### Stake
+
+DEEP tokens must be available in the `balance_manager` for staking. A user’s stake becomes active in the following epoch. If the user’s active stake is greater than the stake required, the user can get reduced taker fees and can accumulate trading fee rebates during that epoch.
+
+```move
+public fun stake(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ amount: u64,
+ ctx: &TxContext,
+)
+```
+
+### Unstake
+
+All of the user’s active and inactive stake are removed and added back into the `BalanceManager`. Any casted votes are removed. Maker rebates for the epoch are forfeited, and any reduced taker fees for the remaining epoch are disabled.
+
+The `balance_manager` must have enough staked DEEP tokens. The `balance_manager` data is updated with the unstaked amount. Balance is transferred to the `balance_manager` immediately.
+
+```move
+public fun unstake(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ ctx: &TxContext,
+)
+```
+
+### Submit proposal
+
+Users with a non zero active stake can submit proposals. One proposal per user. The user automatically votes for the proposal they submit.
+
+Submit a proposal to change the taker fee, maker fee, and stake required. The `balance_manager` must have enough staked DEEP tokens to participate. Each `balance_manager` can only submit one proposal per epoch. If the maximum proposal is reached, the proposal with the lowest vote is removed. If the `balance_manager` has less voting power than the lowest voted proposal, the proposal is not added.
+
+```move
+public fun submit_proposal(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ taker_fee: u64,
+ maker_fee: u64,
+ stake_required: u64,
+ ctx: &TxContext,
+)
+```
+
+### Vote
+
+Users with non-zero voting power can vote on a proposal. All voting power is used on a single proposal. If the user has voted on a different proposal during this epoch, then that vote is removed and recasted into the new proposal. The `balance_manager` must have enough staked DEEP tokens to participate.
+
+```move
+public fun vote(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ proposal_id: ID,
+ ctx: &TxContext,
+)
+```
+
+### Claim rebates
+
+Use `claim_rebates` to claim the rewards for the `balance_manager`. The `balance_manager` must have rewards to claim. The `balance_manager` data is updated with the claimed rewards.
+
+```move
+public fun claim_rebates(
+ self: &mut Pool,
+ balance_manager: &mut BalanceManager,
+ trade_proof: &TradeProof,
+ ctx: &TxContext,
+)
+```
\ No newline at end of file
diff --git a/docs/content/standards/deepbookv3/swaps.mdx b/docs/content/standards/deepbookv3/swaps.mdx
new file mode 100644
index 00000000000000..ccd82e6bd66c2e
--- /dev/null
+++ b/docs/content/standards/deepbookv3/swaps.mdx
@@ -0,0 +1,64 @@
+---
+title: Swaps
+---
+
+{@include: ../../snippets/deepbook.mdx}
+
+DeepBook provides a swap-like interface commonly seen in automatic market makers (AMMs). Unlike the order functions, you can call `swap_exact_amount` without a `BalanceManager`. You call it directly with `Coin` objects instead. When swapping from base to quote, `base_in` must have a positive value while `quote_in` must be zero. When swapping from quote to base, `quote_in` must be positive and `base_in` zero. Some `deep_in` amount is required to pay for trading fees. You can overestimate this amount, as the unused DEEP tokens are returned at the end of the call.
+
+You can use the `get_amount_out` endpoint to simulate a swap. The function returns the exact amount of DEEP tokens that the swap requires.
+
+## API
+
+Following are the endpoints that the `Pool` exposes for swaps.
+
+### Swap exact base for quote
+
+Swap exact base quantity without needing a `balance_manager`. DEEP quantity can be overestimated. Returns three `Coin` objects: base, quote, and deep. Some base quantity may be left over, if the input quantity is not divisible by lot size.
+
+You can overestimate the amount of DEEP required. The remaining balance is returned.
+
+```move
+public fun swap_exact_base_for_quote(
+ self: &mut Pool,
+ base_in: Coin,
+ deep_in: Coin,
+ clock: &Clock,
+ ctx: &mut TxContext,
+): (Coin, Coin, Coin)
+```
+
+### Swap exact quote for base
+
+Swap exact quote quantity without needing a `balance_manager`. You can overestimate DEEP quantity. Returns three `Coin` objects:
+ - `BaseAsset`
+ - `QuoteAsset`
+ - `DEEP`
+
+Some quote quantity might be left over if the input quantity is not divisible by lot size.
+
+```move
+public fun swap_exact_quote_for_base(
+ self: &mut Pool,
+ quote_in: Coin,
+ deep_in: Coin,
+ clock: &Clock,
+ ctx: &mut TxContext,
+): (Coin, Coin, Coin)
+```
+
+### Swap exact quantity
+
+This function is what the previous two functions call with `coin::zer()` set for the third coin. Users can call this directly for base → quote or quote → base as long as base or quote have a zero value.
+
+```move
+/// Swap exact quantity without needing an balance_manager.
+public fun swap_exact_quantity(
+ self: &mut Pool,
+ base_in: Coin,
+ quote_in: Coin,
+ deep_in: Coin,
+ clock: &Clock,
+ ctx: &mut TxContext,
+): (Coin, Coin, Coin)
+```
\ No newline at end of file
diff --git a/docs/site/static/doc/deepbook.pdf b/docs/site/static/doc/deepbook.pdf
new file mode 100644
index 00000000000000..29369d26149f86
Binary files /dev/null and b/docs/site/static/doc/deepbook.pdf differ
diff --git a/docs/site/vercel.json b/docs/site/vercel.json
index 69b7e7cd0e4b7e..47324006b85af3 100644
--- a/docs/site/vercel.json
+++ b/docs/site/vercel.json
@@ -101,6 +101,12 @@
{ "source": "/concepts/sui-move-concepts/patterns/id-pointer", "destination": "https://move-book.com/storage/uid-and-id.html", "permanent": true },
{ "source": "/concepts/sui-move-concepts/patterns/transferrable-witness", "destination": "https://move-book.com/programmability/witness-pattern.html", "permanent": true },
{ "source": "/guides/developer/advanced/asset-tokenization", "destination": "/guides/developer/nft/asset-tokenization", "permanent": true },
- { "source": "/references/move/move-toml", "destination": "https://move-book.com/concepts/manifest.html", "permanent": true }
+ { "source": "/references/move/move-toml", "destination": "https://move-book.com/concepts/manifest.html", "permanent": true },
+ { "source": "/standards/deepbook-pools", "destination": "/standards/deepbookv2/pools", "permanent": true },
+ { "source": "/standards/routing-a-swap", "destination": "/standards/deepbookv2/routing-a-swap", "permanent": true },
+ { "source": "/standards/trade-and-swap", "destination": "/standards/deepbookv2/trade-and-swap", "permanent": true },
+ { "source": "/standards/query-the-pool", "destination": "/standards/deepbookv2/query-the-pool", "permanent": true },
+ { "source": "/standards/deepbook-design", "destination": "/standards/deepbookv2/design", "permanent": true },
+ { "source": "/standards/deepbook-orders", "destination": "/standards/deepbookv2/orders", "permanent": true }
]
}