Errors
Every error code the programs can return, with the message and what usually causes it.
Updated Sep 25, 2026
A custom program error arrives as a code; both IDLs carry the table that turns it into a name and a message. Both programs number from 6000, so tell them apart by which program the failing instruction targeted. Errors and failure handling explains the ones integrators meet most and what to do about them.
Dusk program
Dusk program errors · 147 of 147
| Code | Name | Message |
|---|---|---|
| 6000 | InvalidOperator | Only the current market operator may authorize this action |
| 6001 | OperatorEpochMismatch | Operator authority epoch changed |
| 6002 | OperatorNonceMismatch | Operator nonce is not current |
| 6003 | OperatorFieldForbidden | This field cannot be changed by an operator |
| 6004 | OperatorPolicyExceeded | Operator change exceeds the fixed protocol policy |
| 6005 | OperatorProposalStale | Operator bundle no longer matches the market |
| 6006 | OperatorNoticeNotReady | Operator change is still in its exit notice |
| 6007 | OperatorProposalExpired | Operator execution window expired |
| 6008 | OperatorChangePending | Operator change is still pending |
| 6009 | OperatorRevenueArchiveRequired | Prepare the previous recipient revenue archive before transferring future fees |
| 6010 | InvalidDeployer | Invalid deployer |
| 6011 | ArgumentMissing | Argument missing |
| 6012 | InvalidSwapFeeBps | Invalid swap fee bps |
| 6013 | InvalidInterestFeeBps | Invalid interest fee bps |
| 6014 | InvalidHalfLife | Invalid half life |
| 6015 | InvalidFutarchyAuthority | Invalid futarchy authority |
| 6016 | InvalidReduceOnlyAuthority | Invalid reduce-only authority |
| 6017 | InvalidProposalMetadata | Invalid parameter proposal metadata |
| 6018 | InvalidProposalUri | Invalid parameter proposal description URI |
| 6019 | ParameterUpdateNotMeaningful | Parameter update would not change the active market parameters |
| 6020 | InvalidParameterUpdate | Invalid parameter update |
| 6021 | UtilizationGuardExceeded | Parameter execution is blocked while either lending side is at or above 80% utilization |
| 6022 | InvalidArgument | Invalid argument |
| 6023 | AmountZero | Amount cannot be zero |
| 6024 | InsufficientAmount0In | Insufficient amount0 in |
| 6025 | InsufficientAmount1In | Insufficient amount1 in |
| 6026 | BorrowingPowerExceeded | Borrowing power exceeded |
| 6027 | InvalidTokenAccount | Invalid token account |
| 6028 | InvalidTokenProgram | Invalid token program |
| 6029 | BorrowExceedsReserve | Borrow exceeds reserve |
| 6030 | InsufficientAmount0 | Insufficient amount0 |
| 6031 | InsufficientAmount1 | Insufficient amount1 |
| 6032 | InsufficientOutputAmount | Insufficient output amount |
| 6033 | SlippageExceeded | Output amount below minimum requested (slippage exceeded) |
| 6034 | InsufficientLiquidity | Insufficient liquidity |
| 6035 | InsufficientCashReserve0 | Insufficient cash reserve0 |
| 6036 | InsufficientCashReserve1 | Insufficient cash reserve1 |
| 6037 | Overflow | Arithmetic overflow |
| 6038 | Undercollateralized | Undercollateralized |
| 6039 | InsufficientBalanceForCollateral | Insufficient balance for collateral |
| 6040 | InsufficientAmount | Insufficient amount |
| 6041 | InsufficientBalance | User balance insufficient to cover requested amount |
| 6042 | InsufficientDebt | Insufficient debt |
| 6043 | UserPositionNotInitialized | User position not initialized |
| 6044 | ZeroDebtAmount | Zero debt amount |
| 6045 | NotUndercollateralized | Not undercollateralized |
| 6046 | BrokenInvariant | Broken invariant |
| 6047 | InvariantOverflow | Math overflow during invariant calculation |
| 6048 | FeeMathOverflow | Math overflow during fee calculation. |
| 6049 | OutputAmountOverflow | Math overflow during output amount calculation. |
| 6050 | ReserveOverflow | Math overflow during reserve calculation. |
| 6051 | ReserveUnderflow | Math underflow during reserve calculation. |
| 6052 | CashReserveUnderflow | Math underflow during cash reserve calculation. |
| 6053 | DenominatorOverflow | Math overflow during denominator calculation. |
| 6054 | LiquidityMathOverflow | Math overflow during liquidity calculation |
| 6055 | LiquiditySqrtOverflow | Math overflow during liquidity square root calculation |
| 6056 | LiquidityUnderflow | Math underflow during liquidity calculation |
| 6057 | LiquidityConversionOverflow | Math overflow during liquidity conversion |
| 6058 | SupplyOverflow | Math overflow during supply calculation |
| 6059 | SupplyUnderflow | Math underflow during supply calculation |
| 6060 | DebtMathOverflow | Math overflow during debt calculation |
| 6061 | DebtShareMathOverflow | Math overflow during debt share calculation |
| 6062 | DebtShareDivisionOverflow | Math overflow during debt share division |
| 6063 | DebtUtilizationOverflow | Math overflow during debt utilization calculation |
| 6064 | InvalidMint | Invalid mint |
| 6065 | InvalidMintLen | Invalid mint length |
| 6066 | InvalidDistribution | Invalid distribution - percentages must sum to 100% |
| 6067 | InvalidAuctionConfig | Invalid protocol auction config |
| 6068 | StaleAuctionReference | Protocol auction reference price is stale |
| 6069 | InsufficientAuctionPayment | Protocol auction payment is insufficient |
| 6070 | InvalidLpMintKey | Invalid LP mint key |
| 6071 | InvalidLpName | Invalid LP name |
| 6072 | InvalidLpSymbol | Invalid LP symbol |
| 6073 | InvalidLpUri | Invalid LP URI |
| 6074 | AccountNotEmpty | Account not empty |
| 6075 | InvalidMintAuthority | Invalid mint authority |
| 6076 | FrozenLpMint | Frozen LP mint |
| 6077 | NonZeroSupply | Non-zero supply |
| 6078 | WrongLpDecimals | Wrong LP decimals |
| 6079 | UnsupportedAssetDecimals | Asset mint decimals exceed Dusk's 9-decimal AMM precision |
| 6080 | InvalidVaultSameAccount | Invalid vault - token_in_vault and token_out_vault must be different |
| 6081 | InvalidVault | Invalid vault |
| 6082 | InvalidParamsHash | Invalid params hash - hash does not match computed parameters |
| 6083 | InvalidVersion | Invalid version |
| 6084 | InvalidTokenOrder | Invalid token order |
| 6085 | InvalidRateModel | Invalid rate model - rate_model does not match market configuration |
| 6086 | InvalidPositionMarket | Invalid position market - position does not match market |
| 6087 | InvalidUtilBounds | Invalid utilization bounds - must satisfy: MIN <= start < end <= MAX |
| 6088 | InvalidRateParams | Invalid rate parameters - check half_life_ms, min_rate_bps, max_rate_bps, initial_rate_bps bounds |
| 6089 | ReduceOnlyMode | Operation blocked: reduce-only mode is active |
| 6090 | ReduceOnlyHasDebt | Cannot remove collateral in reduce-only mode while debt exists |
| 6091 | InvalidInstructionsSysvar | Invalid instructions sysvar |
| 6092 | InsufficientPostWithdrawDebtCoverage | Insufficient post-withdraw debt coverage |
| 6093 | InvalidRecipient | Invalid recipient - address does not match configured revenue recipient |
| 6094 | InvalidMarket | Invalid market |
| 6095 | InvalidMarketConfig | Invalid market config |
| 6096 | InvalidSettlementPrice | Invalid settlement price |
| 6097 | InsufficientMarketShareBacking | Market reserve share backing is insufficient |
| 6098 | InvalidMarketSide | Invalid market side |
| 6099 | InvalidYieldAccount | Invalid yield account |
| 6100 | InvalidHlpVault | Invalid hLP vault |
| 6101 | InvalidHlpMintSupply | Live hLP mint supply is inconsistent with stored vault supply |
| 6102 | NotEnoughAccounts | Not enough remaining accounts |
| 6103 | HlpSettlementUnavailable | hLP settlement is unavailable |
| 6104 | HlpNotLiquidatable | hLP funding position is not eligible for permissionless liquidation |
| 6105 | InsufficientBorrowHeadroom | Borrow headroom is insufficient |
| 6106 | InsufficientMarketHealth | Market health is insufficient |
| 6107 | InvalidBorrowPosition | Invalid borrow position |
| 6108 | PositionNotLiquidatable | Position is not liquidatable |
| 6109 | LiquidationSocializationExceeded | Socialized liquidation loss exceeds caller cap |
| 6110 | InvalidClaimMint | Claim mint must not charge transfer fees |
| 6111 | UnbackedFeeLiability | Fee liability is not backed by its custody balance |
| 6112 | InvalidMarketFeeAuthority | Invalid market fee authority |
| 6113 | InvalidInitialLiquidityAuthority | Invalid initial liquidity authority |
| 6114 | LaunchRateLimitSplitTransaction | Launch rate limiter permits only one top-level market action per transaction |
| 6115 | MarketReduceOnly | Market is reduce-only |
| 6116 | MarketNotStarted | Market has not started |
| 6117 | MarketMathOverflow | Market math overflow |
| 6118 | DailyLimitExceeded | Daily liquidity limit exceeded |
| 6119 | InstructionNotLive | Instruction is intentionally not live yet |
| 6120 | LiquidationRepayTooLarge | Liquidation repay amount exceeds partial liquidation cap |
| 6121 | LeverageMultiplierTooHigh | Leverage multiplier exceeds circuit breaker |
| 6122 | LeverageInitialMarginTooLow | Leverage position does not have enough initial margin |
| 6123 | LeverageUnwindImpactTooHigh | Leverage unwind impact exceeds limit |
| 6124 | LeveragePositionNotLiquidatable | Leverage position is not liquidatable |
| 6125 | InvalidSigner | Invalid signer |
| 6126 | InvalidLeveragePosition | Invalid leverage position |
| 6127 | InvalidLeverageDelegation | Invalid leverage delegation |
| 6128 | InvalidReferralInterestShareBps | Referral interest share exceeds the protocol hard cap |
| 6129 | InvalidReferralPartner | Invalid referral partner |
| 6130 | ReferralPartnerNotActive | Referral partner is not active |
| 6131 | InvalidReferralAccrual | Invalid referral accrual account |
| 6132 | InvalidLeverageCollateralMint | Leverage collateral transfer fee must be immutable with no pending change |
| 6133 | FreezableAssetMint | Asset mint has an active freeze authority |
| 6134 | ParameterUpdatesNotCanonical | Parameter updates must name one to seven families, each once, in ascending family order |
| 6135 | ReservedLiquidationClock | Reserved retired liquidation clock error |
| 6136 | LiquidationSessionActive | Position has an active liquidation session |
| 6137 | InvalidLiquidationSession | Invalid atomic liquidation session or instruction pairing |
| 6138 | LiquidationDoesNotImproveHealth | Partial liquidation does not improve health after costs |
| 6139 | IncomeEpochNeedsRollover | Archive and roll the income epoch before issuing new receivables |
| 6140 | IncomeHistoryRequired | Prepare this holder's income history before changing its balance |
| 6141 | OracleAccountMissing | The market's configured oracle account was not supplied |
| 6142 | OracleAuthenticationFailed | Oracle account owner, identity or verification failed |
| 6143 | OracleInvalidObservation | Oracle report is invalid, future-dated, halted or too uncertain |
| 6144 | OracleStale | Oracle source observation is stale |
| 6145 | OracleReplay | Oracle sequence or source observation regressed |
| 6146 | LaunchSettingsImmutable | Launch-only settings are immutable after the market starts |
Leverage delegate program
Leverage delegate program errors · 6 of 6
| Code | Name | Message |
|---|---|---|
| 6000 | InvalidOrder | Invalid leverage order |
| 6001 | TriggerNotMet | Order trigger is not met |
| 6002 | InvalidTokenAccount | Invalid token account |
| 6003 | MathOverflow | Math overflow |
| 6004 | ApprovalSerializationFailed | Approval serialization failed |
| 6005 | InvalidMarketVersion | Unsupported Dusk market version |