Error codes / Pump.fun Bonding Curve
BuySlippageBelowMinTokensOut
Pump.fun Bonding Curve · Custom(6042) · 0x179a
custom program error: 0x179a
What it means
The swap would have paid out less than the minimum this transaction allowed (or cost more than its maximum). The price moved between the moment the quote was taken and the moment the transaction executed, by more than the slippage tolerance set in the swap.
The program's own message: “Slippage: Would buy less tokens than expected min_tokens_out”
What to do
Get a fresh quote and resend with the same tolerance; the price has moved on. Widen the tolerance only if it keeps failing on a fast-moving token, and know that a wide tolerance is what sandwich bots feed on.
Seen on mainnet
The newer buy_exact_sol_in and buy_exact_quote_in_v2 instructions: SOL in is fixed, min_tokens_out is the limit. This instruction carries a limit, not a tolerance, so a fresh quote is the wrong idea. TxWhy keeps the amount and every account, and moves only the limit to the price the chain itself computed in the failed run (read from the program's own check in the logs, or from a simulation with the limit lifted), with a 1% tolerance and never more than 25% against you. The result is returned only after it passes simulation, and the offline verifier refuses anything else.
From replaying real landed failures through the repair engine, around the clock since September 21, 2026. Every verdict and its reason is on the failure index.
TxWhy can repair this one
This instruction carries a limit rather than a tolerance. TxWhy keeps the amount and every account, moves only the limit to the price the chain computed in the failed run (never more than 25% against you), keeps every other instruction byte for byte, and returns the result only after it passes simulation.
Code 6042 means something else in other programs
Custom codes are private to each program. Check which program actually raised it: it is the innermost failed call, not necessarily the program you called.
- InvalidOrderDrift V2
- SimpleAmmBaseTokenCannotHaveFreezeAuthorityHeaven DEX
- UnexpectedWSOLLeftoverJupiter DCA
- AuctioneerAuthorityMismatchMetaplex Auction House
- IncorrectFreezeAtaMetaplex Candy Machine
- WrongCollectionMintKeyMetaplex Fixed Price Sale
- TypeCastFailedMeteora AMM
- InvalidPoolCreatorMeteora CP AMM (DAMM V2)
- PoolDisabledMeteora DLMM
- InvalidFeeRateLimiterMeteora Dynamic Bonding Curve
- TrimAccountIsNoneOKX DEX Aggregation Router V2
- NonEmptyOpenOrdersPositionOpenBook V2