Skip to content

Commit

Permalink
Revert "Add quantity_min_tick to DeepBook. Quantity must be divisible… (
Browse files Browse the repository at this point in the history
#17927)

… by this amount, rather than lot_size. (#17335)"

This reverts commit d2425d6.

Describe the changes or additions included in this PR.

How did you test the new or updated feature?

---

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:

---------

Co-authored-by: Timothy Zakian <[email protected]>
  • Loading branch information
dariorussi and tzakian committed May 26, 2024
1 parent e3ace09 commit 7045505
Show file tree
Hide file tree
Showing 5 changed files with 340 additions and 502 deletions.
69 changes: 29 additions & 40 deletions crates/sui-framework/docs/deepbook/clob_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1176,11 +1176,11 @@ do not have this capability:



<a name="0xdee9_clob_v2_EInvalidTickSizeMinSize"></a>
<a name="0xdee9_clob_v2_EInvalidTickSizeLotSize"></a>



<pre><code><b>const</b> <a href="clob_v2.md#0xdee9_clob_v2_EInvalidTickSizeMinSize">EInvalidTickSizeMinSize</a>: u64 = 20;
<pre><code><b>const</b> <a href="clob_v2.md#0xdee9_clob_v2_EInvalidTickSizeLotSize">EInvalidTickSizeLotSize</a>: u64 = 20;
</code></pre>


Expand All @@ -1203,15 +1203,6 @@ do not have this capability:



<a name="0xdee9_clob_v2_LOT_SIZE"></a>



<pre><code><b>const</b> <a href="clob_v2.md#0xdee9_clob_v2_LOT_SIZE">LOT_SIZE</a>: u64 = 1000;
</code></pre>



<a name="0xdee9_clob_v2_MIN_BID_ORDER_ID"></a>


Expand Down Expand Up @@ -1437,7 +1428,7 @@ Destroy the given <code>pool_owner_cap</code> object



<pre><code><b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool_">create_pool_</a>&lt;BaseAsset, QuoteAsset&gt;(taker_fee_rate: u64, maker_rebate_rate: u64, tick_size: u64, min_size: u64, creation_fee: <a href="../sui-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool_">create_pool_</a>&lt;BaseAsset, QuoteAsset&gt;(taker_fee_rate: u64, maker_rebate_rate: u64, tick_size: u64, lot_size: u64, creation_fee: <a href="../sui-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -1450,15 +1441,15 @@ Destroy the given <code>pool_owner_cap</code> object
taker_fee_rate: u64,
maker_rebate_rate: u64,
tick_size: u64,
min_size: u64,
lot_size: u64,
creation_fee: Balance&lt;SUI&gt;,
ctx: &<b>mut</b> TxContext,
) {
<b>let</b> (pool, pool_owner_cap) = <a href="clob_v2.md#0xdee9_clob_v2_create_pool_with_return_">create_pool_with_return_</a>&lt;BaseAsset, QuoteAsset&gt;(
taker_fee_rate,
maker_rebate_rate,
tick_size,
min_size,
lot_size,
creation_fee,
ctx
);
Expand All @@ -1478,7 +1469,7 @@ Destroy the given <code>pool_owner_cap</code> object



<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool">create_pool</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, min_size: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool">create_pool</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, lot_size: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -1489,13 +1480,13 @@ Destroy the given <code>pool_owner_cap</code> object

<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool">create_pool</a>&lt;BaseAsset, QuoteAsset&gt;(
tick_size: u64,
min_size: u64,
lot_size: u64,
creation_fee: Coin&lt;SUI&gt;,
ctx: &<b>mut</b> TxContext,
) {
<a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool">create_customized_pool</a>&lt;BaseAsset, QuoteAsset&gt;(
tick_size,
min_size,
lot_size,
<a href="clob_v2.md#0xdee9_clob_v2_REFERENCE_TAKER_FEE_RATE">REFERENCE_TAKER_FEE_RATE</a>,
<a href="clob_v2.md#0xdee9_clob_v2_REFERENCE_MAKER_REBATE_RATE">REFERENCE_MAKER_REBATE_RATE</a>,
creation_fee,
Expand All @@ -1517,7 +1508,7 @@ The taker_fee_rate should be greater than or equal to the maker_rebate_rate, and
Taker_fee_rate of 0.25% should be 2_500_000 for example


<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool">create_customized_pool</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, min_size: u64, taker_fee_rate: u64, maker_rebate_rate: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool">create_customized_pool</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, lot_size: u64, taker_fee_rate: u64, maker_rebate_rate: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -1528,7 +1519,7 @@ Taker_fee_rate of 0.25% should be 2_500_000 for example

<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool">create_customized_pool</a>&lt;BaseAsset, QuoteAsset&gt;(
tick_size: u64,
min_size: u64,
lot_size: u64,
taker_fee_rate: u64,
maker_rebate_rate: u64,
creation_fee: Coin&lt;SUI&gt;,
Expand All @@ -1538,7 +1529,7 @@ Taker_fee_rate of 0.25% should be 2_500_000 for example
taker_fee_rate,
maker_rebate_rate,
tick_size,
min_size,
lot_size,
<a href="../sui-framework/coin.md#0x2_coin_into_balance">coin::into_balance</a>(creation_fee),
ctx
)
Expand All @@ -1556,7 +1547,7 @@ Taker_fee_rate of 0.25% should be 2_500_000 for example
Helper function that all the create pools now call to create pools.


