This page lists the Anchor custom errors returned by theDocumentation Index
Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
Use this file to discover all available pages before exploring further.
dynamic-bonding-curve program.
Error Codes
| Code | Error | Message | Common cause |
|---|---|---|---|
6000 | MathOverflow | Math operation overflow | Amounts, prices, or liquidity values exceed supported integer bounds. |
6001 | InvalidFee | Invalid fee setup | Base fee, dynamic fee, or fee scheduler parameters are inconsistent. |
6002 | ExceededSlippage | Exceeded slippage tolerance | Swap output is below the minimum output, or exact-out input exceeds the maximum input. |
6003 | ExceedMaxFeeBps | Exceeded max fee bps | Fee numerator is above the program maximum. |
6004 | InvalidAdmin | Invalid admin | Signer is not an admin for an admin-only instruction. |
6005 | AmountIsZero | Amount is zero | Swap, claim, or migration amount is zero where a positive amount is required. |
6006 | TypeCastFailed | Type cast error | Integer conversion failed. |
6007 | InvalidActivationType | Invalid activation type | Activation type is not slot (0) or timestamp (1). |
6008 | InvalidQuoteMint | Invalid quote mint | Quote mint does not match the config or supported path. |
6009 | InvalidCollectFeeMode | Invalid collect fee mode | Collect fee mode is not quote token (0) or output token (1). |
6010 | InvalidMigrationFeeOption | Invalid migration fee option | Migration fee option is outside the supported range, or custom option is used with the wrong destination. |
6011 | InvalidInput | Invalid input | Generic parameter validation failure. |
6012 | NotEnoughLiquidity | Not enough liquidity | Swap or migration needs more liquidity than the curve can provide. |
6013 | PoolIsCompleted | Pool is completed | Attempted a pre-migration action after the curve completed. |
6014 | PoolIsIncompleted | Pool is incompleted | Attempted migration or post-completion action before the threshold was reached. |
6015 | InvalidMigrationOption | Invalid migration option | Migration option is not DAMM v1 (0) or DAMM v2 (1). |
6016 | InvalidTokenDecimals | Invalid token decimals | Token decimals are outside supported bounds. |
6017 | InvalidTokenType | Invalid token type | Token type is not SPL Token or Token-2022, or is incompatible with the migration. |
6018 | InvalidFeePercentage | Invalid fee percentage | Partner or creator migration fee split is outside allowed bounds. |
6019 | InvalidQuoteThreshold | Invalid quote threshold | Migration quote threshold is zero or invalid. |
6020 | InvalidTokenSupply | Invalid token supply | Pre-migration and post-migration supply values are inconsistent. |
6021 | InvalidCurve | Invalid curve | Curve points are empty, unsorted, out of price range, or have invalid liquidity. |
6022 | NotPermitToDoThisAction | Not permit to do this action | Signer is not the expected partner, creator, or authorized actor. |
6023 | InvalidOwnerAccount | Invalid owner account | Token account owner does not match expected authority. |
6024 | InvalidConfigAccount | Invalid config account | Config account does not match the pool or instruction. |
6025 | SurplusHasBeenWithdraw | Surplus has been withdraw | Surplus was already claimed. |
6026 | LeftoverHasBeenWithdraw | Leftover has been withdraw | Leftover tokens were already claimed. |
6027 | TotalBaseTokenExceedMaxSupply | Total base token is exceeded max supply | Config or pool creation would exceed allowed base supply. |
6028 | UnsupportNativeMintToken2022 | Unsupport native mint token 2022 | Native mint was used with an unsupported Token-2022 path. |
6029 | InsufficientLiquidityForMigration | Insufficient liquidity for migration | Pool does not have enough liquidity to initialize the destination DAMM pool. |
6030 | MissingPoolConfigInRemainingAccount | Missing pool config in remaining account | Required config account was not supplied in remaining accounts. |
6031 | InvalidVestingParameters | Invalid vesting parameters | Vesting schedule is malformed or has invalid totals. |
6032 | InvalidLeftoverAddress | Invalid leftover address | Leftover receiver is missing or invalid when fixed supply requires it. |
6033 | InsufficientLiquidity | Liquidity in bonding curve is insufficient | Curve segment cannot support the requested price movement. |
6034 | InvalidFeeScheduler | Invalid fee scheduler | Scheduler periods, duration, or reduction factor are invalid. |
6035 | InvalidCreatorTradingFeePercentage | Invalid creator trading fee percentage | Creator trading fee share is outside allowed bounds. |
6036 | InvalidNewCreator | Invalid new creator | New creator address is invalid or equals the old creator. |
6037 | InvalidTokenAuthorityOption | Invalid token authority option | Token authority mode is outside supported values. |
6038 | InvalidAccount | Invalid account for the instruction | Account does not match expected PDA, mint, vault, or owner. |
6039 | InvalidMigratorFeePercentage | Invalid migrator fee percentage | Migrator fee setting is outside allowed range. |
6040 | MigrationFeeHasBeenWithdraw | Migration fee has been withdraw | Partner or creator migration fee was already withdrawn. |
6041 | InvalidBaseFeeMode | Invalid base fee mode | Base fee mode is not linear scheduler, exponential scheduler, or rate limiter. |
6042 | InvalidFeeRateLimiter | Invalid fee rate limiter | Rate limiter fields are missing or invalid. |
6043 | FailToValidateSingleSwapInstruction | Fail to validate single swap instruction in rate limiter | Instruction sysvar validation failed for a rate limiter swap. |
6044 | InvalidMigratedPoolFee | Invalid migrated pool fee params | DAMM v2 graduated-pool fee params are invalid. |
6045 | UndeterminedError | Undertermined error | Generic fallback error. |
6046 | RateLimiterNotSupported | Rate limiter not supported | Rate limiter was used in an unsupported context. |
6047 | AmountLeftIsNotZero | Amount left is not zero | Exact-in path did not consume the expected amount. Use partial fill near curve completion. |
6048 | NextSqrtPriceIsSmallerThanStartSqrtPrice | Next sqrt price is smaller than start sqrt price | Swap movement would cross below the curve start. |
6049 | InvalidMinBaseFee | Invalid min base fee | Minimum base fee is below the program requirement. |
6050 | AccountInvariantViolation | Account invariant violation | CPI account owner, lamports, or data length changed unexpectedly. |
6051 | InvalidPoolCreationFee | Invalid pool creation fee | Pool creation fee is outside allowed bounds. |
6052 | PoolCreationFeeHasBeenClaimed | Pool creation fee has been claimed | Pool creation fee was already claimed. |
6053 | Unauthorized | Not permit to do this action | Signer lacks the required authority. |
6054 | ZeroPoolCreationFee | Pool creation fee is zero | Attempted to claim a zero pool creation fee. |
6055 | InvalidMigrationLockedLiquidity | Invalid migration locked liquidity | Liquidity distribution does not satisfy locked-liquidity requirements. |
6056 | InvalidFeeMarketCapScheduler | Invalid fee market cap scheduler | DAMM v2 market-cap fee scheduler params are invalid. |
6057 | FirstSwapValidationFailed | Fail to validate first swap with minimum fee | First-swap-with-min-fee transaction context failed validation. |
6058 | IncorrectATA | Incorrect ATA | Associated token account does not match expected owner or mint. |
6059 | InsufficientPoolLamports | Pool has insufficient lamports to perform the operation | Pool account cannot pay required lamports for the operation. |
6060 | InvalidPermission | Invalid permission | Operator permission bits are invalid. |
6061 | InvalidWithdrawProtocolFeeZapAccounts | Invalid withdraw protocol fee zap accounts | Protocol zap account list is malformed. |
6062 | MintRestrictedFromZap | SOL,USDC protocol fee cannot be withdrawn via zap | Restricted mint was used with zap. |
6063 | InvalidZapOutParameters | Invalid zap out parameters | Zap output parameters are invalid. |
6064 | CpiDisabled | CPI disabled | Protocol zap CPI is disabled by the downstream zap program. |
6065 | MissingZapOutInstruction | Missing zap out instruction | Required zap instruction was not found. |
6066 | InvalidZapAccounts | Invalid zap accounts | Zap accounts do not match the expected route. |
6067 | InvalidCompoundingParameters | Invalid compounding parameters | DAMM v2 compounding fee settings are invalid. |
TypeScript SDK Validation Helpers
The TypeScript SDK performs many checks before building transactions. These helpers return booleans or throw SDK-side errors before the program returns a custom error.| Helper | Related program errors |
|---|---|
validateConfigParameters | InvalidFee, InvalidCollectFeeMode, InvalidMigrationOption, InvalidTokenDecimals, InvalidCurve, InvalidPoolCreationFee. |
validateFeeScheduler | InvalidFeeScheduler, InvalidMinBaseFee, ExceedMaxFeeBps. |
validateFeeRateLimiter | InvalidFeeRateLimiter, RateLimiterNotSupported. |
validateDynamicFee | InvalidInput, MathOverflow. |
validateMigrationFeeOption | InvalidMigrationFeeOption, InvalidMigratedPoolFee. |
validateMigratedPoolFee | InvalidMigratedPoolFee, InvalidFeeMarketCapScheduler, InvalidCompoundingParameters. |
validateLiquidityVestingInfo | InvalidVestingParameters, InvalidMigrationLockedLiquidity. |
validateTokenSupply | InvalidTokenSupply, InvalidLeftoverAddress, TotalBaseTokenExceedMaxSupply. |
validateBaseTokenType | InvalidTokenType, UnsupportNativeMintToken2022. |
validateSwapAmount | AmountIsZero. |

