routing-dex-trades
/routing-dex-trades
Kieruje transakcje przez wiele giełd DEX, by znaleźć optymalne ceny przy minimalnym poślizgu i kosztach gazu: porównanie cen, trasy swapów, wpływ na cenę, dzielenie zleceń i ryzyko MEV.
- Autor
- jeremylongshore ↗
- Repozytorium
- tons-of-skills-marketplace ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 26.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 13
- Skrypty
- 6
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 4
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 6 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/dex_router.py, scripts/formatters.py, scripts/mev_assessor.py, scripts/quote_fetcher.py, scripts/route_optimizer.py, scripts/split_calculator.py
Co robi i kiedy
Kieruje transakcje przez wiele giełd DEX, by znaleźć optymalne ceny przy minimalnym poślizgu i kosztach gazu: porównanie cen, trasy swapów, wpływ na cenę, dzielenie zleceń i ryzyko MEV.
Wyzwalacze z opisu
Oryginalny opis (EN)
Route 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".
Jak działa
- Contents
- Overview
- Prerequisites
- Instructions
- Output
- Error Handling
- Examples
- Resources
Podgląd SKILL.md
---
name: routing-dex-trades
description: 'Route 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".
'
allowed-tools: Read, Write, Edit, Grep, Glob, Bash(crypto:dex-*)
version: 1.26.0
author: Jeremy Longshore <jeremy@intentsolutions.io>
license: MIT
tags:
- crypto
- cost-optimization
- routing-dex
compatibility: Designed for Claude Code
---
# Routing DEX Trades
## Contents
[Overview](#overview) | [Prerequisites](#prerequisites) | [Instructions](#instructions) | [Output](#output) | [Error Handling](#error-handling) | [Examples](#examples) | [Resources](#resources)
## Overview
Optimal trade routing across decentralized exchanges by aggregating quotes from 1inch, Paraswap, and 0x. Discovers multi-hop routes, calculates split orders for large trades, and assesses MEV risk to minimize slippage and gas costs.
## Prerequisites
1. Install Python 3.9+ with `httpx`, `pydantic`, and `rich` packages
2. Verify network access to aggregator APIs (1inch, Paraswap, 0x)
3. Optionally add API keys for 1inch and 0x (higher rate limits)
4. Copy settings: `cp ${CLAUDE_SKILL_DIR}/config/settings.yaml.example ${CLAUDE_SKILL_DIR}/config/settings.yaml`
## Instructions
1. Get a quick quote for the single best price with gas cost and effective rate:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 1.0
```
2. Compare all DEXs to see quotes ranked by effective rate (after gas):
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 5.0 --compare
```
3. Analyze multi-hop routes to compare direct vs. multi-hop (2-3 pools) with hop-by-hop breakdown:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 10.0 --routes
```
4. Split large orders ($10K+) across multiple DEXs to minimize total price impact:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 100.0 --split
```
5. Assess MEV risk (sandwich attack risk score: LOW/MEDIUM/HIGH) before executing:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 50.0 --mev-check
```
6. Run full analysis combining all features for comprehensive output:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 25.0 --full --output json
```
## Output
- **Quick Quote**: Best price, output amount, gas cost, recommended venue
- **Comparison**: All venues ranked by effective rate with price impact and gas
- **Route Analysis**: Direct vs. multi-hop with hop-by-hop breakdown
- **Split Mode**: Optimal allocation percentages with dollar savings vs. single-venue
- **MEV Assessment**: Risk score, exposure estimate, protection recommendations
See [`references/implementation.md`](references/implementation.md) for detailed output examples.
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| API Rate Limited | Too many requests | Wait 60s or add API key for higher limits |
| Quote Expired | Stale price data | Refresh before execution; quotes valid ~30s |
| No Route Found | Low liquidity token | Try larger DEXs or reduce trade size |
| Network Timeout | Aggregator down | Retry or check aggregator status page |
See [`references/errors.md`](references/errors.md) for comprehensive error handling.
## Examples
**Compare prices for a 5 ETH swap:**
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 5.0 --compare
```
**Find optimal split for a large order:**
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 100.0 --split
```
**Check MEV risk before executing:**
```bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 50.0 --mev-check
```
See [`references/examples.md`](references/examples.md) for multi-hop discovery and MEV-protected execution examples.
## Resources
- [`references/implementation.md`](references/implementation.md) - Trade size guide, split optimization, MEV scoring, API config
- [1inch API](https://docs.1inch.io/) - Primary aggregator
- [Paraswap API](https://developers.paraswap.network/) - Secondary aggregator
- [0x API](https://0x.org/docs/api) - Third aggregator
- [Flashbots Protect](https://docs.flashbots.net/flashbots-protect/overview) - MEV protection
Pliki w paczce (13)
- ARD.md 21 KB
- PRD.md 8 KB
- SKILL.md 4 KB
- config/settings.yaml 3 KB
- references/errors.md 5 KB
- references/examples.md 9 KB
- references/implementation.md 3 KB
- scripts/dex_router.py 10 KB
- scripts/formatters.py 19 KB
- scripts/mev_assessor.py 14 KB
- scripts/quote_fetcher.py 16 KB
- scripts/route_optimizer.py 11 KB
- scripts/split_calculator.py 11 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · jeremylongshore/tons-of-skills-marketplace | 100 | MIT |
| HelixDevelopment/agent | 100 | MIT |
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 28.10.2026 · wersja paczki 0f6765770150 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90token-swap-best-practices
Podpowiada, jak wykonywać wymiany tokenów: porównuje agregatory DEX, pilnuje poślizgu i gazu, obsługuje wymiany między łańcuchami i diagnozuje nieudane transakcje. - 87okx-dex-swap
Wymienia tokeny między łańcuchami, podaje wycenę i najtańszą trasę przez agregator OKX z ochroną przed poślizgiem ceny. - 90okx-dex-swap
Obsługuje pełny przepływ wymiany tokenów przez API OKX DEX Aggregator v6: pobranie danych transakcji, podpis i wysyłkę, z ochroną przed poślizgiem i MEV. - 100optimizing-gas-fees
Optymalizuje koszty gazu w blockchainie przez analizę cen, wzorców i czasu, przy sprawdzaniu cen gazu, szacowaniu kosztów i szukaniu optymalnych okien transakcji. - 100optimizing-gas-fees
Przewiduje optymalne ceny gazu i moment transakcji, aby zminimalizować koszty transakcji w blockchainie. - 100analyzing-mempool
Monitoruje mempool blockchaina pod kątem oczekujących transakcji, analizy opłat gas i okazji MEV.