tessl install github:jeremylongshore/claude-code-plugins-plus-skills --skill routing-dex-tradesRoute trades across multiple DEXs to find optimal prices with minimal slippage and gas costs. Use when comparing DEX prices, finding optimal swap routes, analyzing price impact, splitting large orders, or assessing MEV risk. Trigger with phrases like "find best swap", "compare DEX prices", "route trade", "optimal swap route", "split order", "DEX aggregator", "check slippage", or "MEV protection".
Review Score
85%
Validation Score
13/16
Implementation Score
73%
Activation Score
100%
This skill provides optimal trade routing across decentralized exchanges by aggregating quotes from multiple sources (1inch, Paraswap, 0x), discovering multi-hop routes, calculating split orders for large trades, and assessing MEV risk. It helps traders execute at the best prices while minimizing slippage and gas costs.
Before using this skill, ensure you have:
httpx, pydantic, and rich packages{baseDir}/config/settings.yamlcp {baseDir}/config/settings.yaml.example {baseDir}/config/settings.yamlapi_keys:
oneinch: "your-1inch-api-key" # Optional, increases rate limits
zerox: "your-0x-api-key" # Optionalethereum, arbitrum, polygon, or optimismUse Bash(crypto:dex-router) to get the best price across aggregators:
python {baseDir}/scripts/dex_router.py ETH USDC 1.0This returns the single best route with price, gas cost, and effective rate.
For detailed comparison across all sources:
python {baseDir}/scripts/dex_router.py ETH USDC 5.0 --compareOutput includes quotes from each aggregator with:
For trades where multi-hop might be cheaper:
python {baseDir}/scripts/dex_router.py ETH USDC 10.0 --routesDiscovers and compares:
For whale-sized trades ($10K+), optimize across multiple DEXs:
python {baseDir}/scripts/dex_router.py ETH USDC 100.0 --splitCalculates optimal allocation:
Split Recommendation:
60% via Uniswap V3 (60 ETH → 152,589 USDC)
40% via Curve (40 ETH → 101,843 USDC)
─────────────────────────────────────────────
Total: 254,432 USDC (vs. 251,200 single-venue)
Improvement: +1.28% ($3,232 saved)Check sandwich attack risk before executing:
python {baseDir}/scripts/dex_router.py ETH USDC 50.0 --mev-checkReturns risk score and recommendations:
Combine all features for comprehensive analysis:
python {baseDir}/scripts/dex_router.py ETH USDC 25.0 --full --output jsonSee {baseDir}/references/examples.md for detailed output examples.
The router provides:
Quick Quote Mode:
Comparison Mode:
Route Analysis:
Split Mode:
MEV Assessment:
| Trade Size | Strategy | Notes |
|---|---|---|
| < $1K | Direct quote | Gas may exceed savings from optimization |
| $1K - $10K | Compare + routes | Multi-hop can save 0.1-0.5% |
| $10K - $100K | Split analysis | 2-3 way splits reduce impact |
| > $100K | Full + MEV + private TX | Consider OTC or algorithmic execution |
See {baseDir}/references/errors.md for comprehensive error handling.
Common issues:
See {baseDir}/references/examples.md for detailed examples including: