Account Structure
The State account is defined inprograms/drift/src/state/state.rs.
Key Fields
Pubkey
Protocol admin public key
ExchangeStatus
Global exchange status (active, paused, etc.)
OracleGuardRails
Oracle validation parameters
u64
Number of users with accounts
u64
Total number of sub-accounts
FeeStructure
Perpetual market fee configuration
FeeStructure
Spot market fee configuration
u32
Maximum fee for initializing a user account
Fee Structure
Access via SDK
DriftClient API
Access state via SDK
Program Architecture
Architecture overview