2026-03-16 01:09:32 +03:00

31 lines
973 B
Plaintext

# Understanding Drift's Onchain Model
These pages explain how Drift's Solana program works at the account level. Understanding these concepts helps you build better integrations, debug issues, and optimize performance.
### Program Structure
**Deep dive into positions, orders, and calculations**
Understand the mechanics of trading:
- How positions are tracked and updated
- Order lifecycle and execution
- Collateral and margin calculations
- Cross-margin accounting
<Cards.Card
title="Understand how trading actually works onchain ↗"
href="/developers/concepts/program-structure"
/>
### Account Model
**High-level overview of Drift's account architecture**
Learn about the different account types that make up the protocol:
- State account (global config)
- Market accounts (perp & spot)
- User accounts & stats
- PDAs and account relationships
<Cards.Card
title="Understand what accounts exist and their purpose ↗"
href="/developers/concepts/account-model"
/>