- Ethereum Virtual Machine
- Solana Virtual Machine
Common Errors
SwapsCannotBePaused
Error: Transaction reverts withSwapsCannotBePaused()Solution: Swaps are currently disabled on the contract. Wait for the PAUSE_ROLE holder to re-enable swaps.TokenNotListed
Error: Transaction reverts withTokenNotListed(address)Solution: The token address you provided is not listed on the contract. Verify the token address against the Key Addresses page.TokenMustBeSwappable
Error: Transaction reverts withTokenMustBeSwappable(address)Solution: The token is listed but currently disabled for swapping. Wait for the PAUSE_ROLE holder to re-enable the token.SlippageExceeded
Error: Transaction reverts withSlippageExceeded()Solution: The output amount after fees and decimal normalization is less than your minAmountOut. Increase your slippage tolerance or re-read the current feeBasisPoints() value and recalculate.AmountOutExceedsAvailableLiquidity
Error: Transaction reverts withAmountOutExceedsAvailableLiquidity(amountOut, availableLiquidity)Solution: Reduce your swap amount. The contract doesn’t have enough output token liquidity (after accounting for reserved amounts) to fulfill the swap.AddressNotInAllowlist
Error: Transaction reverts withAddressNotInAllowlist(address)Solution: The allowlist feature is enabled and your wallet address is not allowlisted. Contact support to be added.CannotSwapSameToken
Error: Transaction reverts withCannotSwapSameToken(address)Solution: You specified the same token address for both tokenIn and tokenOut. Use two different token addresses.ERC-20 approval errors
Error: Transaction reverts duringtransferFrom with no descriptive errorSolution: You need to approve the Stableswapper contract to spend your input tokens before calling swap(). Call approve() on the input token contract first:Insufficient gas
Error: Transaction fails withinsufficient funds for gasSolution: You need Base Sepolia ETH for gas fees. Get testnet ETH from CDP Faucet.What to read next
Production Readiness
Helper functions for validation
Examples
More swap code examples
Reference
Swap instruction parameters
Quickstart
Back to quickstart guide