Error reference

Anchor numbers custom errors from 6000 in the order they are declared in error.rs.

CodeNameMeaning
6000AssetCountA pool holds between 2 and 16 coins
6001MintOrderMints must be passed in strictly ascending order
6002MintSetMismatchThe mint set does not hash to the pool seed
6003DecimalsMismatchEvery coin of a pool must have the same decimals
6004MintProgramMint is not owned by the SPL Token or Token-2022 program
6005MintExtensionMint has a transfer hook, a transfer fee or is non-transferable
6006CoinIndexCoin index is out of range or the two coins are the same
6007CoinAccountAccount does not match the pool's mint, vault or token program for that coin
6008BandIndexBand index is out of range
6009ZeroAmountAmount must be greater than zero
6010AmountCountOne amount is required per coin of the pool
6011SlippageSlippage limit exceeded
6012InputShortfallThe vault received less than the amount sent
6013InsolventVault balance is below what the pool owes
6014PositionNotEmptyPosition still holds liquidity or uncollected fees
6015PositionTooSmallPosition holds less liquidity than requested
6016NothingToCollectNo fees to collect for this coin
6017MathOverflowArithmetic overflow
6018NoInteriorLiquidityNo interior liquidity: every band with liquidity is pinned at its edge
6019ExceedsLiquidityTrade is larger than the pool's bands can price
6020NegativePriceTrade would push the coin sold past a zero price
6021TooManySegmentsTrade crosses too many band edges
6022CapExceededPool size cap reached
6023ZeroOutputTrade pays nothing

What to do

ErrorUsually meansFix
SlippageThe pool moved between quote and sendQuote again, or widen the limit
ExceedsLiquidityThe trade is bigger than every band together can priceSplit it
NegativePriceThe trade would push the coin sold past a zero priceTrade less
TooManySegmentsThe trade crosses too many band edges in one instructionSplit it
NoInteriorLiquidityEvery band with liquidity is pinned at its edgeWait for deposits or a trade back toward $1
CoinAccountA mint, vault or token program does not match the poolDerive vaults as the pool's associated token accounts
DecimalsMismatchCoins with different decimalsA pool's coins must share decimals
Next: FAQ