<pre><code><b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool_with_return_">create_pool_with_return_</a>&lt;BaseAsset, QuoteAsset&gt;(taker_fee_rate: u64, maker_rebate_rate: u64, tick_size: u64, min_size: u64, creation_fee: <a href="../sui-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): (<a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;, <a href="clob_v2.md#0xdee9_clob_v2_PoolOwnerCap">clob_v2::PoolOwnerCap</a>)
<pre><code><b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool_with_return_">create_pool_with_return_</a>&lt;BaseAsset, QuoteAsset&gt;(taker_fee_rate: u64, maker_rebate_rate: u64, tick_size: u64, lot_size: u64, creation_fee: <a href="../sui-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): (<a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;, <a href="clob_v2.md#0xdee9_clob_v2_PoolOwnerCap">clob_v2::PoolOwnerCap</a>)
</code></pre>


Expand All @@ -1569,7 +1560,7 @@ Helper function that all the create pools now call to create pools.
taker_fee_rate: u64,
maker_rebate_rate: u64,
tick_size: u64,
min_size: u64,
lot_size: u64,
creation_fee: Balance&lt;SUI&gt;,
ctx: &<b>mut</b> TxContext,
): (<a href="clob_v2.md#0xdee9_clob_v2_Pool">Pool</a>&lt;BaseAsset, QuoteAsset&gt;, <a href="clob_v2.md#0xdee9_clob_v2_PoolOwnerCap">PoolOwnerCap</a>) {
Expand All @@ -1578,7 +1569,7 @@ Helper function that all the create pools now call to create pools.
<b>let</b> base_type_name = <a href="../move-stdlib/type_name.md#0x1_type_name_get">type_name::get</a>&lt;BaseAsset&gt;();
<b>let</b> quote_type_name = <a href="../move-stdlib/type_name.md#0x1_type_name_get">type_name::get</a>&lt;QuoteAsset&gt;();

<b>assert</b>!(clob_math::unsafe_mul(min_size, tick_size) &gt; 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidTickSizeMinSize">EInvalidTickSizeMinSize</a>);
<b>assert</b>!(clob_math::unsafe_mul(lot_size, tick_size) &gt; 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidTickSizeLotSize">EInvalidTickSizeLotSize</a>);
<b>assert</b>!(base_type_name != quote_type_name, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidPair">EInvalidPair</a>);
<b>assert</b>!(taker_fee_rate &gt;= maker_rebate_rate, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidFeeRateRebateRate">EInvalidFeeRateRebateRate</a>);

Expand All @@ -1597,7 +1588,7 @@ Helper function that all the create pools now call to create pools.
taker_fee_rate,
maker_rebate_rate,
tick_size,
lot_size: min_size,
lot_size,
});
(<a href="clob_v2.md#0xdee9_clob_v2_Pool">Pool</a>&lt;BaseAsset, QuoteAsset&gt; {
id: pool_uid,
Expand All @@ -1609,7 +1600,7 @@ Helper function that all the create pools now call to create pools.
taker_fee_rate,
maker_rebate_rate,
tick_size,
lot_size: min_size,
lot_size,
base_custodian: <a href="custodian.md#0xdee9_custodian_new">custodian::new</a>&lt;BaseAsset&gt;(ctx),
quote_custodian: <a href="custodian.md#0xdee9_custodian_new">custodian::new</a>&lt;QuoteAsset&gt;(ctx),
creation_fee,
Expand All @@ -1630,7 +1621,7 @@ Helper function that all the create pools now call to create pools.
Function for creating an external pool. This API can be used to wrap deepbook pools into other objects.


<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool_with_return">create_pool_with_return</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, min_size: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;
<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool_with_return">create_pool_with_return</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, lot_size: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;
</code></pre>


Expand All @@ -1641,13 +1632,13 @@ Function for creating an external pool. This API can be used to wrap deepbook po

<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_pool_with_return">create_pool_with_return</a>&lt;BaseAsset, QuoteAsset&gt;(
tick_size: u64,
min_size: u64,
lot_size: u64,
creation_fee: Coin&lt;SUI&gt;,
ctx: &<b>mut</b> TxContext,
): <a href="clob_v2.md#0xdee9_clob_v2_Pool">Pool</a>&lt;BaseAsset, QuoteAsset&gt; {
<a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool_with_return">create_customized_pool_with_return</a>&lt;BaseAsset, QuoteAsset&gt;(
tick_size,
min_size,
lot_size,
<a href="clob_v2.md#0xdee9_clob_v2_REFERENCE_TAKER_FEE_RATE">REFERENCE_TAKER_FEE_RATE</a>,
<a href="clob_v2.md#0xdee9_clob_v2_REFERENCE_MAKER_REBATE_RATE">REFERENCE_MAKER_REBATE_RATE</a>,
creation_fee,
Expand All @@ -1669,7 +1660,7 @@ The taker_fee_rate should be greater than or equal to the maker_rebate_rate, and
Taker_fee_rate of 0.25% should be 2_500_000 for example


<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool_with_return">create_customized_pool_with_return</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, min_size: u64, taker_fee_rate: u64, maker_rebate_rate: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;
<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool_with_return">create_customized_pool_with_return</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, lot_size: u64, taker_fee_rate: u64, maker_rebate_rate: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;
</code></pre>


Expand All @@ -1680,7 +1671,7 @@ Taker_fee_rate of 0.25% should be 2_500_000 for example

<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool_with_return">create_customized_pool_with_return</a>&lt;BaseAsset, QuoteAsset&gt;(
tick_size: u64,
min_size: u64,
lot_size: u64,
taker_fee_rate: u64,
maker_rebate_rate: u64,
creation_fee: Coin&lt;SUI&gt;,
Expand All @@ -1690,7 +1681,7 @@ Taker_fee_rate of 0.25% should be 2_500_000 for example
taker_fee_rate,
maker_rebate_rate,
tick_size,
min_size,
lot_size,
<a href="../sui-framework/coin.md#0x2_coin_into_balance">coin::into_balance</a>(creation_fee),
ctx
);
Expand All @@ -1712,7 +1703,7 @@ If a user wants to create a pool and then destroy/lock the pool_owner_cap one ca
so with this function.


<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool_v2">create_customized_pool_v2</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, min_size: u64, taker_fee_rate: u64, maker_rebate_rate: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): (<a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;, <a href="clob_v2.md#0xdee9_clob_v2_PoolOwnerCap">clob_v2::PoolOwnerCap</a>)
<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool_v2">create_customized_pool_v2</a>&lt;BaseAsset, QuoteAsset&gt;(tick_size: u64, lot_size: u64, taker_fee_rate: u64, maker_rebate_rate: u64, creation_fee: <a href="../sui-framework/coin.md#0x2_coin_Coin">coin::Coin</a>&lt;<a href="../sui-framework/sui.md#0x2_sui_SUI">sui::SUI</a>&gt;, ctx: &<b>mut</b> <a href="../sui-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): (<a href="clob_v2.md#0xdee9_clob_v2_Pool">clob_v2::Pool</a>&lt;BaseAsset, QuoteAsset&gt;, <a href="clob_v2.md#0xdee9_clob_v2_PoolOwnerCap">clob_v2::PoolOwnerCap</a>)
</code></pre>


Expand All @@ -1723,7 +1714,7 @@ so with this function.

<pre><code><b>public</b> <b>fun</b> <a href="clob_v2.md#0xdee9_clob_v2_create_customized_pool_v2">create_customized_pool_v2</a>&lt;BaseAsset, QuoteAsset&gt;(
tick_size: u64,
min_size: u64,
lot_size: u64,
taker_fee_rate: u64,
maker_rebate_rate: u64,
creation_fee: Coin&lt;SUI&gt;,
Expand All @@ -1733,7 +1724,7 @@ so with this function.
taker_fee_rate,
maker_rebate_rate,
tick_size,
min_size,
lot_size,
<a href="../sui-framework/coin.md#0x2_coin_into_balance">coin::into_balance</a>(creation_fee),
ctx
)
Expand Down Expand Up @@ -2178,8 +2169,8 @@ so with this function.
filled_quote_quantity_without_commission,
maker_order.price
);
<b>let</b> filled_base_lot = filled_base_quantity / <a href="clob_v2.md#0xdee9_clob_v2_LOT_SIZE">LOT_SIZE</a>;
filled_base_quantity = filled_base_lot * <a href="clob_v2.md#0xdee9_clob_v2_LOT_SIZE">LOT_SIZE</a>;
<b>let</b> filled_base_lot = filled_base_quantity / pool.lot_size;
filled_base_quantity = filled_base_lot * pool.lot_size;
// filled_quote_quantity_without_commission = 0 is permitted here since filled_base_quantity could be 0
filled_quote_quantity_without_commission = clob_math::unsafe_mul(
filled_base_quantity,
Expand Down Expand Up @@ -2802,8 +2793,7 @@ Place a market order to the order book.
// We start <b>with</b> the bid PriceLevel <b>with</b> the highest price by calling max_leaf on the bids Critbit Tree.
// The inner <b>loop</b> for iterating over the open orders in ascending orders of order id is the same <b>as</b> above.
// Then iterate over the price levels in descending order until the market order is completely filled.
<b>let</b> min_size = pool.lot_size;
<b>assert</b>!(quantity &gt;= min_size && quantity % <a href="clob_v2.md#0xdee9_clob_v2_LOT_SIZE">LOT_SIZE</a> == 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidQuantity">EInvalidQuantity</a>);
<b>assert</b>!(quantity % pool.lot_size == 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidQuantity">EInvalidQuantity</a>);
<b>assert</b>!(quantity != 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidQuantity">EInvalidQuantity</a>);
<b>let</b> metadata;
<b>if</b> (is_bid) {
Expand Down Expand Up @@ -3094,8 +3084,7 @@ So please check that boolean value first before using the order id.
<b>assert</b>!(quantity &gt; 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidQuantity">EInvalidQuantity</a>);
<b>assert</b>!(price &gt; 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidPrice">EInvalidPrice</a>);
<b>assert</b>!(price % pool.tick_size == 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidPrice">EInvalidPrice</a>);
<b>let</b> min_size = pool.lot_size;
<b>assert</b>!(quantity &gt;= min_size && quantity % <a href="clob_v2.md#0xdee9_clob_v2_LOT_SIZE">LOT_SIZE</a> == 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidQuantity">EInvalidQuantity</a>);
<b>assert</b>!(quantity % pool.lot_size == 0, <a href="clob_v2.md#0xdee9_clob_v2_EInvalidQuantity">EInvalidQuantity</a>);
<b>assert</b>!(expire_timestamp &gt; <a href="../sui-framework/clock.md#0x2_clock_timestamp_ms">clock::timestamp_ms</a>(<a href="../sui-framework/clock.md#0x2_clock">clock</a>), <a href="clob_v2.md#0xdee9_clob_v2_EInvalidExpireTimestamp">EInvalidExpireTimestamp</a>);
<b>let</b> owner = account_owner(account_cap);
<b>let</b> original_quantity = quantity;
Expand Down
Loading

0 comments on commit 7045505

Please sign in to comment.