custom program error: 0x1
Error·3 min read
The token program reporting that the account does not hold as much as the instruction is trying to move. Adding SOL will not help, because SOL is not what ran out.
In the token program, error 1 is InsufficientFunds, documented as “insufficient funds for the operation requested”. Your wallet may show it as 0x1, as err 1, or simply as “insufficient funds” alongside a simulation failure. Same error, three spellings.
Why does it say insufficient funds when I have SOL?
Because the program reporting the error is the token program, and the funds it is talking about are the token being moved. It is saying the source account does not hold as much of that token as the instruction is trying to transfer, burn or swap.
Your SOL balance is not what ran out, which is why topping up the wallet does not clear it. If adding SOL did fix your problem, you were hitting the rent error instead, which is a different failure with a similar name.
What usually causes it?
A stale balance. The app read your balance, you sold or moved some in another tab or on your phone, and the instruction is still built on the old number. Refresh and rebuild.
A decimals mistake. Token amounts are integers in the raw unit, scaled by the mint's decimals. An off-by-one-decimal bug asks for ten times what you hold and gets rejected. This shows up in scripts far more than in wallets.
A Token-2022 transfer fee. If the mint charges a fee on transfer, sending your exact full balance fails, because the fee has to come out of the same amount. Send slightly less, or use a max or send-all control that accounts for it.
Dust rounding. A displayed balance of 0 is not necessarily a raw balance of 0, and the reverse happens too: the interface rounds up to something you do not actually hold in full.
How do I fix it?
Refresh the page so the app reads current state, then retry with slightly less than the full balance. If you are trying to clear an account completely, use the app's max control rather than typing the number you see, because that control reads the raw amount.
If it keeps failing at any amount, check the account on a block explorer and look at the raw balance rather than the formatted one. That number is the truth, and it is often not what your wallet shows.
I am trying to close the account, not move tokens
Then you are likely to meet 0xb next, which is the token program refusing to close an account that still holds a balance. That one has its own page, and the short version is that you have to empty the account first, by swapping the remainder or burning it.
Which of those two is worth doing depends on whether the remainder has any value left. Burn or swap works through the arithmetic.