How Jupiter Routing Works
Jupiter queries multiple liquidity sources simultaneously and calculates the optimal path for your swap.Supported DEXs
| DEX | Type | Liquidity |
|---|---|---|
| Orca Whirlpools | CLAMM | High |
| Raydium | AMM | High |
| Meteora | DLMM | Medium |
| Phoenix | CLOB | Medium |
| Lifinity | Proactive MM | Low |
Route Optimization
Jupiter evaluates multiple factors when selecting swap routes:Price Impact
Minimizes price movement caused by your trade size
Liquidity Depth
Prioritizes pools with sufficient liquidity
Fee Structure
Accounts for swap fees across different pools
Route Splitting
Divides large orders across multiple paths
Route Splitting Example
For large swaps, Jupiter automatically splits orders to reduce price impact: Trade: 1000 SOL → USDC Route:- 600 SOL → USDC via Orca Whirlpool (0.3% fee)
- 400 SOL → USDC via Raydium (0.25% fee)
Price Impact Calculation
Price impact measures how much your trade moves the market price:| Impact | Interpretation |
|---|---|
| < 0.1% | Negligible |
| 0.1% - 1% | Low |
| 1% - 3% | Moderate |
| > 3% | High |
Slippage Protection
Slippage is the difference between expected and executed price. Default Slippage: 0.5% (50 basis points) Calculation:minOutputAmount, the transaction reverts.
MEV Protection
Jupiter supports private transaction submission through Jito to prevent:- Sandwich Attacks: Bots front-run and back-run your trade
- Front-Running: Bots execute before your transaction
- Back-Running: Bots profit from price movement you create
MEV protection is enabled by default for swaps over 100 SOL or equivalent value.
Quote Refresh
Jupiter quotes expire after 30 seconds due to price volatility. Bookie automatically refreshes quotes if:- User takes longer than 20 seconds to approve
- Price moves more than 1% during approval
- Network congestion delays transaction
API Integration
Bookie uses Jupiter V6 SDK for route calculation:Performance Metrics
| Metric | Value |
|---|---|
| Route Calculation | ~110ms |
| Quote Refresh | ~85ms |
| Supported Tokens | 15,000+ |
| Average Routes Evaluated | 8-12 |
Supported Token Standards
- SPL Tokens: Standard Solana tokens
- Token-2022: New token standard with extensions
- Wrapped Assets: wSOL, wBTC, wETH
Jupiter Documentation
Learn more about Jupiter’s routing algorithm