Solana error codes › Drift V2

Drift V2 error codes

344 error codes defined by Drift V2 (program ID dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH). In logs they appear as custom program error: 0x… after Program dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH failed.

Custom errors start at 6000 (0x1770). If a code is below 6000 and not listed here, see the Anchor framework errors.

HexCodeError
0x17706000InvalidSpotMarketAuthority
Invalid Spot Market Authority
0x17716001InvalidInsuranceFundAuthority
Clearing house not insurance fund authority
0x17726002InsufficientDeposit
Insufficient deposit
0x17736003InsufficientCollateral
Insufficient collateral
0x17746004SufficientCollateral
Sufficient collateral
0x17756005MaxNumberOfPositions
Max number of positions taken
0x17766006AdminControlsPricesDisabled
Admin Controls Prices Disabled
The name points to a feature or pool state that currently blocks this action.
0x17776007MarketDelisted
Market Delisted
0x17786008MarketIndexAlreadyInitialized
Market Index Already Initialized
The name points to account state: an account was expected to exist (or not exist) already.
0x17796009UserAccountAndUserPositionsAccountMismatch
User Account And User Positions Account Mismatch
0x177a6010UserHasNoPositionInMarket
User Has No Position In Market
0x177b6011InvalidInitialPeg
Invalid Initial Peg
0x177c6012InvalidRepegRedundant
AMM repeg already configured with amt given
0x177d6013InvalidRepegDirection
AMM repeg incorrect repeg direction
0x177e6014InvalidRepegProfitability
AMM repeg out of bounds pnl
0x177f6015SlippageOutsideLimit
Slippage Outside Limit Price
The name points to a slippage or minimum-output check: the price moved past the limit set in the transaction.
0x17806016OrderSizeTooSmall
Order Size Too Small
0x17816017InvalidUpdateK
Price change too large when updating K
0x17826018AdminWithdrawTooLarge
Admin tried to withdraw amount larger than fees collected
0x17836019MathError
Math Error
0x17846020BnConversionError
Conversion to u128/u64 failed with an overflow or underflow
0x17856021ClockUnavailable
Clock unavailable
0x17866022UnableToLoadOracle
Unable To Load Oracles
0x17876023PriceBandsBreached
Price Bands Breached
0x17886024ExchangePaused
Exchange is paused
The name points to a feature or pool state that currently blocks this action.
0x17896025InvalidWhitelistToken
Invalid whitelist token
0x178a6026WhitelistTokenNotFound
Whitelist token not found
0x178b6027InvalidDiscountToken
Invalid discount token
0x178c6028DiscountTokenNotFound
Discount token not found
0x178d6029ReferrerNotFound
Referrer not found
0x178e6030ReferrerStatsNotFound
ReferrerNotFound
0x178f6031ReferrerMustBeWritable
0x17906032ReferrerStatsMustBeWritable
ReferrerMustBeWritable
0x17916033ReferrerAndReferrerStatsAuthorityUnequal
0x17926034InvalidReferrer
0x17936035InvalidOracle
0x17946036OracleNotFound
0x17956037LiquidationsBlockedByOracle
Liquidations Blocked By Oracle
0x17966038MaxDeposit
Can not deposit more than max deposit
0x17976039CantDeleteUserWithCollateral
Can not delete user that still has collateral
0x17986040InvalidFundingProfitability
AMM funding out of bounds pnl
0x17996041CastingFailure
Casting Failure
The name points to a checked arithmetic failure inside the program, often from extreme amounts or an outdated client.
0x179a6042InvalidOrder
0x179b6043InvalidOrderMaxTs
0x179c6044InvalidOrderMarketType
0x179d6045InvalidOrderForInitialMarginReq
0x179e6046InvalidOrderNotRiskReducing
0x179f6047InvalidOrderSizeTooSmall
0x17a06048InvalidOrderNotStepSizeMultiple
0x17a16049InvalidOrderBaseQuoteAsset
0x17a26050InvalidOrderIOC
0x17a36051InvalidOrderPostOnly
0x17a46052InvalidOrderIOCPostOnly
0x17a56053InvalidOrderTrigger
0x17a66054InvalidOrderAuction
0x17a76055InvalidOrderOracleOffset
0x17a86056InvalidOrderMinOrderSize
0x17a96057PlacePostOnlyLimitFailure
Failed to Place Post-Only Limit Order
0x17aa6058UserHasNoOrder
User has no order
0x17ab6059OrderAmountTooSmall
Order Amount Too Small
0x17ac6060MaxNumberOfOrders
Max number of orders taken
0x17ad6061OrderDoesNotExist
Order does not exist
0x17ae6062OrderNotOpen
Order not open
0x17af6063FillOrderDidNotUpdateState
0x17b06064ReduceOnlyOrderIncreasedRisk
Reduce only order increased risk
0x17b16065UnableToLoadAccountLoader
Unable to load AccountLoader
0x17b26066TradeSizeTooLarge
Trade Size Too Large
0x17b36067UserCantReferThemselves
User cant refer themselves
0x17b46068DidNotReceiveExpectedReferrer
Did not receive expected referrer
0x17b56069CouldNotDeserializeReferrer
Could not deserialize referrer
0x17b66070CouldNotDeserializeReferrerStats
Could not deserialize referrer stats
0x17b76071UserOrderIdAlreadyInUse
User Order Id Already In Use
The name points to account state: an account was expected to exist (or not exist) already.
0x17b86072NoPositionsLiquidatable
No positions liquidatable
0x17b96073InvalidMarginRatio
Invalid Margin Ratio
0x17ba6074CantCancelPostOnlyOrder
Cant Cancel Post Only Order
0x17bb6075InvalidOracleOffset
0x17bc6076CantExpireOrders
0x17bd6077CouldNotLoadMarketData
0x17be6078PerpMarketNotFound
0x17bf6079InvalidMarketAccount
0x17c06080UnableToLoadPerpMarketAccount
UnableToLoadMarketAccount
0x17c16081MarketWrongMutability
0x17c26082UnableToCastUnixTime
The name points to a checked arithmetic failure inside the program, often from extreme amounts or an outdated client.
0x17c36083CouldNotFindSpotPosition
0x17c46084NoSpotPositionAvailable
0x17c56085InvalidSpotMarketInitialization
0x17c66086CouldNotLoadSpotMarketData
0x17c76087SpotMarketNotFound
0x17c86088InvalidSpotMarketAccount
0x17c96089UnableToLoadSpotMarketAccount
0x17ca6090SpotMarketWrongMutability
0x17cb6091SpotMarketInterestNotUpToDate
SpotInterestNotUpToDate
0x17cc6092SpotMarketInsufficientDeposits
0x17cd6093UserMustSettleTheirOwnPositiveUnsettledPNL
0x17ce6094CantUpdateSpotBalanceType
0x17cf6095InsufficientCollateralForSettlingPNL
0x17d06096AMMNotUpdatedInSameSlot
0x17d16097AuctionNotComplete
The name points to a feature or pool state that currently blocks this action.
0x17d26098MakerNotFound
0x17d36099MakerStatsNotFound
MakerNotFound
0x17d46100MakerMustBeWritable
0x17d56101MakerStatsMustBeWritable
MakerMustBeWritable
0x17d66102MakerOrderNotFound
0x17d76103CouldNotDeserializeMaker
0x17d86104CouldNotDeserializeMakerStats
CouldNotDeserializeMaker
0x17d96105AuctionPriceDoesNotSatisfyMaker
0x17da6106MakerCantFulfillOwnOrder
0x17db6107MakerOrderMustBePostOnly
0x17dc6108CantMatchTwoPostOnlys
0x17dd6109OrderBreachesOraclePriceLimits
0x17de6110OrderMustBeTriggeredFirst
0x17df6111OrderNotTriggerable
0x17e06112OrderDidNotSatisfyTriggerCondition
0x17e16113PositionAlreadyBeingLiquidated
0x17e26114PositionDoesntHaveOpenPositionOrOrders
0x17e36115AllOrdersAreAlreadyLiquidations
0x17e46116CantCancelLiquidationOrder
0x17e56117UserIsBeingLiquidated
0x17e66118LiquidationsOngoing
0x17e76119WrongSpotBalanceType
0x17e86120UserCantLiquidateThemself
0x17e96121InvalidPerpPositionToLiquidate
0x17ea6122InvalidBaseAssetAmountForLiquidatePerp
0x17eb6123InvalidPositionLastFundingRate
0x17ec6124InvalidPositionDelta
0x17ed6125UserBankrupt
0x17ee6126UserNotBankrupt
0x17ef6127UserHasInvalidBorrow
0x17f06128DailyWithdrawLimit
0x17f16129DefaultError
0x17f26130InsufficientLPTokens
Insufficient LP tokens
0x17f36131CantLPWithPerpPosition
Cant LP with a market position
0x17f46132UnableToBurnLPTokens
Unable to burn LP tokens
0x17f56133TryingToRemoveLiquidityTooFast
Trying to remove liqudity too fast after adding it
0x17f66134InvalidSpotMarketVault
Invalid Spot Market Vault
0x17f76135InvalidSpotMarketState
Invalid Spot Market State
0x17f86136InvalidSerumProgram
0x17f96137InvalidSerumMarket
0x17fa6138InvalidSerumBids
0x17fb6139InvalidSerumAsks
0x17fc6140InvalidSerumOpenOrders
0x17fd6141FailedSerumCPI
0x17fe6142FailedToFillOnExternalMarket
0x17ff6143InvalidFulfillmentConfig
0x18006144InvalidFeeStructure
0x18016145InsufficientIFShares
Insufficient IF shares
0x18026146MarketActionPaused
the Market has paused this action
The name points to a feature or pool state that currently blocks this action.
0x18036147MarketPlaceOrderPaused
the Market status doesnt allow placing orders
The name points to a feature or pool state that currently blocks this action.
0x18046148MarketFillOrderPaused
the Market status doesnt allow filling orders
The name points to a feature or pool state that currently blocks this action.
0x18056149MarketWithdrawPaused
the Market status doesnt allow withdraws
The name points to a feature or pool state that currently blocks this action.
0x18066150ProtectedAssetTierViolation
Action violates the Protected Asset Tier rules
0x18076151IsolatedAssetTierViolation
Action violates the Isolated Asset Tier rules
0x18086152UserCantBeDeleted
User Cant Be Deleted
0x18096153ReduceOnlyWithdrawIncreasedRisk
Reduce Only Withdraw Increased Risk
0x180a6154MaxOpenInterest
Max Open Interest
0x180b6155CantResolvePerpBankruptcy
Cant Resolve Perp Bankruptcy
0x180c6156LiquidationDoesntSatisfyLimitPrice
Liquidation Doesnt Satisfy Limit Price
0x180d6157MarginTradingDisabled
Margin Trading Disabled
The name points to a feature or pool state that currently blocks this action.
0x180e6158InvalidMarketStatusToSettlePnl
Invalid Market Status to Settle Perp Pnl
0x180f6159PerpMarketNotInSettlement
0x18106160PerpMarketNotInReduceOnly
0x18116161PerpMarketSettlementBufferNotReached
0x18126162PerpMarketSettlementUserHasOpenOrders
0x18136163PerpMarketSettlementUserHasActiveLP
0x18146164UnableToSettleExpiredUserPosition
0x18156165UnequalMarketIndexForSpotTransfer
0x18166166InvalidPerpPositionDetected
0x18176167InvalidSpotPositionDetected
0x18186168InvalidAmmDetected
0x18196169InvalidAmmForFillDetected
0x181a6170InvalidAmmLimitPriceOverride
0x181b6171InvalidOrderFillPrice
0x181c6172SpotMarketBalanceInvariantViolated
0x181d6173SpotMarketVaultInvariantViolated
0x181e6174InvalidPDA
0x181f6175InvalidPDASigner
The name points to a permission check: the wrong signer or owner account was passed.
0x18206176RevenueSettingsCannotSettleToIF
0x18216177NoRevenueToSettleToIF
0x18226178NoAmmPerpPnlDeficit
0x18236179SufficientPerpPnlPool
0x18246180InsufficientPerpPnlPool
0x18256181PerpPnlDeficitBelowThreshold
0x18266182MaxRevenueWithdrawPerPeriodReached
0x18276183MaxIFWithdrawReached
InvalidSpotPositionDetected
0x18286184NoIFWithdrawAvailable
0x18296185InvalidIFUnstake
0x182a6186InvalidIFUnstakeSize
0x182b6187InvalidIFUnstakeCancel
0x182c6188InvalidIFForNewStakes
0x182d6189InvalidIFRebase
0x182e6190InvalidInsuranceUnstakeSize
0x182f6191InvalidOrderLimitPrice
0x18306192InvalidIFDetected
0x18316193InvalidAmmMaxSpreadDetected
0x18326194InvalidConcentrationCoef
0x18336195InvalidSrmVault
0x18346196InvalidVaultOwner
0x18356197InvalidMarketStatusForFills
0x18366198IFWithdrawRequestInProgress
0x18376199NoIFWithdrawRequestInProgress
0x18386200IFWithdrawRequestTooSmall
0x18396201IncorrectSpotMarketAccountPassed
0x183a6202BlockchainClockInconsistency
0x183b6203InvalidIFSharesDetected
0x183c6204NewLPSizeTooSmall
0x183d6205MarketStatusInvalidForNewLP
0x183e6206InvalidMarkTwapUpdateDetected
0x183f6207MarketSettlementAttemptOnActiveMarket
0x18406208MarketSettlementRequiresSettledLP
0x18416209MarketSettlementAttemptTooEarly
0x18426210MarketSettlementTargetPriceInvalid
0x18436211UnsupportedSpotMarket
0x18446212SpotOrdersDisabled
The name points to a feature or pool state that currently blocks this action.
0x18456213MarketBeingInitialized
Market Being Initialized
0x18466214InvalidUserSubAccountId
Invalid Sub Account Id
0x18476215InvalidTriggerOrderCondition
Invalid Trigger Order Condition
0x18486216InvalidSpotPosition
Invalid Spot Position
0x18496217CantTransferBetweenSameUserAccount
Cant transfer between same user account
0x184a6218InvalidPerpPosition
Invalid Perp Position
0x184b6219UnableToGetLimitPrice
Unable To Get Limit Price
0x184c6220InvalidLiquidation
Invalid Liquidation
0x184d6221SpotFulfillmentConfigDisabled
Spot Fulfillment Config Disabled
The name points to a feature or pool state that currently blocks this action.
0x184e6222InvalidMaker
Invalid Maker
0x184f6223FailedUnwrap
Failed Unwrap
0x18506224MaxNumberOfUsers
Max Number Of Users
0x18516225InvalidOracleForSettlePnl
0x18526226MarginOrdersOpen
0x18536227TierViolationLiquidatingPerpPnl
0x18546228CouldNotLoadUserData
0x18556229UserWrongMutability
0x18566230InvalidUserAccount
0x18576231CouldNotLoadUserStatsData
CouldNotLoadUserData
0x18586232UserStatsWrongMutability
UserWrongMutability
0x18596233InvalidUserStatsAccount
InvalidUserAccount
0x185a6234UserNotFound
0x185b6235UnableToLoadUserAccount
0x185c6236UserStatsNotFound
0x185d6237UnableToLoadUserStatsAccount
0x185e6238UserNotInactive
User Not Inactive
0x185f6239RevertFill
0x18606240InvalidMarketAccountforDeletion
Invalid MarketAccount for Deletion
0x18616241InvalidSpotFulfillmentParams
Invalid Spot Fulfillment Params
0x18626242FailedToGetMint
Failed to Get Mint
0x18636243FailedPhoenixCPI
0x18646244FailedToDeserializePhoenixMarket
0x18656245InvalidPricePrecision
0x18666246InvalidPhoenixProgram
0x18676247InvalidPhoenixMarket
0x18686248InvalidSwap
0x18696249SwapLimitPriceBreached
0x186a6250SpotMarketReduceOnly
0x186b6251FundingWasNotUpdated
0x186c6252ImpossibleFill
0x186d6253CantUpdatePerpBidAskTwap
0x186e6254UserReduceOnly
0x186f6255InvalidMarginCalculation
0x18706256CantPayUserInitFee
0x18716257CantReclaimRent
0x18726258InsuranceFundOperationPaused
The name points to a feature or pool state that currently blocks this action.
0x18736259NoUnsettledPnl
0x18746260PnlPoolCantSettleUser
0x18756261OracleNonPositive
OracleInvalid
0x18766262OracleTooVolatile
0x18776263OracleTooUncertain
0x18786264OracleStaleForMargin
0x18796265OracleInsufficientDataPoints
0x187a6266OracleStaleForAMM
0x187b6267UnableToParsePullOracleMessage
Unable to parse pull oracle message
0x187c6268MaxBorrows
Can not borow more than max borrows
0x187d6269OracleUpdatesNotMonotonic
Updates must be monotonically increasing
0x187e6270OraclePriceFeedMessageMismatch
Trying to update price feed with the wrong feed id
0x187f6271OracleUnsupportedMessageType
The message in the update must be a PriceFeedMessage
0x18806272OracleDeserializeMessageFailed
Could not deserialize the message in the update
0x18816273OracleWrongGuardianSetOwner
Wrong guardian set owner in update price atomic
0x18826274OracleWrongWriteAuthority
Oracle post update atomic price feed account must be drift program
0x18836275OracleWrongVaaOwner
Oracle vaa owner must be wormhole program
0x18846276OracleTooManyPriceAccountUpdates
Multi updates must have 2 or fewer accounts passed in remaining accounts
0x18856277OracleMismatchedVaaAndPriceUpdates
Don't have the same remaining accounts number and pyth updates left
0x18866278OracleBadRemainingAccountPublicKey
Remaining account passed does not match oracle update derived pda
0x18876279FailedOpenbookV2CPI
0x18886280InvalidOpenbookV2Program
0x18896281InvalidOpenbookV2Market
0x188a6282NonZeroTransferFee
Non zero transfer fee
0x188b6283LiquidationOrderFailedToFill
Liquidation order failed to fill
0x188c6284InvalidPredictionMarketOrder
Invalid prediction market order
0x188d6285InvalidVerificationIxIndex
Ed25519 Ix must be before place and make SignedMsg order ix
0x188e6286SigVerificationFailed
SignedMsg message verificaiton failed
0x188f6287MismatchedSignedMsgOrderParamsMarketIndex
Market index mismatched b/w taker and maker SignedMsg order params
0x18906288InvalidSignedMsgOrderParam
Invalid SignedMsg order param
0x18916289PlaceAndTakeOrderSuccessConditionFailed
Place and take order success condition failed
0x18926290InvalidHighLeverageModeConfig
Invalid High Leverage Mode Config
0x18936291InvalidRFQUserAccount
Invalid RFQ User Account
0x18946292RFQUserAccountWrongMutability
RFQUserAccount should be mutable
0x18956293RFQUserAccountFull
RFQUserAccount has too many active RFQs
0x18966294RFQOrderNotFilled
RFQ order not filled as expected
0x18976295InvalidRFQOrder
RFQ orders must be jit makers
0x18986296InvalidRFQMatch
RFQ matches must be valid
0x18996297InvalidSignedMsgUserAccount
Invalid SignedMsg user account
0x189a6298SignedMsgUserAccountWrongMutability
SignedMsg account wrong mutability
0x189b6299SignedMsgUserOrdersAccountFull
SignedMsgUserAccount has too many active orders
0x189c6300SignedMsgOrderDoesNotExist
Order with SignedMsg uuid does not exist
0x189d6301InvalidSignedMsgOrderId
SignedMsg order id cannot be 0s
0x189e6302InvalidPoolId
Invalid pool id
0x189f6303InvalidProtectedMakerModeConfig
Invalid Protected Maker Mode Config
0x18a06304InvalidPythLazerStorageOwner
Invalid pyth lazer storage owner
0x18a16305UnverifiedPythLazerMessage
Verification of pyth lazer message failed
0x18a26306InvalidPythLazerMessage
Invalid pyth lazer message
0x18a36307PythLazerMessagePriceFeedMismatch
Pyth lazer message does not correspond to correct fed id
0x18a46308InvalidLiquidateSpotWithSwap
0x18a56309SignedMsgUserContextUserMismatch
User in SignedMsg message does not match user in ix context
0x18a66310UserFuelOverflowThresholdNotMet
User fuel overflow threshold not met
The name points to a checked arithmetic failure inside the program, often from extreme amounts or an outdated client.
0x18a76311FuelOverflowAccountNotFound
FuelOverflow account not found
The name points to a checked arithmetic failure inside the program, often from extreme amounts or an outdated client.
0x18a86312InvalidTransferPerpPosition
Invalid Transfer Perp Position
0x18a96313InvalidSignedMsgUserOrdersResize
Invalid SignedMsgUserOrders resize
0x18aa6314CouldNotDeserializeHighLeverageModeConfig
Could not deserialize high leverage mode config
0x18ab6315InvalidIfRebalanceConfig
Invalid If Rebalance Config
0x18ac6316InvalidIfRebalanceSwap
Invalid If Rebalance Swap
0x18ad6317InvalidRevenueShareResize
Invalid RevenueShare resize
0x18ae6318BuilderRevoked
Builder has been revoked
0x18af6319InvalidBuilderFee
Builder fee is greater than max fee bps
0x18b06320RevenueShareEscrowAuthorityMismatch
RevenueShareEscrow authority mismatch
0x18b16321RevenueShareEscrowOrdersAccountFull
RevenueShareEscrow has too many active orders
0x18b26322InvalidRevenueShareAccount
Invalid RevenueShareAccount
0x18b36323CannotRevokeBuilderWithOpenOrders
Cannot revoke builder with open orders
0x18b46324UnableToLoadRevenueShareAccount
Unable to load builder account
0x18b56325InvalidConstituent
Invalid Constituent
0x18b66326InvalidAmmConstituentMappingArgument
Invalid Amm Constituent Mapping argument
0x18b76327ConstituentNotFound
Constituent not found
0x18b86328ConstituentCouldNotLoad
Constituent could not load
0x18b96329ConstituentWrongMutability
Constituent wrong mutability
0x18ba6330WrongNumberOfConstituents
Wrong number of constituents passed to instruction
0x18bb6331InsufficientConstituentTokenBalance
Insufficient constituent token balance
0x18bc6332AMMCacheStale
Amm Cache data too stale
0x18bd6333LpPoolAumDelayed
LP Pool AUM not updated recently
0x18be6334ConstituentOracleStale
Constituent oracle is stale
0x18bf6335LpInvariantFailed
LP Invariant failed
0x18c06336InvalidConstituentDerivativeWeights
Invalid constituent derivative weights
0x18c16337MaxDlpAumBreached
Max DLP AUM Breached
0x18c26338SettleLpPoolDisabled
Settle Lp Pool Disabled
The name points to a feature or pool state that currently blocks this action.
0x18c36339MintRedeemLpPoolDisabled
Mint/Redeem Lp Pool Disabled
The name points to a feature or pool state that currently blocks this action.
0x18c46340LpPoolSettleInvariantBreached
Settlement amount exceeded
0x18c56341InvalidConstituentOperation
Invalid constituent operation
0x18c66342Unauthorized
Unauthorized for operation
The name points to a permission check: the wrong signer or owner account was passed.
0x18c76343InvalidIsolatedPerpMarket
Invalid Isolated Perp Market

Decode an error

Free, no sign-up, nothing to connect. Works offline from a bundled list; we do not look anything up on-chain.

Swapping a token you do not know? A free Rugsight check shows mint and freeze authority, Token-2022 extensions, holder concentration and liquidity before you trade.

Source: solana-idls@1.2.1. Data: program error lists from published IDLs (solana-idls 1.2.1, MIT) and the System, SPL Token, Token-2022 and Associated Token Account source code, snapshot 2026-11-16. Programs can be upgraded and add or change errors; the failing program's current IDL is the final word.