Tx Doctor / Solana error library / Swap short of input funds
Solana error: Swap short of input funds (Jupiter 6024)
Jupiter's own funds check failed: not enough of the input token for the swap amount, or not enough SOL for fees and rent. Jupiter's docs list exactly those two buckets.
Why it happens
- The input token balance is below the amount being swapped — including decimals rounding if you typed a max amount that the UI rounded up.
- Or the fee payer cannot cover the network fee plus rent for accounts created during the route (intermediate token accounts are often opened and closed mid-route).
- Note the difference from the SPL Token 0x1 error: 6024 is raised by Jupiter before its token transfers, with a clearer message about which bucket is short.
How to fix it
- Check the input token balance and swap slightly less than the maximum — UI "max" buttons are notorious for exceeding the real balance after decimals rounding.
- Top up ~0.01-0.02 SOL in the fee payer wallet so fees plus rent are covered.
- If the input balance looks right, check for a freeze or transfer hook on the token (Token-2022 extensions can block transfers) — the token page will show it.
What it looks like in the logs
Program JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 failed: custom program error: 0x1788 RPC simulation: Transaction simulation failed: Error processing Instruction: custom program error: 0x1788 Wallet UI: "Transaction failed" — custom program error 0x1788 (6024)
One failure, three places it shows up: the raw transaction log, the RPC simulation error, and the wallet's short message. Match on the code, never on the wording.
The same number means something else on another program
Anchor assigns custom error codes by enum order starting at 6000, so this number is local to this program. The rows below show what the very same number means on the other programs.
| Program | 0x1788 = 6024 |
|---|---|
| Pump.fun | Overflow |
What this means for your funds
Solana transactions are atomic: if any instruction fails, every state change in that transaction is reverted, so token balances end exactly where they started. The network fee is still charged, because validators did the work of executing and rejecting it. A failed transaction never moves your tokens to someone else.
Seeing this error right now? Paste your transaction signature and get the exact instruction, program and code that failed.
Diagnose my transaction