Skip to Content
DevelopersConceptsArchitecture

Architecture

This section explains how Drift works under the hood, from Solana program internals to SDK architecture and core trading mechanisms.

Why understand the architecture?

Whether you’re building integrations, running high-performance bots, or contributing to the protocol, understanding Drift’s architecture helps you:

  • Build better integrations - know which data sources to use and how they relate
  • Optimize performance - understand subscription patterns, account dependencies, and transaction construction
  • Debug effectively - trace issues from SDK calls through to onchain state changes
  • Contribute confidently - understand the system well enough to propose improvements

Architecture Overview

Drift’s architecture spans three layers:

Protocol Layer - Solana program accounts and onchain logic. See Concepts for program structure and account models.

SDK Layer - Client libraries for interacting with the protocol. See SDK Internals for subscription patterns and transaction construction.

Trading Layer - Orderbook, auctions, and matching engine. See Market Makers for DLOB, JIT, and liquidity mechanisms.

Topics

Protocol Concepts

SDK Architecture

Trading Mechanisms

Last updated on