dexhunter-swap
Installation
SKILL.md
DexHunter Swap Aggregator
Find the best swap rate across all Cardano DEXes via DexHunter's smart routing.
Capabilities
- Estimate swaps with multi-DEX routing and price impact
- Build optimized swap transactions
- Search and discover Cardano tokens
- Get price data across DEXes
Flow
- Search token — find the token ID by ticker or name
- Estimate swap — see routing, price impact, and expected output across DEXes
- Confirm with user — show route breakdown and fees
- Build transaction — get unsigned CBOR hex
- Hand off to operator — for signing and submission
Scripts
Search Tokens
node scripts/search-tokens.js --query MNT
Estimate Swap
node scripts/estimate-swap.js --token-in "" --token-out <policyId+assetHex> --amount <lovelace>
Note: DexHunter uses base units (lovelace for ADA), unlike SaturnSwap.
Build Swap
node scripts/build-swap.js --address <bech32> --token-in "" --token-out <id> --amount <lovelace> [--slippage 1]
Key Concepts
- Token IDs:
""for ADA,policyId + assetNameHexfor tokens - Amounts are in smallest units (lovelace for ADA, base units for tokens)
- Routing shows which DEXes are used and what percentage goes to each
price_impactindicates market impact — warn if >2%- Requires
DEXHUNTER_API_KEYenvironment variable
Safety Rules
- Always show the estimate before building
- Warn on price impact >2%
- Show which DEXes are being routed through
- Compare with SaturnSwap direct if the pair exists there
Related skills