Drift Protocol

in solana •  2 years ago 

At the application level, Drift Protocol is a decentralized exchange that supports low slippage, low fees, and minimal price impact on all trades. Drift offers four primary products:

  • Spot Trading
  • Perpetuals Trading
  • Borrow & Lend - What is Borrow & Lend?
  • Passive Liquidity Provision - Liquidity Provision

The Problem

On-chain exchanges suffer from limitations associated with blockchains. Namely, speed and limited computational capacity on-chain.

Porting over existing off-chain centralised exchange infrastructure onto the blockchain results in an inefficient use of blockchains and disincentivises market-maker participation with unfavourable conditions.

As a result, most onchain orderbooks suffer from:

  • slow fills
  • high spreads
  • low liquidity

Drift Protocols Solution

Drift has designed & developed an exchange that is robust, computationally efficient, and incentivises market maker participation, as well as liquidity provision.

Trades on Drift are supported by three liquidity mechanisms:

  • Just-in-Time (JIT) Auction Liquidity: provided by market makers prior to each transaction;
  • Limit Orderbook Liquidity: provided by decentralised orderbook (DLOB) made up of limit orders placed by takers that can be filled by makers; and
  • AMM Liquidity: provided by Drift's AMM  if no makers step in to provide liquidity.

Just-in-Time Liquidity

All trades (spot and perpetual) that are placed on Drift are routed through a 5-second auction. During this period, market-makers can bid to fill the order at a better price than what the user would otherwise be filled at.

In this sense, market makers are providing 'Just-in-Time Liquidity' as the liquidity is provided just as the order is submitted.

Auctions are run via a Dutch Auction (where the price starts at the best price and moves towards the worst price) and market makers compete amongst themselves to fill user orders.

Constant Liquidity

Drift's AMM (DAMM) is the backstop liquidity provider for trades on the exchange if 1) market orders aren't filled by the JIT and 2) limit orders hit a trigger price that can be filled by the AMM.

The AMM provides a source of constant liquidity for all traders to take from. The AMM is considered constant as liquidity is available based on a constant product formula (x*y=k) balancing the reserves. Drift's AMM features an inbuilt bid-ask spread that adjusts based on inventory held by the AMM.

This also means that, even without external makers, Drift can launch new markets without needing market makers to bootstrap liquidity. All the DAMM needs is a reliable oracle of the perpetual market's spot reference asset. For instance, Drift's SOL-PERP market would refer to a SOL/USD spot oracle for a spot reference. Drift currently uses Pyth for its oracles.

Limit Orderbook Liquidity

Drift's decentralised orderbook acts as its third source of liquidity.
Users can place orders on app.drift.trade

Limit orders are orders that trigger and execute on a particular condition.

Limit orders are placed by users on-chain. A network of Keeper Bots then sort the on-chain limit orders into an off-chain orderbook and categorise limit orders from oldest to newest, and largest to smallest.

Each Keeper maintains its own orderbook (hence the 'decentralised' aspect) and listens to the market conditions. If the trigger condition of a limit order is met, the Keeper will submit the limit order and fill it against the DAMM. Keepers will also match taker orders with resting limit orders if the conditions are the same.

Keepers are incentivised and will fill the oldest and largest order first. For their work, they are paid a portion of the transaction fee.

The decentralised orderbook acts as a source of 'resting' liquidity as it rests on the orderbook until either a taker takes it, or the requisite market conditions are met and it's filled against the DAMM.

It is not far away to trade thorugh reliable, stable and fast full-on-blockchain derivatives protocols and exchages.
You know the power of this full on-chain exchange when the time come to you.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!