Skip to main content
When a transaction fails, the program returns a custom error code. Match the code from your transaction logs to this table.

Common errors

CodeNameDescription
4UnauthorizedSigner is not the pool authority
7InsufficientLiquidityNot enough liquidity in the pool to fill the swap
8SlippageExceededOutput amount is below minOut
15ZeroSwapAmountSwap input amount is zero
16PoolPausedPool is paused — no swaps or deposits allowed
37StaleOracleOracle hasn’t been updated recently enough (exceeds deltaStaleness)
38ExpiredTransaction slot deadline has passed

All error codes

CodeNameDescription
0NotSignerAccount is not a signer
1InvalidOwnerAccount has wrong owner
2InvalidAccountDataAccount data is malformed or wrong size
3InvalidAddressAccount address doesn’t match expected PDA
4UnauthorizedSigner is not the pool authority
5PoolNotInitializedPool has not been initialized yet
6PoolAlreadyInitializedPool has already been initialized
7InsufficientLiquidityNot enough liquidity to fill the swap
8SlippageExceededOutput amount is below minOut
9CurvePointsNotSortedCurve points must be sorted by ascending x value
10CurveDuplicateXCurve has duplicate x values
11CurveTooManyPointsCurve exceeds the max points limit
12CurveEmptyCurve has zero points
13InvalidMidpriceMidprice value is invalid
14MathOverflowArithmetic overflow during calculation
15ZeroSwapAmountSwap input amount is zero
16PoolPausedPool is paused
17FeeConfigAlreadyInitializedGlobal fee config already exists
18FeeConfigNotInitializedGlobal fee config doesn’t exist yet
19NotFeeAdminSigner is not the fee admin
20InvalidFeePpmFee PPM value is out of range
21RiskCurveXOutOfRangeRisk curve x-value must be between 0 and Q32_ONE
22SequenceTooOldOracle update sequence must be >= current sequence
23PrefabSlotOutOfRangePrefab slot index exceeds pool’s max slots
24CurvePrefabsNotInitializedCurvePrefabs account not initialized
25PrefabSlotNotInitializedTarget prefab slot has no curve data
26CurveMetaNotInitializedCurveMeta account not initialized
27SpreadConfigAlreadyInitializedSpread config already exists
28SpreadConfigNotInitializedSpread config doesn’t exist yet
29TooManySpreadTriggersToo many spread triggers
30SpreadConfigRequiredPool has spread config but it wasn’t provided in accounts
31SpreadConfigInvalidOwnerSpread config account not owned by program
32ConfigInvalidOwnerConfig account not owned by program
33MidpriceOracleInvalidOwnerOracle account not owned by program
34CurveMetaInvalidOwnerCurveMeta account not owned by program
35CurvePrefabsInvalidOwnerCurvePrefabs account not owned by program
36FeeConfigInvalidOwnerFeeConfig account not owned by program
37StaleOracleOracle hasn’t been updated within deltaStaleness slots
38ExpiredTransaction slot deadline has passed
39NoPendingNominationNo pending authority transfer to accept
40NominationExpiredAuthority nomination has expired
41InvalidNomineeSigner is not the nominated authority
42NominateSelfCannot nominate current authority as new authority
43InvalidNominationExpiryNomination expiry slot must be in the future
44InvalidTokenProgramMust be SPL Token or Token-2022
45PriceCurveXOutOfRangePrice curve x-value out of range in percent mode
46CurveUpdatesBufferFullCurve updates buffer is full — apply before submitting more
47CurveUpdatesInvalidOwnerCurveUpdates account not owned by program
48CurveMetaMismatchCurveMeta address doesn’t belong to this pool
49InvalidOracleModeOracle mode must be 0 (Authority) or 1 (Relative)
50InvalidRiskModeRisk mode must be 0 (Virtual) or 1 (Integrated)
51IntegratedRiskUnsupportedInterpolationIntegrated risk mode doesn’t support this interpolation type
52VaultsNotEmptyVaults must be empty before closing pool
53InvalidPoolStatePool state must be Initialized, Paused, or WithdrawOnly (and different from current)
54MaxPrefabSlotsOutOfRangeMax prefab slots must be 1–16
55MaxCurvePointsOutOfRangeMax curve points must be 1–128