Token Swap Best Practices
A practical guide for AI agents helping users execute safe, efficient token swaps.
DEX Aggregators
Aggregators split your trade across multiple liquidity sources for the best price.
| Aggregator |
Strengths |
Chains |
| 1inch |
Most liquidity sources, limit orders |
Ethereum, Arbitrum, Polygon, BSC, + |
| 0x (Matcha) |
Professional-grade, RFQ system |
Ethereum, Arbitrum, Polygon, + |
| Paraswap |
MEV protection, gasless swaps |
Ethereum, Arbitrum, Polygon, + |
| Jupiter |
Best for Solana |
Solana |
| CowSwap |
Batch auctions (MEV-free) |
Ethereum, Arbitrum |
Always prefer aggregators over single DEXs — they find better prices by checking multiple sources.
Slippage Settings
Slippage tolerance = how much price movement you'll accept.
| Setting |
When to Use |
Risk |
| 0.1–0.3% |
Stablecoin pairs |
May fail on volatile tokens |
| 0.5% |
Standard swaps |
Good default |
| 1.0% |
Low-liquidity tokens |
Higher MEV exposure |
| 3–5% |
Very low liquidity |
Significant MEV risk |
| >5% |
Almost never |
Extreme MEV vulnerability |
Default recommendation: 0.5% for most swaps.
When Swaps Fail
If a swap fails with "insufficient output":
- Try slightly higher slippage (0.5% → 1.0%)
- Check if the token has transfer taxes (some meme tokens have 5–10% tax)
- Try a smaller amount
- Wait — price may be moving rapidly
Gas Optimization
Timing
Gas prices fluctuate. For non-urgent swaps:
- Cheapest: Weekends, early UTC morning
- Most expensive: Weekdays during US/EU business hours
- Check: etherscan.io/gastracker or L2-specific dashboards
Chain Selection
| Chain |
Typical Swap Cost |
Speed |
| Ethereum L1 |
$5–50+ |
12 sec |
| Arbitrum |
$0.01–0.30 |
2 sec |
| Base |
$0.01–0.20 |
2 sec |
| Polygon |
$0.01–0.05 |
2 sec |
| BSC |
$0.05–0.50 |
3 sec |
| Solana |
$0.001–0.01 |
0.4 sec |
Recommendation: For routine swaps, use L2s like Arbitrum (where Sperax ecosystem lives) for cents-level gas costs.
Cross-Chain Swaps
When you need to move tokens between chains:
Bridge Options
| Bridge |
Supported Chains |
Speed |
Notes |
| Stargate |
15+ chains |
1–5 min |
Most reliable for stablecoins |
| Across |
Ethereum, L2s |
2–10 min |
Fast for ETH/USDC |
| Hop |
Ethereum, L2s |
5–20 min |
Established, reliable |
| LayerZero/Wormhole |
30+ chains |
Varies |
Widest chain support |
Best Practices
- Bridge stablecoins when possible — less slippage risk
- Check bridge liquidity before large transfers
- Double-check destination chain — mistakes are irreversible
- Allow extra time — bridges can be slow during congestion
Common Swap Pitfalls
1. Tax Tokens
Some tokens (especially meme tokens) have built-in transfer taxes:
- 1–10% on every transfer
- Requires higher slippage to account for tax
- Not shown in quoted price
2. Low Liquidity
Signs of low liquidity:
- Large spread between buy/sell price
2% price impact on your trade size
- Few liquidity sources on aggregator
3. Front-Running / MEV
Your transaction may get sandwiched (see MEV Protection skill).
Mitigations:
- Low slippage tolerance
- Private transaction submission (Flashbots)
- Limit orders instead of market swaps
- Batch auctions (CowSwap)
4. Approval Issues
Before swapping, you must approve the router to spend your tokens:
- First swap with a token requires an approval transaction
- Consider using exact-amount approvals for security
- See Token Approval Safety skill for details
Swap Checklist
Before every swap:
Agent Tips
- Always quote before executing — show the expected output and price impact
- Warn about high price impact — >2% impact suggests splitting the trade
- Recommend L2s for small swaps — don't pay Ethereum L1 gas for small trades
- For large swaps ($10K+) — suggest splitting, using aggregators, and low slippage
- Cross-chain: bridge stablecoins first, then swap on destination chain
- Sperax ecosystem users should swap on Arbitrum for lowest costs
Links
1---2name: token-swap-best-practices3description: Best practices for token swaps — DEX aggregator comparison, slippage management, gas optimization, cross-chain swaps, and common pitfalls. Use when helping users execute swaps, choose DEXs, or troubleshoot failed transactions.4license: MIT5---67# Token Swap Best Practices89A practical guide for AI agents helping users execute safe, efficient token swaps.1011## DEX Aggregators1213Aggregators split your trade across multiple liquidity sources for the best price.1415| Aggregator | Strengths | Chains |16|-----------|-----------|--------|17| 1inch | Most liquidity sources, limit orders | Ethereum, Arbitrum, Polygon, BSC, + |18| 0x (Matcha) | Professional-grade, RFQ system | Ethereum, Arbitrum, Polygon, + |19| Paraswap | MEV protection, gasless swaps | Ethereum, Arbitrum, Polygon, + |20| Jupiter | Best for Solana | Solana |21| CowSwap | Batch auctions (MEV-free) | Ethereum, Arbitrum |2223**Always prefer aggregators over single DEXs** — they find better prices by checking multiple sources.2425## Slippage Settings2627Slippage tolerance = how much price movement you'll accept.2829| Setting | When to Use | Risk |30|---------|-------------|------|31| 0.1–0.3% | Stablecoin pairs | May fail on volatile tokens |32| 0.5% | Standard swaps | Good default |33| 1.0% | Low-liquidity tokens | Higher MEV exposure |34| 3–5% | Very low liquidity | Significant MEV risk |35| >5% | Almost never | Extreme MEV vulnerability |3637**Default recommendation**: 0.5% for most swaps.3839### When Swaps Fail4041If a swap fails with "insufficient output":421. Try slightly higher slippage (0.5% → 1.0%)432. Check if the token has transfer taxes (some meme tokens have 5–10% tax)443. Try a smaller amount454. Wait — price may be moving rapidly4647## Gas Optimization4849### Timing5051Gas prices fluctuate. For non-urgent swaps:52- **Cheapest**: Weekends, early UTC morning53- **Most expensive**: Weekdays during US/EU business hours54- **Check**: etherscan.io/gastracker or L2-specific dashboards5556### Chain Selection5758| Chain | Typical Swap Cost | Speed |59|-------|------------------|-------|60| Ethereum L1 | $5–50+ | 12 sec |61| Arbitrum | $0.01–0.30 | 2 sec |62| Base | $0.01–0.20 | 2 sec |63| Polygon | $0.01–0.05 | 2 sec |64| BSC | $0.05–0.50 | 3 sec |65| Solana | $0.001–0.01 | 0.4 sec |6667**Recommendation**: For routine swaps, use L2s like **Arbitrum** (where Sperax ecosystem lives) for cents-level gas costs.6869## Cross-Chain Swaps7071When you need to move tokens between chains:7273### Bridge Options7475| Bridge | Supported Chains | Speed | Notes |76|--------|-----------------|-------|-------|77| Stargate | 15+ chains | 1–5 min | Most reliable for stablecoins |78| Across | Ethereum, L2s | 2–10 min | Fast for ETH/USDC |79| Hop | Ethereum, L2s | 5–20 min | Established, reliable |80| LayerZero/Wormhole | 30+ chains | Varies | Widest chain support |8182### Best Practices83841. **Bridge stablecoins when possible** — less slippage risk852. **Check bridge liquidity** before large transfers863. **Double-check destination chain** — mistakes are irreversible874. **Allow extra time** — bridges can be slow during congestion8889## Common Swap Pitfalls9091### 1. Tax Tokens9293Some tokens (especially meme tokens) have built-in transfer taxes:94- 1–10% on every transfer95- Requires higher slippage to account for tax96- Not shown in quoted price9798### 2. Low Liquidity99100Signs of low liquidity:101- Large spread between buy/sell price102- >2% price impact on your trade size103- Few liquidity sources on aggregator104105### 3. Front-Running / MEV106107Your transaction may get sandwiched (see MEV Protection skill).108109**Mitigations**:110- Low slippage tolerance111- Private transaction submission (Flashbots)112- Limit orders instead of market swaps113- Batch auctions (CowSwap)114115### 4. Approval Issues116117Before swapping, you must approve the router to spend your tokens:118- First swap with a token requires an approval transaction119- Consider using exact-amount approvals for security120- See Token Approval Safety skill for details121122## Swap Checklist123124Before every swap:125- [ ] Verify token contract address (not a scam token)126- [ ] Check price impact (<2% for most trades)127- [ ] Set appropriate slippage (0.5% default)128- [ ] Compare price across 2+ aggregators for large trades129- [ ] Consider gas costs vs trade size (don't pay $10 gas for a $50 swap)130- [ ] Check if you need an approval transaction first131132## Agent Tips1331341. **Always quote before executing** — show the expected output and price impact1352. **Warn about high price impact** — >2% impact suggests splitting the trade1363. **Recommend L2s for small swaps** — don't pay Ethereum L1 gas for small trades1374. **For large swaps ($10K+)** — suggest splitting, using aggregators, and low slippage1385. **Cross-chain**: bridge stablecoins first, then swap on destination chain1396. **Sperax ecosystem** users should swap on Arbitrum for lowest costs140141## Links142143- 1inch: https://1inch.io144- CowSwap: https://swap.cow.fi145- Sperax App (Arbitrum): https://app.sperax.io146- Arbiscan Gas: https://arbiscan.io/gastracker