Try Drift Now

Today, we’re thrilled to announce that Drift v2 will be launching with a novel hybrid liquidity mechanism, the Liquidity Trifecta.

Our goal is simple: to provide the best liquidity possible for traders.

Liquidity Trifecta


The motivation behind building a multi-faceted liquidity mechanism is to enable users to trade on-chain without the existing limitations of liquidity on DEXs.

One of DeFi’s key pain points is high slippage for trades – particularly on derivatives DEXs.

Currently, there are two dominant models that facilitate on-chain swaps and they both suffer from the same issue. Existing liquidity models like AMMs are constrained by the total amount of passive capital staked into pools. On the other hand, on-chain orderbooks come with high computational costs that reduce incentives for market makers and restrict organic price discovery.

As a result, the experience of trading on-chain is reduced to one where high slippage costs are almost guaranteed when trading with size.

This is where Drift v2 comes in. Building a liquidity trifecta composed of several liquidity mechanisms (AMM, orderbook and auction) enables a flourishing ecosystem of makers competing to provide the best prices for retail traders.

Drift’s Liquidity Trifecta is composed of the following three mechanisms:

  • Just-in-Time Auction Liquidity;
  • AMM Liquidity; and
  • Orderbook Liquidity.

The Just-In-Time mechanism is the first piece in our puzzle – by having market makers on standby, it enables orders of any size to be filled with minimal slippage. Our AMM is the second piece as it provides backstop liquidity for traders even if no market makers step in. And finally, our orderbook enables resting limit orders to be filled against both the JIT and other limit orders.

1. Just-in-Time Liquidity

On Drift, spot and perpetual market/limit orders are routed through the Just-in-Time Liquidity mechanism – a 5sec Dutch auction.

During this period, market makers compete to submit quotes to the user within 5 seconds.

In this sense — market makers are providing “Just-in-Time Liquidity” as the liquidity is provided just as orders are submitted. Market makers need to be as competitive as possible in order to fill orders, bringing about price improvements for users.

As is the case in a regular Dutch auction, the price at which the order can be filled goes from the best to the worst (for the user). The auction starts at oracle price, giving users the opportunity to be filled with zero slippage.

This is distinctive from an RFQ system where market makers submit their own independent prices to users.

The prices quoted by Drift are on-chain, deterministic and based on time, while market makers in an RFQ system operate off-chain and can submit their price quotes at any point.

As a result, market makers compete in a system that turns front-running on its head to provide the best price for retail users.

2. AMM Liquidity

What happens if no market maker steps in via the Just-in-Time auction?

Drift's AMM is the backstop liquidity provider for all takers, regardless of maker participation.

In this sense, Drift’s AMM provides a source of constant liquidity for all users to take from.

  • Liquidity is provided if market orders aren't filled (partially or completely)
  • Liquidity is provided if limit orders reach a trigger price that can be filled


The AMM is considered constant as liquidity is available based on a constant product formula (x*y=k).

In addition, the AMM features an inbuilt bid-ask spread that adjusts based on its inventory held.

Consequently, even without external makers, Drift can launch new markets without needing market makers to bootstrap liquidity.

All the AMM needs is a reliable oracle of the perpetual market's spot reference asset in order to facilitate an exchange of liquidity.

For example: Drift's SOL-PERP market would refer to a SOL/USD spot oracle.

Drift is currently partnered with Pyth to provide institutional-grade price streams.

3. Orderbook Liquidity

Drift’s decentralised orderbook acts as our third source of liquidity.

When on-chain limit orders are placed, a network of keeper bots sorts them into an off-chain orderbook and categorises them from oldest to newest (if two orders have the same age, they’re then sorted by largest to smallest).

Each keeper bot maintains a local copy of Drift’s orderbook and each keeper executes logic for matching orders together locally.

As soon as the trigger condition of a limit order is met, a keeper bot fills it against our AMM.

If the conditions are the same, keeper bots will also match user positions with resting limit orders.

Keeper bots are incentivised to fill the oldest and largest orders first. For their work, they are paid a portion of the trading fee paid by users.

As such, our decentralised orderbook provides a source of ‘resting’ liquidity, which rests in the orderbook until taken by users or filled against the AMM when the requisite market conditions are met.

Concluding Thoughts

Our new hybrid liquidity mechanisms are a DeFi first primitive.

By provisioning three types of liquidity: just-in-time liquidity, via our JIT auction; constant liquidity, via our AMM; and resting liquidity, via our decentralised orderbook; Drift v2 enables the exchange of on-chain liquidity with size.

In the weeks to come, we will be releasing deep dives into each of these liquidity mechanisms.

Drift v2 will be launching soon.

Get In Touch!

🌐 Visit us at drift.trade 🌐
📩 Email us at hello@drift.trade 📩
💬 Connect with us on Discord 💬
👾 Find us on Twitter — @DriftProtocol 👾

Try Drift Now
Try Drift Now