Error reference

Every program error and its fix.

Every program error, its code, what it means and what to do. Codes start at 6000, the Anchor custom error base.

CodeNameMeaningWhat to do
6000NotAuthoritySigner is not the pool authoritySign with the pool authority key.
6001NotPendingAuthoritySigner is not the pending authoritySign with the key named in propose_authority.
6002NotKeeperSigner is not the keeperSign with the keeper key set on the pool.
6003NotOwnerSigner does not own this position or LP accountSign with the wallet that owns the position or LP account.
6004NotUpgradeAuthorityOnly the program upgrade authority may initialize the poolInitialize with the program upgrade authority.
6005PausedNew positions and deposits are pausedWait for the authority to resume; exits and withdrawals keep working.
6006InvalidMintMint must be a 6-decimal tokenUse a 6-decimal USDC mint.
6007WrongMintToken account has the wrong mintPass the USDC token account of the right mint.
6008InvalidPoolParamsFee, reward, cooldown or grace parameter out of rangeKeep fees, reward, cooldown and grace inside their bounds.
6009InvalidVenueUnknown venueUse 0 for Hyperliquid or 1 for Binance.
6010InvalidCoinCoin must be 1-8 uppercase ASCII letters or digits, zero paddedUse 1 to 8 uppercase letters or digits.
6011InvalidSchedulePeriod must divide a day and the maturity must sit on a period boundary in the futurePick a period that divides a day and a future maturity on a period boundary.
6012InvalidRateParamsRate cap, skew, spread, exposure share, EMA weight or anchor out of rangeKeep rate cap, skew, spread, cap share, EMA weight and anchor inside their bounds.
6013PrintOutOfOrderPrint must be for the next unprinted periodPost the next unprinted period, with source_ts at its exact end.
6014PrintFromFuturePrint timestamp is in the futureWait until the period has ended on chain time.
6015RateOutOfBoundsFunding print exceeds the per-period boundCheck the source; prints above 5% of notional per period are refused.
6016MarketExpiredMarket is past maturity plus the settlement graceSettle positions; the market is past maturity plus grace.
6017MarketMaturedEvery period of this market is printedEvery period is printed; settle instead.
6018MarketStaleA finished period has not been printed yetWait for the keeper to post the finished period, then retry.
6019NotSettleableMarket is neither fully printed nor expiredWait for the last print or for maturity plus grace.
6020NotionalOutOfRangeNotional out of rangeUse a notional from 1 USDC up to the maximum.
6021InsufficientMarginMargin below the initial requirementAdd margin up to the initial requirement shown in the ticket.
6022ExposureCapExceededTrade would push the pool past this market's exposure capTrade a smaller size, or take the other side, which always fits.
6023SlippageExceededFixed rate worse than the trader's limitRefresh the quote or widen your limit rate.
6024PoolEmptyPool has no capital to quote againstWait for the first liquidity deposit.
6025PoolInsolventPool cash cannot cover this paymentThe pool cash cannot cover this payment; retry after settlements or deposits.
6026NotLiquidatablePosition is above maintenance marginThe position is above maintenance; nothing to do.
6027MarketMismatchPosition belongs to another marketPass the market the position belongs to.
6028InvalidMarketSetRemaining accounts must be every active market, sorted by addressPass every active market, sorted by address, as remaining accounts.
6029ZeroAmountAmount must be greater than zeroUse an amount above zero.
6030DepositTooSmallFirst deposit must exceed the locked minimum liquidityMake the first deposit larger than the locked minimum liquidity.
6031RoundsToZeroDeposit or withdrawal rounds to zeroUse a larger amount.
6032InsufficientSharesNot enough unlocked sharesRequest at most your unlocked shares.
6033CooldownActiveWithdrawal cooldown has not elapsedWait until the cooldown ends.
6034NothingPendingNo withdrawal is pendingCall request_withdraw first.
6035WithdrawalExceedsFreeCapitalWithdrawal would leave open exposure above the capsWithdraw less, or wait for exposure to shrink.
6036NothingToSweepFee vault is emptyNothing to do; the fee vault is empty.
6037MarketHasPositionsMarket still has open positionsSettle or close every position first.
6038MathOverflowArithmetic overflowUse smaller values; the input overflowed the checked math.

Reading an error in the app

The app maps each code to a plain sentence in the toast and keeps the transaction signature next to it, so you can open it in an explorer.

const code = (e as { error?: { errorCode?: { number: number } } }).error?.errorCode?.number