jeremylongshore/tons-of-skills-marketplace / plugins/crypto/dex-aggregator-router/skills/routing-dex-trades
routing-dex-trades
VerifiedRoute 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".
| File | Kind | Size |
|---|---|---|
| ARD.md | markdown | 21.4 KB |
| PRD.md | markdown | 8.0 KB |
| SKILL.md | skill md | 4.4 KB |
| config/settings.yaml | config | 2.8 KB |
| references/errors.md | markdown | 4.7 KB |
| references/examples.md | markdown | 8.5 KB |
| references/implementation.md | markdown | 3.2 KB |
| scripts/dex_router.py | script | 9.7 KB |
| scripts/formatters.py | script | 18.9 KB |
| scripts/mev_assessor.py | script | 13.7 KB |
| scripts/quote_fetcher.py | script | 16.3 KB |
| scripts/route_optimizer.py | script | 10.5 KB |
| scripts/split_calculator.py | script | 11.4 KB |
config/settings.yaml
View on GitHub# DEX Aggregator Router Configuration
# API Keys (optional - increases rate limits)
# Set via environment variables for security:
# export ONEINCH_API_KEY=your-key
# export ZEROX_API_KEY=your-key
api_keys:
oneinch: ${ONEINCH_API_KEY}
zerox: ${ZEROX_API_KEY}
paraswap: null # No auth required
# Default chain for routing
default_chain: ethereum
# Supported chains
chains:
ethereum:
chain_id: 1
native_token: ETH
rpc_url: https://eth-mainnet.g.alchemy.com/v2/demo
gas_oracle: https://api.etherscan.io/api?module=gastracker&action=gasoracle
arbitrum:
chain_id: 42161
native_token: ETH
rpc_url: https://arb-mainnet.g.alchemy.com/v2/demo
polygon:
chain_id: 137
native_token: MATIC
rpc_url: https://polygon-mainnet.g.alchemy.com/v2/demo
optimism:
chain_id: 10
native_token: ETH
rpc_url: https://opt-mainnet.g.alchemy.com/v2/demo
# Aggregator configuration
aggregators:
1inch:
enabled: true
base_url: https://api.1inch.dev/swap/v6.0
rate_limit_per_second: 1.0 # 5.0 with API key
timeout_seconds: 10
priority: 1
paraswap:
enabled: true
base_url: https://apiv5.paraswap.io
rate_limit_per_second: 10.0
timeout_seconds: 10
priority: 2
zerox:
enabled: true
base_url: https://api.0x.org/swap/v1
rate_limit_per_second: 3.0 # 10.0 with API key
timeout_seconds: 10
priority: 3
# Trade size thresholds (USD)
trade_thresholds:
small_trade_max: 1000
medium_trade_max: 10000
large_trade_max: 100000
# Above large_trade_max = whale trade
# Split order settings
split_orders:
min_trade_size_usd: 5000 # Don't split below this
max_venues: 4 # Maximum DEXs to split across
min_allocation_pct: 10 # Minimum % per venue
# MEV risk settings
mev_risk:
weights:
trade_size: 0.35
price_impact: 0.25
route_complexity: 0.15
token_volatility: 0.15
liquidity_depth: 0.10
thresholds:
low: 25
medium: 50
high: 75
# Gas settings
gas:
default_price_gwei: 30
max_gas_pct_of_trade: 2.0 # Warn if gas > 2% of trade value
# Price defaults
prices:
default_eth_usd: 2500
default_btc_usd: 45000
default_matic_usd: 0.80
# Quote settings
quotes:
validity_seconds: 30
cache_ttl_seconds: 15
# Output settings
output:
default_format: table # table, json, csv
use_color: true
decimal_places: 2
# Logging
logging:
level: INFO # DEBUG, INFO, WARNING, ERROR
file: null # Set to path for file logging
# Token address mappings (commonly used)
# Full list in quote_fetcher.py
tokens:
ethereum:
ETH: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
WETH: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
USDT: "0xdAC17F958D2ee523a2206206994597C13D831ec7"
DAI: "0x6B175474E89094C44Da98b954EescdDEAC495271"
WBTC: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |