Skip to content

Commit

Permalink
deploy: b1e815a
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Jan 19, 2024
1 parent 8d817da commit 2f3ee17
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@
<li>
<a href="#order-params" class="toc-h2 toc-link" data-title="Order Params">Order Params</a>
</li>
<li>
<a href="#post-only-params" class="toc-h2 toc-link" data-title="Post Only Params">Post Only Params</a>
</li>
<li>
<a href="#placing-perp-order" class="toc-h2 toc-link" data-title="Placing Perp Order">Placing Perp Order</a>
</li>
Expand Down Expand Up @@ -1146,8 +1149,8 @@ <h2 id='order-params'>Order Params</h2>
<tr>
<td>postOnly</td>
<td>If the order can only be a maker</td>
<td>Yes</td>
<td>false</td>
<td>PostOnlyParam</td>
<td>None</td>
</tr>
<tr>
<td>triggerPrice</td>
Expand Down Expand Up @@ -1192,6 +1195,35 @@ <h2 id='order-params'>Order Params</h2>
<td></td>
</tr>
</tbody></table>
<h2 id='post-only-params'>Post Only Params</h2>
<p>Drift orderbook is not a strict clob that enforces price-time priority. This is to maximize the parallelization of placing orders to
take advantage of the solana runtime. To force an order to always be a maker, users most set the post only params. If a user order is set to post only,
drift will check that an order does not cross the vamm spread, similar to how a traditional clob would check that an order doesn&#39;t cross the book&#39;s best bid/ask.
If the post only is not used, a limit order can end up being a taker or maker.</p>

<table><thead>
<tr>
<th>Parameter</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>None</td>
<td>Does not enforce being maker</td>
</tr>
<tr>
<td>MustPostOnly</td>
<td>Tx fails if order crosses the vamm</td>
</tr>
<tr>
<td>TryPostOnly</td>
<td>Order is skipped (not placed) and tx succeeds if order crosses the vamm</td>
</tr>
<tr>
<td>Slide</td>
<td>Order price is modified to be one tick below/above the vamm ask/bid</td>
</tr>
</tbody></table>
<h2 id='placing-perp-order'>Placing Perp Order</h2><div class="highlight"><pre class="highlight typescript tab-typescript"><code>
<span class="c1">// market buy for 100 SOL-PERP @ $21.20-&gt;$21.30 over 60 slots (~30 seconds)</span>
<span class="c1">// after 60 slots, market buy 100 SOL-PERP @ $21.35 until maxTs</span>
Expand Down

0 comments on commit 2f3ee17

Please sign in to comment.