Just-In-Time (JIT) Auctions
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 a specific start price, end price, and duration. The auction forces MMs to compete in order to fulfil 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.
To maximise on-chain compute efficiency for Makers, the start and end prices within 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).
- User submits a market taker order.
- The taker order is broadcasted to Drift's Keeper Network, which keeps track of all user orders.
- 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.
- The JIT prices typically begin at the oracle price. Makers can bid to fill the desired position.
- 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.
For a market buy order:
- The auction by default starts at the oracle price.
- The auction by default ends 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.
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.