Drift Protocol v2

โŒ˜K
๐Ÿ‘พWelcome to Drift Protocol
๐ŸงฎDrift DEX
๐Ÿ‘‹Getting Started
๐Ÿ“ˆPerpetual Futures
๐Ÿ“ŠSpot Margin Trading
๐ŸฆBorrow & Lend
๐Ÿ›๏ธStaking
๐Ÿ”ฌTechnical Explanations
๐Ÿ“Accounting and Settlement
โž—Borrow Interest Rate
๐Ÿ“œDelisting Process
โ›ฒDrift AMM
๐ŸƒJust-In-Time (JIT) Auctions
๐Ÿ“šKeepers & Decentralised Orderbook
โ˜ ๏ธLiquidators
๐Ÿ’งLiquidity Providers (LPs)
๐Ÿ“‹Protocol Guard Rails
๐Ÿ“Risks
๐Ÿ–ฅ๏ธDeveloper Resources
๐Ÿ“”Overview
โŒจ๏ธSDK Documentation
โŒจ๏ธTutorial: Bots
โš ๏ธTroubleshooting
๐Ÿ› ๏ธKeeper Bots
๐Ÿ› ๏ธTrading Bots
โŒจ๏ธHistorical Data (v1)
โŒจ๏ธAPI
๐Ÿ›ก๏ธSecurity
๐Ÿ›ก๏ธAudits
๐Ÿ›ก๏ธBug Bounty
โš–๏ธLegal and Regulations
๐Ÿ“Terms of Use
๐Ÿ“Disclaimer
๐Ÿ“Privacy Policy
๐Ÿ“Competition Terms and Conditions
๐Ÿ“šGlossary
Docs powered byย archbeeย 
13min

Just-In-Time (JIT) Auctions

Introduction

The JIT Auction is a supplementary liquidity mechanism that allows Market Makers (MM) to provide 'Just-in-Time' liquidity.

When a user (Taker) submits a market order, this automatically triggers an individualized Dutch Auction with specific start price, end price, and duration. The auction forces MMs to compete in order to fulfill the user at a price better than or equal to the current auction price. If no MM steps in after the initial window (~5 seconds), the user can be fulfilled on Drift's AMM.

Auction Price Bands

To maximise on-chain compute efficiency for Makers, the start and end prices within of the auction are by default determined based on the oracle price and Drift AMM prices. Like in a regular Dutch auction, the price goes from best to worst (for the Taker, and thus worst to best for the Maker).

This process can be envisioned as a 'price band'; where the upper end of the price band is the worst price the Taker is willing to pay. At the start of the JIT auction (t=0), the price the MM can fill the user at, is the price that is furthest away from the maximum price. The price approaches the maximum price as the auction approaches finality (t=5).

Document image

The Auction Lifecycle

  1. User submits a market taker order.
  2. The taker order is broadcasted to Drift's Keeper Network, which keeps track of all user orders.
  3. The taker order first routes through a Just-In-Time auction where market makers (MMs) can participate in a high frequency Dutch auction to fill a userโ€™s orders.
  4. The JIT prices typically begin at the oracle price. Makers can bid to fill the desired position.
  5. Should there be no Makers participating in the JIT auction, or should there be any remaining size on the order, the order will be routed through to Driftโ€™s AMM, as an additional source of virtual liquidity.

How is the Auction Priced?

For a market buy order:

  • The auction by default start at the oracle price.
  • The auction by default end at the AMM's ask price

For a market sell order:

  • The auction will start at the oracle price.
  • The auction will end at the AMM's bid price.

๏ปฟ

Auction Start Price
Auction Current Price
Auction Ending Price
|

How does this differ from a RFQ System?

Unlike an RFQ system where the Maker has to submit their own prices, the auction prices are already pre-determined based on Driftโ€™s AMM curves based on Drift's inventory-adjusted spreads as mentioned in Drift AMM.

The price of the auction is on-chain and deterministic based on the time of the auction, while in an RFQ, the Maker can submit their own price at any point. As the 5-second auction goes on, the price becomes worse for the Takers and better for the Makers. As a result, Makers need to be as competitive as possible to provide price improvements to traders.

In an RFQ system, the user would receive quotes from Makers that they would have to choose to take or not, but in a JIT auction, the prices would already be predetermined by Driftโ€™s bid/ask curve, and would give the user price improvement over Driftโ€™s AMM price.

Updated 02 Nov 2022
Did this page help you?
Yes
No
UP NEXT
Just-In-Time Auction FAQ
Docs powered byย archbeeย 
TABLE OF CONTENTS
Introduction
Auction Price Bands
The Auction Lifecycle
How is the Auction Priced?
How does this differ from a RFQ System?