Solana IDL reference › Drift V2 › State
Drift V2 account type. Program ID dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH. Data starts with the 8-byte account discriminator, computed with the standard Anchor rule: first 8 bytes of sha256("account:State").
Discriminator (computed with the standard Anchor rule: first 8 bytes of sha256("account:State"))
hex 0xd8926b5e684bb6b1
bytes [216, 146, 107, 94, 104, 75, 182, 177]
base58 dE27dVH2wR2
| Field | Type | Offset | Size |
|---|---|---|---|
| admin | pubkey | 8 | 32 |
| whitelistMint | pubkey | 40 | 32 |
| discountMint | pubkey | 72 | 32 |
| signer | pubkey | 104 | 32 |
| srmVault | pubkey | 136 | 32 |
| perpFeeStructure | FeeStructure | 168 | 360 |
| feeTiers | [FeeTier; 10] | 168 | 320 |
| fillerRewardStructure | OrderFillerRewardStructure | 488 | 24 |
| rewardNumerator | u32 | 488 | 4 |
| rewardDenominator | u32 | 492 | 4 |
| timeBasedRewardLowerBound | u128 | 496 | 16 |
| referrerRewardEpochUpperBound | u64 | 512 | 8 |
| flatFillerFee | u64 | 520 | 8 |
| spotFeeStructure | FeeStructure | 528 | 360 |
| feeTiers | [FeeTier; 10] | 528 | 320 |
| fillerRewardStructure | OrderFillerRewardStructure | 848 | 24 |
| rewardNumerator | u32 | 848 | 4 |
| rewardDenominator | u32 | 852 | 4 |
| timeBasedRewardLowerBound | u128 | 856 | 16 |
| referrerRewardEpochUpperBound | u64 | 872 | 8 |
| flatFillerFee | u64 | 880 | 8 |
| oracleGuardRails | OracleGuardRails | 888 | 48 |
| priceDivergence | PriceDivergenceGuardRails | 888 | 16 |
| markOraclePercentDivergence | u64 | 888 | 8 |
| oracleTwap5minPercentDivergence | u64 | 896 | 8 |
| validity | ValidityGuardRails | 904 | 32 |
| slotsBeforeStaleForAmm | i64 | 904 | 8 |
| slotsBeforeStaleForMargin | i64 | 912 | 8 |
| confidenceIntervalMaxSize | u64 | 920 | 8 |
| tooVolatileRatio | i64 | 928 | 8 |
| numberOfAuthorities | u64 | 936 | 8 |
| numberOfSubAccounts | u64 | 944 | 8 |
| lpCooldownTime | u64 | 952 | 8 |
| liquidationMarginBufferRatio | u32 | 960 | 4 |
| settlementDuration | u16 | 964 | 2 |
| numberOfMarkets | u16 | 966 | 2 |
| numberOfSpotMarkets | u16 | 968 | 2 |
| signerNonce | u8 | 970 | 1 |
| minPerpAuctionDuration | u8 | 971 | 1 |
| defaultMarketOrderTimeInForce | u8 | 972 | 1 |
| defaultSpotAuctionDuration | u8 | 973 | 1 |
| exchangeStatus | u8 | 974 | 1 |
| liquidationDuration | u8 | 975 | 1 |
| initialPctToLiquidate | u16 | 976 | 2 |
| maxNumberOfSubAccounts | u16 | 978 | 2 |
| maxInitializeUserFee | u16 | 980 | 2 |
| featureBitFlags | u8 | 982 | 1 |
| lpPoolFeatureBitFlags | u8 | 983 | 1 |
| padding | [u8; 8] | 984 | 8 |
Every State account starts with the same discriminator, so a memcmp at offset 0 selects this account type. The second filter matches admin at offset 8. A dataSize: 992 filter would also work only while live accounts still have the snapshot size; programs often add fields in upgrades, so it is left out here. getProgramAccounts on a large program is heavy; many RPC providers limit or disable it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH",
{
"encoding": "base64",
"filters": [
{
"memcmp": {
"offset": 0,
"bytes": "dE27dVH2wR2"
}
},
{
"memcmp": {
"offset": 8,
"bytes": "<admin as base58>"
}
}
]
}
]
}
Decoding runs on Rugsight's server against the bundled snapshot. Nothing is fetched from the chain. Paste public account data only; never paste a private key or seed phrase.
Drift V2 instructions · Explain a transaction
Data: solana-idls@1.2.1 (MIT, © Obsidian Protocol) and SPL Token / Token-2022 state layouts (Apache-2.0), snapshot 2026-11-17. Programs can upgrade and an IDL snapshot can lag the deployed program, so check important offsets against current account data.