{"title":"PumpSwap error 0x1798 (6040) means the payment buys fewer tokens than the buyer agreed to accept","answer":"The buyer signed a payment of 0.488986666 SOL, or 488,986,666 lamports, which are the smallest units of SOL. The buy required at least 20,949,616,544,881 of the token’s smallest units, and PumpSwap reported slippage because the payment would buy fewer tokens than that minimum.","next_check":"Get a fresh price for the same payment including trading fees and compare the token return with min_base_amount_out, which is the fewest token units the wallet agreed to buy.","log_limit":"A pasted log line alone cannot show the fee, and the meaning stays open if you cannot identify the program that failed.","json_url":"/errors/pumpswap-6040.json","transaction_url":"/tx/4bsgBg3pgB82T3fyYMSEYXHYoNNBWm3PMA9SwFdpDVHBaDUnRBReueTtenP2Kkvd2ZNhcyDeEbWn5xwm6wqhjsc6","related_guide":null,"checks":[{"program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","venue":"PumpSwap","code":6040,"hex":"0x1798","name":"BuySlippageBelowMinBaseAmountOut","meaning":"The payment would buy fewer tokens than the minimum in the signed buy.","source":"https://github.com/pump-fun/pump-public-docs/blob/8cda1fa30ea658b20909d8aedf002047119388d2/idl/pump_amm.json","revision":"idl/pump_amm.json at 8cda1fa30ea658b20909d8aedf002047119388d2 from 2026-10-07","guide":"pumpswap-6040"}],"next":"Read the pool’s current reserves, which are the amounts it uses to price trades, and get a quote for the signed payment. Check the decimal places for each coin because the instruction takes both amounts in whole smallest units. If the quote falls short, rebuild the buy only with a minimum return you still accept.","reviewed":"2026-11-26","receipt":{"signature":"4bsgBg3pgB82T3fyYMSEYXHYoNNBWm3PMA9SwFdpDVHBaDUnRBReueTtenP2Kkvd2ZNhcyDeEbWn5xwm6wqhjsc6","fee_lamports":1010000,"time":"2026-11-27 06:49:27 UTC","instruction":"BuyExactQuoteInV2","outer_index":7,"source":"decoded receipt","url":"https://explorer.solana.com/tx/4bsgBg3pgB82T3fyYMSEYXHYoNNBWm3PMA9SwFdpDVHBaDUnRBReueTtenP2Kkvd2ZNhcyDeEbWn5xwm6wqhjsc6","program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","venue":"PumpSwap","code":6040,"hex":"0x1798","error_name":"BuySlippageBelowMinBaseAmountOut"},"sources":[{"label":"idl/pump_amm.json at 8cda1fa30ea658b20909d8aedf002047119388d2 from 2026-10-07","url":"https://github.com/pump-fun/pump-public-docs/blob/8cda1fa30ea658b20909d8aedf002047119388d2/idl/pump_amm.json"},{"label":"the October 2026 guide to pool trade amounts and accounts","url":"https://github.com/pump-fun/pump-public-docs/blob/639b87fb45c3adeffa6f7c4a1bf0cb85e392bf22/docs/instructions/PUMP_SWAP_TRADE_V2.md"},{"label":"the guide to PumpSwap pool accounts and settings","url":"https://github.com/pump-fun/pump-public-docs/blob/639b87fb45c3adeffa6f7c4a1bf0cb85e392bf22/docs/PUMP_SWAP_README.md"}],"decoder":"/errors","report":"/wallet-report","live":{"source":"These counts come from the live stream of confirmed transactions that touch pump.fun or PumpSwap.","method":"Each transaction contributes its fee once, and a failure belongs to the program that reported it. A successful transaction belongs to the first pump.fun or PumpSwap instruction we could identify. An instruction is one step in a transaction, and its attempts include transactions that failed at a later step. The fees include the extra amount paid for priority, and one billion lamports make one SOL.","payers":"Each minute counts a sender once per instruction and outcome, and adding minutes could count the same sender twice.","updated_at":"2026-11-27 08:07:28 UTC","periods_end_at":"2026-11-27 08:07:00 UTC","windows":{"hour":{"start":"2026-11-27 07:07:00 UTC","end":"2026-11-27 08:07:00 UTC","status":"complete","errors":[{"program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","code":"6040","transactions":8849,"fee_lamports":176977591,"instructions":[{"program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","instruction":"BuyExactQuoteIn","outcome":"6040","transactions":5393,"fee_lamports":59155057,"priority_lamports":32160057,"attempts":145777,"share":0.0369948620152699},{"program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","instruction":"BuyExactQuoteInV2","outcome":"6040","transactions":3456,"fee_lamports":117822534,"priority_lamports":100527534,"attempts":20673,"share":0.1671745755333043}],"has_attempts":true}]},"day":{"start":"2026-11-26 08:07:00 UTC","end":"2026-11-27 08:07:00 UTC","status":"partial","errors":[{"program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","code":"6040","transactions":2895706,"fee_lamports":56721134095,"instructions":[{"program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","instruction":"BuyExactQuoteIn","outcome":"6040","transactions":1151767,"fee_lamports":18923673023,"priority_lamports":13163163023,"attempts":4324016,"share":0.26636511058238455},{"program":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","instruction":"BuyExactQuoteInV2","outcome":"6040","transactions":1743939,"fee_lamports":37797461072,"priority_lamports":29075616072,"attempts":2795990,"share":0.6237286256388613}],"has_attempts":true}],"missing_seconds":1.2,"gaps":[{"start":"2026-11-26 16:59:28 UTC","end":"2026-11-26 16:59:30 UTC"},{"start":"2026-11-26 16:59:29 UTC","end":"2026-11-26 16:59:30 UTC"}]}}},"live_url":"/errors/live.json"}