Error codes / SPL Token Swap
SPL Token Swap error codes
Every custom error code published by SPL Token Swap, with what it means and what to do about it.
SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8
- 0 · 0x0AlreadyInUse
Swap account already in use
- 1 · 0x1InvalidProgramAddress
Invalid program address generated from bump seed and key
- 2 · 0x2InvalidOwner
Input account owner is not the program address
- 3 · 0x3InvalidOutputOwner
Output pool account owner cannot be the program address
- 4 · 0x4ExpectedMint
Deserialized account is not an SPL Token mint
- 5 · 0x5ExpectedAccount
Deserialized account is not an SPL Token account
- 6 · 0x6EmptySupply
Input token account empty
- 7 · 0x7InvalidSupply
Pool token mint has a non-zero supply
- 8 · 0x8InvalidDelegate
Token account has a delegate
- 9 · 0x9InvalidInput
The program raised this named error and published no further explanation.
- 10 · 0xaIncorrectSwapAccount
Address of the provided swap token account is incorrect
- 11 · 0xbIncorrectPoolMint
Address of the provided pool token mint is incorrect
- 12 · 0xcInvalidOutput
The program raised this named error and published no further explanation.
- 13 · 0xdCalculationFailure
General calculation failure due to overflow or underflow
- 14 · 0xeInvalidInstruction
Invalid instruction
- 15 · 0xfRepeatedMint
Swap input token accounts have the same mint
- 16 · 0x10ExceededSlippage
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.
- 17 · 0x11InvalidCloseAuthority
Token account has a close authority
- 18 · 0x12InvalidFreezeAuthority
Pool token mint has a freeze authority
- 19 · 0x13IncorrectFeeAccount
Pool fee token account incorrect
- 20 · 0x14ZeroTradingTokens
Given pool token amount results in zero trading tokens
- 21 · 0x15FeeCalculationFailure
Fee calculation failed due to overflow, underflow, or unexpected 0
- 22 · 0x16ConversionFailure
Conversion to u64 failed with an overflow or underflow
- 23 · 0x17InvalidFee
The provided fee does not match the program owner's constraints
- 24 · 0x18IncorrectTokenProgramId
The provided token program does not match the token program expected by the swap
- 25 · 0x19UnsupportedCurveType
The provided curve type is not supported by the program owner
- 26 · 0x1aInvalidCurve
The provided curve parameters are invalid
- 27 · 0x1bUnsupportedCurveOperation
The operation cannot be performed on the given curve
- 28 · 0x1cInvalidFeeAccount
The pool fee account is invalid