Skip to main content

pump.fun and PumpSwap error codes, and how to fix them

What pump.fun and PumpSwap errors like 0x1772, 0x1775 and 0x1798 mean, how to tell which program sent one, and how to fix it. With a paste-in decoder.

A failed trade on Solana usually comes back as one line:

Transaction simulation failed: Error processing Instruction 3: custom program error: 0x1772

It doesn't say which program failed, or why. This page turns that line into an answer: how to read it, what the pump.fun and PumpSwap codes mean, and what to change. The codes come from the programs' own published IDLs. Our trading API keeps the same table to explain failed trades in plain words, so these are errors we see every day.

Paste your error​

Code 6040 (0x1798) in top-level instruction 8, returned by PumpSwap

PumpSwap 6040 BuySlippageBelowMinBaseAmountOut

“buy: slippage - would buy less tokens than expected min_base_amount_out”

Slippage on a buy that spends a set amount (buy_exact_quote_in): you would get fewer tokens than min_base_amount_out. A common cause besides a moving price: quoting with the wrong fee. Pump pools charge by market cap tier.

The logs show the trade would have returned 25,670,486,327 where at least 25,797,465,935 was required (smallest units): 0.49% short.

It runs in your browser, and what you paste stays on this page. It starts with a real PumpSwap failure; replace it with yours. Logs help: with them it can tell which program the code came from.

How to read the line yourself​

There are three numbers in it.

The code​

0x1772 is hexadecimal for 6002. Programs written with Anchor, as pump.fun and PumpSwap are, number their own errors from 6000 (0x1770) up. Codes from 100 to 5000 are Anchor's own framework errors, and small ones such as 0x0 or 0x1 come from Solana's built-in programs, System and Token. To convert, parseInt("1772", 16) in JavaScript or int("1772", 16) in Python gives 6002.

The instruction​

"Instruction 3" is the failing instruction's position in the transaction, counting from 0. Compute budget and tip instructions count too, so a trade is rarely instruction 0.

The program​

The line doesn't name it, and that matters more than anything else here, because every Anchor program reuses the same numbers. If you have the simulation logs, find the line that ends with your code:

Program pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA failed: custom program error: 0x1798

6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P is the pump.fun bonding curve, pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA is PumpSwap and pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ is pump.fun's fee program. Without logs, look at which program the failing instruction calls.

Anchor programs also log the error by name just before they fail (Error Code: BuySlippageBelowMinBaseAmountOut. Error Number: 6040.). Slippage checks log the two amounts they compared as Left: and Right:, what the trade would have given and the least you allowed, which tells you how far off you were.

The same code means different things​

The clearest case is 0x1798, which is 6040:

  • from PumpSwap it's BuySlippageBelowMinBaseAmountOut: the buy would get fewer tokens than your minimum;
  • from the pump.fun curve it's BuyNotEnoughSolToCoverRent: the wallet wouldn't have enough SOL left for rent.

One needs more slippage, the other more SOL, and neither fix helps the other. 0x1772 works the same way: TooMuchSolRequired (slippage) on the curve, ZeroQuoteAmount on PumpSwap. Find the program first.

pump.fun bonding curve errors​

The ones you'll meet when buying and selling on the curve, from program 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P:

HexCodeNameWhat it means
0x17726002TooMuchSolRequiredBuy slippage: the tokens you asked for now cost more SOL than your maximum. Quote again or allow more slippage.
0x17736003TooLittleSolReceivedSell slippage: your tokens now fetch less SOL than your minimum.
0x17746004MintDoesNotMatchBondingCurveThe bonding curve account isn't this mint's. Derive it from the seeds bonding-curve and the mint.
0x17756005BondingCurveCompleteThe coin has graduated. Trade it on its PumpSwap pool.
0x17846020BuyZeroAmountThe buy rounds down to zero tokens.
0x17856021NotEnoughTokensToBuyMore tokens than are left on the curve, or, on a v3 buy past the end, than the new pool would hold.
0x17866022SellZeroAmountThe sell amount is zero. Check the decimals (6).
0x17876023NotEnoughTokensToSellSelling more tokens than the wallet holds.
0x17986040BuyNotEnoughSolToCoverRentNot enough SOL would be left for rent after the buy. Keep a few thousandths of a SOL spare.
0x17996041BuyNotEnoughSolToCoverFeesNot enough SOL for the buy plus its fees.
0x179a6042BuySlippageBelowMinTokensOutSlippage on a buy that spends a set amount of SOL: fewer tokens than your minimum.
0x17af6063UnsupportedQuoteMintThe coin's quote asset isn't one this instruction takes. Check its quote mint.

6005's message still says the liquidity "migrated to raydium". pump.fun coins have moved to PumpSwap since March 2025; the message was never updated. Whatever it says, the fix is to trade the coin on its PumpSwap pool.

PumpSwap errors​

From program pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA, where pump.fun coins trade after they graduate:

