🏎 About Drift v2
Just-in-Time (JIT) Auctions FAQ

Just-in-Time (JIT) Auctions FAQ

What are liquidity sources Drift use?

  • JIT makers: Encapsulates filler/maker order into one, but requires high-frequency trading infrastructure.
  • Resting orderbook maker: You can define as absolute price or from oracle offset. Orders can be placed and canceled dynamically, or set once and left in the orderbook. The work of order management is then deferred to active keepers.
  • AMM(LP vs. protocol-owned split). Increased assurance of backstop indiscriminate liquidity per market, ultimately covered by the revenue pool/insurance in cases of failure.

Learn more about the "Life of an Order" (opens in a new tab) on Drift. See ongoing discussions (opens in a new tab) about liquidity incentives.

JIT Links

JIT Proxy Address: J1TnP8zvVxbtF5KFp5xRmWuvG9McnhzmBd9XGfCyuxFP

Benefits

What are the benefits for Takers?

For Takers, the main benefit of the JIT auction is that liquidity can be much deeper compared to an AMM. Liquidity on the JIT isn't constrained by how much virtual liquidity is available for a user; it is determined by the liquidity provided by external Makers in each auction. Users have the opportunity for much better price improvement compared to a liquidity-constrained AMM.

What are the benefits for Makers?

For Makers, the JIT auction provides an easy way to access on-chain taker flow for market making operations. Unlike an on-chain CLOB where the set-up cost, ongoing infrastructural costs, and the possibility for latency arbitrage are high, market making on the JIT is a simple, competitive auction fill mechanism, reducing the barrier for entry for making on-chain.

Makers will also earn a rebate for filling taker orders.

For Takers

How many auctions can there be at once?

The auction mechanism is highly parallelized for maximum exchange throughput.

  • Takers can initiate multiple auctions, up to the number of order slots (currently 32).

  • Makers can participate in as many auctions as they like (since their order is completed atomically).

  • Additionally, on a per-exchange level, there is no limit to the total amount of ongoing auctions happening at once.

Can auctions be partially filled?

Yes, auctions can be partially filled up to a user's slippage tolerance. There are no Fill-or-Kill (FOK) auctions.

Can auctions be cancelled once initiated?

Yes, users can cancel the unfilled portion of their order in the auction once they've been initiated. Users will need to pay a network fee in SOL to cancel their ongoing auction, as well as a nominal fee to keepers of $0.01 USDC.

Can Makers pull out of an auction once they have filled on the auction?

Once an order is partially filled, Makers are unable able to pull out of an auction. Fills are confirmed when the Maker submits a fill on a first-come-first-serve basis.

Is there a limit to how many auctions a Maker can participate in at once?

No, there is no limit. Makers can enter multiple auctions at once to cancel out their exposure.

Is there a way for users to enter market orders without entering the auction?

Not at the moment. Market orders all go through the JIT auction. Users can opt to place a limit order instead if the user wishes to be matched with another order via the DLOB.

Do limit orders trigger an auction?

No, limit orders are not filled via the JIT auction. Limit orders specify a single price point and will be matched against other limit orders or the AMM on the decentralised limit orderbook (DLOB).

Are there individual JIT pools for each Taker order placed?

Yes. Each user will have a different account and each taker order placed will go through its own JIT auction.

Will I know the exact price I'll be filled at?

Exclusive of slippage and fees, the UI will display the price that the Taker will be filled at if they were to be filled against the AMM. This is the worst possible price the Taker can receive. Any Maker that steps in via the JIT auction can only provide the Taker with a better price.


Why does my market order use JIT when higher buys are on the book?

A: Market orders trigger JIT auctions, not the order book. JIT uses current market price, not limit prices you see. Consider limit orders for specific price control.

Do Taker IOC (immediate or cancel) orders trigger JIT auctions?

No, Taker IOC orders do not trigger JIT auctions. Only market orders and limit orders that cross the current market price initiate JIT auctions.


For Makers

How do I participate as a Maker in the auction?

You can read docs here (Just-In-Time (JIT) Auctions) as well as read through an example trading bot ().

Is the same JIT auction mechanism used for liquidations as well?

Yes, it is the same model. Liquidations will be market orders that will also route through the JIT auction mechanism.

Are there example maker bots?

Yes. We've developed an open-source maker bot that can be accessed here.

How will Makers be notified of JIT auctions?

We built an event emitter on Solana. Makers can listen to the event emitter for whenever there's a taker order. Makers can then bid to fill the order.

Will I see what my maker bid is relative to all the other maker bids?

Yes.

Does the JIT auction happen in a set of rounds?

Each new Taker order commences a new dutch auction. Dutch auctions are on a first-come-first-serve basis.

Can I fill a subset of one order?

Yes. Makers can fill a subset of Taker orders. The remainder will either be filled by other Makers or be filled by the AMM.

How does the DLOB work in conjunction with JIT liquidity?

DLOB liquidity and JIT liquidity aren't mutually exclusive. The DLOB setup is designed with two separate actors: fillers and makers. Makers post orders and fillers will match orders.

JIT mechanism enables the Maker to be their own filler. The Maker will submit the match with someone going through an auction (e.g. user who submitted a market order).

Do JIT makers use the DLOB?

No, JIT has separate auctions. JIT makers focus on filling their own orders through auctions, not matching existing orders on the DLOB. Advantage is that JIT makers don't need to constantly monitor and update the entire DLOB, limitation is JIT makers only consider their own orders, potentially missing better fills available on the DLOB. Drift is exploring ways to incentivize "keepers" to prioritize matching resting orders on the DLOB when they offer better prices compared to JIT auctions.

I got "TakerOrderNotFound" or "AskNotCrossed" errors. What do they mean?

  • 'TakerOrderNotFound': the auction order you tried to take was either already filled by another user or removed due to slowness in your request.
  • 'AskNotCrossed': the auction order's price doesn't reach your minimum selling price specified in the JIT parameters.

It's common practice to simulate transactions before submitting them, but this can carry a higher risk of being too slow to compete in real-time situations.

Why do some transactions appear on Drift but not on-chain?

This might be a temporary display issue related to Solana forks. Transactions shown on Drift might be unconfirmed or failed due to these forks, even though they appear successful initially. Refreshing the page usually resolves the issue.

Does Drift have stats on market orders? Is there any option to track the history of any specific JIT auction?

Yes, you can access data on hourly, daily usage, and placeAndMake by market here: Dune Dashboard (opens in a new tab).

I'm not getting any orders filled. What can I do to get more fills?

The solution is two-fold:

  • Auctions need to be properly configured considering the current JIT supply. This is an ongoing challenge, as calibration can be difficult. Auctions that are too passive or slow can be frustrating for users. Fortunately, end users can configure some auction parameters within their UI settings under "Trader Profile."
  • JITs need the best possible "sniping" capabilities to ensure transactions land in the desired time slot. This makes RPC infrastructure an essential factor.

I saw an auction message with a negative "slots_left" value after the supposed duration. Is this a bug?

No, this indicates a limit order auction that has concluded. Limit order auctions have a predefined duration, and the negative `slots_left value signifies the auction has surpassed its intended timeframe.

I'm encountering errors that say "cannot read .data and .DataAndSlot" when I try to run my bot. How can I fix this?

These errors (cannot read .data or .dataAndSlot) typically occur when the free RPC keys run out of credits or reach their limits. This happens because maker/keeper bot functions require a lot of RPC calls. To address this, consider using a paid RPC service or setting up a custom node.