How AMM DEX Connectors Work
AMM DEX connectors operate through the Gateway middleware, which provides standardized interfaces to different DeFi protocols:Gateway Middleware
TypeScript-based API layer that translates Hummingbot commands to protocol-specific calls
Liquidity Pools
Trade against algorithmic liquidity pools instead of order books
Multi-Chain Support
Connect to AMMs across Ethereum, Polygon, Avalanche, Solana, and more
Smart Routing
DEX aggregators automatically find optimal swap paths across multiple pools
AMM Sub-Types
- Router (DEX Aggregators)
- AMM (Constant Product)
- CLMM (Concentrated Liquidity)
Smart routing protocols that find optimal trade paths:How they work:
- Split trades across multiple DEXs and pools
- Optimize for best price execution
- Minimize slippage and price impact
- Compare routes in real-time
Installing Gateway
Gateway is required for all AMM DEX connectors:Configure Gateway certificates
For production use with HTTPS:
Gateway runs in development mode (HTTP) by default. Use
DEV=false for production HTTPS mode.Connect wallet to Gateway
Configure your wallet for the desired blockchain:Enter your private key when prompted.
Router (DEX Aggregator) Connectors
DEX aggregators find optimal swap routes across multiple AMMs:0x Protocol
0x Protocol
Connector ID:
0xProfessional-grade DEX aggregator across EVM chains.Features:- Aggregates 100+ DEXs on supported chains
- Smart order routing (SOR)
- RFQ (Request for Quote) from market makers
- Multi-chain support (Ethereum, Polygon, BSC, Arbitrum, etc.)
Jupiter
Jupiter
Connector ID:
jupiterLeading DEX aggregator on Solana.Features:- Aggregates all major Solana DEXs
- Advanced routing algorithms
- Extremely low fees
- High-speed execution
- Limit orders via Jupiter
Uniswap Router
Uniswap Router
Connector ID:
uniswap (auto-routing mode)Uniswap’s smart order router.Features:- Routes across V2 and V3 pools
- Multi-hop optimization
- Gas-optimized routing
- Best price execution
AMM (Constant Product) Connectors
Traditional AMMs using constant product (x*y=k) formula:Balancer
Connector ID:
balancerMulti-token pools with customizable weights.Networks: Ethereum, Polygon, ArbitrumDocsCurve
Connector ID:
curveStablecoin-optimized AMM with low slippage.Networks: Ethereum, Polygon, Arbitrum, OptimismDocsPancakeSwap
QuickSwap
Raydium
SushiSwap
Connector ID:
sushiswapMulti-chain AMM fork of Uniswap V2.Networks: Ethereum, Polygon, Arbitrum, AvalancheDocsTrader Joe
Uniswap V2
CLMM (Concentrated Liquidity) Connectors
Advanced AMMs with custom price range liquidity:Meteora
Meteora
Connector ID:
meteoraDynamic liquidity pools on Solana.Features:- Dynamic fee tiers
- Concentrated liquidity
- Multi-token pools
- High capital efficiency
Raydium CLMM
Raydium CLMM
Connector ID:
raydium (CLMM mode)Concentrated liquidity on Solana.Features:- Custom price ranges
- Multiple fee tiers
- Integrated with Raydium AMM
- High yields for LPs
Uniswap V3
Uniswap V3
Connector ID:
uniswap (V3 mode)Industry-leading concentrated liquidity protocol.Features:- Custom price ranges
- Multiple fee tiers (0.01%, 0.05%, 0.3%, 1%)
- NFT position tokens
- Superior capital efficiency
Supported Features by Sub-Type
| Feature | Router | AMM | CLMM |
|---|---|---|---|
| Token swaps | Yes | Yes | Yes |
| Liquidity provision | No | Yes | Yes |
| Custom price ranges | No | No | Yes |
| Multi-hop routing | Yes | Limited | Limited |
| Fee tiers | N/A | Fixed | Multiple |
| Price impact | Minimized | Higher | Lower |
| Gas optimization | Yes | Standard | Standard |
Trading on AMM DEXs
Understanding Slippage
AMMs experience price impact from trades:Slippage Factors
- Pool liquidity depth
- Trade size relative to pool
- Price volatility
- Network congestion (gas prices)
Gas Fees on AMM DEXs
Gas costs vary significantly by network:| Network | Typical Swap Cost | Liquidity Add/Remove |
|---|---|---|
| Ethereum | $5-50 | $20-100 |
| Polygon | $0.01-0.10 | $0.05-0.30 |
| Arbitrum | $0.10-1.00 | $0.50-3.00 |
| Optimism | $0.10-1.00 | $0.50-3.00 |
| BSC | $0.10-0.50 | $0.30-1.50 |
| Avalanche | $0.50-2.00 | $1.00-5.00 |
| Solana | $0.0001-0.001 | $0.001-0.01 |
Gas costs fluctuate with network congestion. Monitor gas prices before executing large trades.
Liquidity Provision
AMM and CLMM connectors support liquidity provision:- Traditional AMM
- Concentrated Liquidity
Provide liquidity to constant product pools:Process:
- Deposit equal value of both tokens
- Receive LP tokens representing your share
- Earn fees from all swaps (pro-rata)
- Withdraw anytime by burning LP tokens
- Impermanent loss from price divergence
- Smart contract risk
- Concentration risk in single pool
Configuration Example
Example Gateway configuration for AMM connector:Multi-Chain Support
AMM connectors support multiple blockchain networks:Ethereum
Mainnet and testnetsHighest liquidity, highest gas
Polygon
Low-cost EVM sidechainFast and cheap transactions
Arbitrum
Optimistic rollup L2Lower fees, Ethereum security
Optimism
Optimistic rollup L2Growing ecosystem
BSC
Binance Smart ChainLarge user base
Avalanche
High-performance L1Fast finality
Solana
High-speed L1Ultra-low fees
Base
Coinbase L2Growing adoption
Next Steps
Gateway Installation
Install and configure Gateway middleware
CLOB DEX
Explore order book DEX connectors
Liquidity Strategies
Learn liquidity provision strategies
Multi-Chain Trading
Cross-chain arbitrage opportunities