HexCodeNameWhat it means
0x17716001ZeroBaseAmountThe coin amount rounds to zero.
0x17726002ZeroQuoteAmountThe quote (SOL) amount rounds to zero.
0x17736003TooLittlePoolTokenLiquidityThe pool holds too little for this trade.
0x17746004ExceededSlippageSlippage on a sell, or on a buy of a set number of tokens. Quote again or allow more slippage.
0x17806016BuyMoreBaseAmountThanPoolReservesBuying more of the coin than the pool holds.
0x17846020DisabledBuyBuys are switched off on this pool.
0x17856021DisabledSellSells are switched off on this pool.
0x17976039BuyNotEnoughQuoteTokensToCoverFeesNot enough SOL for the buy plus its fees.
0x17986040BuySlippageBelowMinBaseAmountOutSlippage on a buy that spends a set amount: fewer tokens than your minimum. Often a wrong fee in the quote (below).
0x17ae6062InvalidPoolV2The pool_v2 account newer instructions expect is missing. Update your SDK.

6040 has a cause besides a moving price: a quote with the wrong fee. pump.fun's own PumpSwap pools charge by market cap, from 1.25% on the smallest coins down to 0.30% on the largest (25 tiers in the settings we read on 7 November 2026). A quote that assumes one flat rate comes out high on a small coin, and a buy with tight slippage then fails every time. We hit this ourselves: on one small coin a flat-fee quote was 0.79% too high, so every buy allowing less slippage than that failed with 6040.

Anchor errors​

These come from the Anchor framework itself, so pump.fun, PumpSwap and most other Solana programs return them with the same numbers:

HexCodeNameWhat it means
0x65101InstructionFallbackNotFoundThe program doesn't know this instruction, usually an SDK older than the program.
0x66102InstructionDidNotDeserializeThe instruction's arguments aren't in the layout the program expects.
0x7d62006ConstraintSeedsA PDA you passed isn't the one the program derives (more below).
0x7dc2012ConstraintAddressAn account isn't at the fixed address the program expects, often a fee recipient or config account.
0xbbd3005AccountNotEnoughKeysAccounts are missing from the instruction, typical right after a program upgrade.
0xbbf3007AccountOwnedByWrongProgramAn account belongs to another program, for example a Token-2022 account passed as a legacy token account.
0xbc43012AccountNotInitializedAn account the program needs doesn't exist yet, often a token account. Create it first, or in the same transaction.

On pump.fun and PumpSwap, 2006 almost always means the creator vault. Its address is derived from the coin's creator, so when the creator changes, or a coin has just moved to PumpSwap and your cached pool data is stale, the vault you derive is wrong until you read the creator again. 101 and 3005 tend to show up the day after a program upgrade: the program wants an instruction or accounts your SDK doesn't send yet.

Errors that aren't from pump.fun​

What you seeWhat it means
Blockhash not foundThe transaction's blockhash expired, about a minute after it was fetched. Get a new one and sign again.
Attempt to debit an account but found no record of a prior creditThe fee payer has no SOL at all.
insufficient funds for rentAfter the transaction some account would hold less than its rent-exempt minimum, often the wallet itself. Leave a little more SOL in it.
custom program error: 0x1 from the System programNot enough SOL for the amount plus fees and rent.
custom program error: 0x1 from the Token programNot enough of the token, usually a sell for more than the wallet holds.
custom program error: 0x11 from the Token programThe token account is frozen by the mint's freeze authority.
exceeded CUs meter at BPF instructionThe transaction ran out of compute units. Raise the limit with SetComputeUnitLimit.
Transaction too largeOver 1,232 bytes. Use an address lookup table or split the transaction.
This transaction has already been processedThe same signed transaction already landed. Nothing to retry.

Why most failed trades are slippage​

On a busy coin the price moves between your quote and the block your trade lands in. Your transaction carries a limit, and when the trade would go past it the program refuses the whole thing. Some things that help:

  • Quote right before you sign, not when your bot first noticed the coin. A quote a few seconds old on a hot launch is already wrong.
  • Land faster. The less time between quote and block, the less the price can move. A priority fee or a landing service matters more than a wider limit.
  • Sell by percentage. Selling "100%" of a balance can't fail because the balance changed since you looked.
  • Set slippage per coin. A fresh curve coin in its first minute and a month-old PumpSwap pool need very different limits.

A failed transaction still pays its network fee and priority fee, so a bot that keeps sending trades that fail slippage pays for every one of them.

How our API reports these​

When a trade sent through our relay fails, the answer explains it instead of passing on the hex. The example in the decoder above comes back like this:

The price moved past your slippage between building and sending this trade, so PumpSwap refused it (PumpSwap error 6040 BuySlippageBelowMinBaseAmountOut). It would have given 25,670,486,327 where at least 25,797,465,935 was asked (0.49% short, in the token's smallest units). Build it again for a fresh price, or allow more slippage. [Error processing Instruction 8: custom program error: 0x1798]

A trade refused in simulation gets that as a 400; one that lands and fails on chain gets it in the answer's error field. The chain's own text stays at the end in brackets.

The trades the API builds avoid several of the errors on this page in the first place: they go to the coin's PumpSwap pool once it has graduated, so no 6005, and they derive the curve, the pool and the creator vault from current data. If you're writing the trade instructions yourself, how the pump.fun bonding curve works covers the math behind the slippage limits, and how to stream pump.fun trades shows how to keep that data current.