The pump-swap provider is currently functional but only supports pump.fun bonding curve tokens, not universal token swapping as the name suggests.
// Current provider name suggests universal swapping
'pump-swap': {
// But implementation only works for pump.fun tokens
}- ✅ Works: pump.fun bonding curve tokens (
.pumpaddresses) - ❌ Fails: Standard SPL tokens (SOL, USDC, USDT, BONK, etc.)
- ❌ Fails: Established meme coins not on pump.fun
// Uses PumpPortal API which is pump.fun specific
apiUrl: 'https://pumpportal.fun/api/trade-local'
body: {
pool: 'pump' // ❌ Hardcoded to pump.fun only
}| Provider | Token Support | Use Case |
|---|---|---|
| Jupiter | ✅ All SPL tokens | Universal DEX aggregator |
| Solana Tracker | ✅ All SPL tokens | Analytics-based routing |
| DFlow | ✅ All SPL tokens | Intent-based trading |
| GMGN | ✅ All SPL tokens | Community-driven routing |
| pump-swap | ❌ Only pump.fun tokens | New token launches only |
Accept the current limitation and rename to reflect reality:
// 1. Update type system
export type TradeProvider = 'jupiter' | 'dflow' | 'solana-tracker' | 'gmgn' | 'pump-fun'
// 2. Update provider config
'pump-fun': {
apiUrl: 'https://pumpportal.fun/api',
scope: 'Pump.fun bonding curve tokens only',
rpcUrl: 'https://pump-fe.helius-rpc.com/?api-key=...'
}
// 3. Update UI
case 'pump-fun': return '🚀' // Keep same iconBenefits:
- ✅ Honest about capabilities
- ✅ No breaking functionality
- ✅ Clear user expectations
- ✅ Fast implementation
Create intelligent routing based on token type:
async function getPumpSwapQuote(request: TradeQuoteRequest): Promise<ProviderQuote> {
// Detect if token is pump.fun bonding curve token
if (isPumpFunToken(request.outputMint)) {
return await getPumpFunQuote(request) // Use PumpPortal API
} else {
return await getJupiterQuote(request) // Use Jupiter for everything else
}
}
function isPumpFunToken(mint: string): boolean {
// Check if token address ends with "pump" or is known pump.fun token
return mint.endsWith('pump') || KNOWN_PUMP_TOKENS.has(mint)
}Benefits:
- ✅ Universal token support
- ✅ Specialized pump.fun handling
- ✅ Maintains "pump-swap" name accuracy
⚠️ Complex implementation
Find or build a real universal PumpSwap AMM API:
'pump-swap': {
// Hypothetical universal PumpSwap API
apiUrl: 'https://api.pumpswap.com/v1',
endpoints: {
quote: '/quote', // For any token pair
pools: '/pools', // Pool information
routes: '/routes' // Route optimization
}
}Challenges:
- ❌ No known universal PumpSwap API exists
- ❌ Would require building custom API
- ❌ Significant development effort
The most pragmatic solution is Option 1: Honest Renaming
- Rename Provider:
'pump-swap'→'pump-fun' - Update Documentation: Clearly state "pump.fun tokens only"
- Maintain Functionality: Keep all current PumpPortal integration
- Add Token Detection: Warn users when trying non-pump.fun tokens
// src/types/index.ts
export type TradeProvider = 'jupiter' | 'dflow' | 'solana-tracker' | 'gmgn' | 'pump-fun'
// src/utils/trade-comparison.ts
'pump-fun': {
apiUrl: 'https://pumpportal.fun/api',
rpcUrl: 'https://pump-fe.helius-rpc.com/?api-key=...',
scope: 'Pump.fun bonding curve tokens only'
}
// src/components/TradeComparison.tsx
case 'pump-fun': return '🚀'Once Option 1 is complete, we can enhance with intelligent routing:
async function getUniversalPumpSwapQuote(request: TradeQuoteRequest): Promise<ProviderQuote> {
try {
// First, try pump.fun for bonding curve tokens
if (isPumpFunToken(request.outputMint)) {
const pumpQuote = await getPumpFunQuote(request)
if (pumpQuote.success) return pumpQuote
}
// Fallback to Jupiter for all other tokens
return await getJupiterQuote(request)
} catch (error) {
return createErrorQuote(request, error)
}
}- ✅ Clear user expectations
- ✅ No confused users trying SOL/USDC on pump-swap
- ✅ Accurate provider naming
- ✅ Maintained functionality for pump.fun tokens
- ✅ Universal token support
- ✅ Best-of-both-worlds approach
- ✅ Specialized pump.fun optimization
- ✅ Competitive with other providers
The current pump-swap provider is working correctly but misnamed. It's a specialized pump.fun provider, not a universal token swapper.
Immediate Action: Rename to pump-fun for honesty and clarity.
Future Enhancement: Add intelligent routing for universal support.
This approach provides:
- Immediate clarity about capabilities
- Preserved functionality for pump.fun use cases
- Future path toward universal support
- Better user experience with accurate expectations
🎯 Bottom Line: The provider should be named pump-fun to accurately reflect its pump.fun-only capabilities, with future enhancement for universal token support.