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ย 
7min

Decentralised Orderbook FAQ

Is this the same as a traditional orderbook? How are the limit orders filled?

Drift's decentralised orderbook is different to a traditional orderbook.

Limit orders placed on Drift's decentralised orderbook are filled either:

  • against each other (buys and sells at the same price); or
  • against the DAMM if the trigger conditions are met.

The orders are stored and settled on-chain. The queue is constructed by a network of off-chain Keepers that are incentivised to fill orders against the DAMM or each other based on the age.

Is the Keeper network guaranteed to execute my order?

Orders are executed 'best-effort' by the network and are powered by special economic incentives designed to mimic the typical execution order seen in a Centralised Limit Order Book (CLOB).

How is an orderbook constructed off-chain?

When a user submits a limit order, it is submitted onto the Solana blockchain. This is known as an on-chain order.

Keeper Bots monitor all open limit orders placed on-chain. Similar to the way liquidator bots track all user positions to monitor liquidiation eligibility; Keeper Bots monitor eligibility of limit orders to be filled.

To accomplish this, Keeper Bots construct an orderbook structure off-chain categorising all the open limit orders by price, age, and then position size. Once the particular requisite trigger condition is met, the Keeper Bot will fill the oldest valid order against the DAMM for a financial incentive. If two orders have the same age, the Keeper Bot will most likely fulfill the order that is larger in size (up to the incentive cap).

Why is the orderbook constructed off-chain?

Drift doesn't construct a central limit orderbook on-chain and instead opts for a flat structure to achieve cost effective scalability.

The network of Keepers monitor on-chain orders and constructs their own orderbooks off-chain.

This achieves (1) decentralisation (as each Keeper stores its own copy of the orderbook); and (2) computational efficiency (as the high throughput and intensive computations are calculated off-chain).

This should translate to better performance during periods of high network congestions.

What are Keeper bots? How can I participate?

A Keeper will track and fill orders and earn a reward. Guide to run is listed in ๏ปฟ๏ปฟTutorial: Keeper Bots. Incentive structures are listed in Decentralised Orderbook๏ปฟ๏ปฟ.

Updated 13 Oct 2022
Did this page help you?
Yes
No
UP NEXT
Liquidators
Docs powered byย archbeeย 
TABLE OF CONTENTS
Is this the same as a traditional orderbook? How are the limit orders filled?
Is the Keeper network guaranteed to execute my order?
How is an orderbook constructed off-chain?
Why is the orderbook constructed off-chain?
What are Keeper bots? How can I participate?