REFUNDED
and includes a failReason
field that explains why the refund occurred. Understanding these reasons helps you build better error handling and improve user experience.
How Refund Reasons Work
When you check the status of a quote using the Get Execution Status endpoint, refunded quotes include additional context:Fail Reason Types
SLIPPAGE
What it means: The market price moved beyond your configured slippage tolerance during execution. Common causes:- High market volatility
- Large order size relative to liquidity
- Delayed execution
- Retry with a fresh quote for current prices
- Increase slippage tolerance if appropriate for your use case
- Execute quotes more quickly after generation
INSUFFICIENT_BALANCE
What it means: The user doesn’t have enough tokens to complete the swap. Common causes:- User moved tokens after quote generation
- Concurrent transactions used the same tokens
- Gas fees reduced available balance
- Check user’s current token balance
- Verify tokens aren’t locked in other protocols
- Account for gas fees in balance calculations
TIMEOUT
What it means: Quote execution exceeded the time limit. Common causes:- Network congestion causing delays
- Quote executed too long after generation
- Multi-chain coordination timeouts
- Generate a new quote and execute promptly
- Check for network congestion
- Use shorter expiration times during high volatility
GAS_TOO_LOW
What it means: Insufficient gas was provided for transaction execution. Common causes:- Gas limit set too low
- Complex multi-step operations require more gas
- Network gas price fluctuations
- Increase gas limit for the transaction
- Check current network gas prices
- Use dynamic gas estimation
EXECUTION_FAILED
What it means: On-chain execution failed due to smart contract issues. Common causes:- Token has transfer restrictions
- Smart contract logic prevented execution
- Invalid transaction data
- Verify token compatibility and restrictions
- Check if tokens are paused or have special rules
- Review transaction parameters for correctness
INSUFFICIENT_LIQUIDITY
What it means: Not enough liquidity available to execute the swap at the quoted size. Common causes:- Large order relative to available liquidity
- Liquidity providers removed funds
- Market conditions changed significantly
- Reduce swap amount
- Split large swaps into smaller transactions
- Try alternative routing paths
- Wait for liquidity conditions to improve
REVERTED
What it means: The blockchain transaction was reverted during execution. Common causes:- Token contract restrictions
- Insufficient gas fees
- Smart contract validation failures
- Check token-specific requirements (fees, whitelist, etc.)
- Ensure sufficient native tokens for gas
- Verify contract interaction parameters
PRICE_IMPACT_TOO_HIGH
What it means: The swap would cause excessive price movement in the liquidity pool. Common causes:- Large order size relative to pool depth
- Low liquidity tokens
- Market maker protections triggered
- Reduce swap amount to minimize impact
- Split large orders across multiple transactions
- Consider alternative tokens with better liquidity
INVALID_PATH
What it means: No valid routing path exists between source and destination tokens. Common causes:- Tokens lack direct liquidity pairs
- Routing algorithms couldn’t find efficient path
- New or illiquid tokens
- Verify both tokens are actively traded
- Try alternative token pairs
- Check if tokens are deprecated or delisted
APPROVAL_FAILED
What it means: Token approval process failed or was insufficient. Common causes:- User rejected approval transaction
- Approval amount insufficient for swap + fees
- Pending approval transaction not confirmed
- Retry token approval process
- Ensure approval amount covers swap + fees
- Check for pending approval transactions
NETWORK_CONGESTION
What it means: High network activity caused transaction failures or timeouts. Common causes:- Network experiencing high traffic
- Gas price too low during congestion
- Mempool delays
- Wait for network conditions to improve
- Increase gas price for faster processing
- Monitor network status before retrying
N/A
What it means: No specific fail reason was provided by the system. Common causes:- Unexpected system errors
- Legacy quote formats
- Unknown failure modes
- Contact support with quote ID for investigation
- Try generating a fresh quote
- Check system status for known issues
Best Practices
1. Implement Error Handling
2. User-Friendly Error Messages
Translate technical fail reasons into clear, actionable messages:3. Automatic Retry Logic
For certain fail reasons, implement smart retry mechanisms:4. Monitor Fail Reason Patterns
Track fail reasons to identify trends and optimize your integration:Related Resources
Error Handling
Complete guide to API error handling including HTTP errors and business logic failures
Transaction Lifecycle
Understand the complete journey of a quote from creation to completion
Quote Examples
Working examples of quote generation and execution with proper error handling
Slippage Guide
Deep dive into slippage tolerance and price impact management
Error Codes
Complete reference of all fail reason codes with troubleshooting steps