Router Reference
The Ryze Router is a Go server that computes optimal swap and join routes across Ryze pools in real-time.
Base URL
https://mainnet.router.ryze.proEndpoints
| Method | Path | Description |
|---|---|---|
POST | /quote | Get swap quote with optimal routing |
POST | /join-quote | Get liquidity add quote |
GET | /bands | Band data for all pools |
GET | /bands-prices/:token | Band quotes for a specific token |
POST | /aggregator/quote | Aggregator-ready quote with calldata |
GET | /health | Service health check |
Key Concepts
Multi-Hop Routing
The router finds the optimal path across multiple pools. A WBTC-to-WETH swap might route through WBTC -> USDC -> WETH if that gives better execution.
Fee Components
Every quote includes a detailed fee breakdown:
| Fee | Description | LP Share |
|---|---|---|
| Swap Fee | Base fee on every swap | 100% |
| Taker Fee | Fixed taker fee | Protocol |
| Slippage Fee | Dynamic fee based on trade size vs. liquidity | 50% |
| WBF (Weight Breaking Fee) | Penalty for imbalancing the pool | 25% |
| WBR (Weight Breaking Reward) | Reward for rebalancing the pool | Paid to trader |
Trade Slicing Protection (TSP)
When userAddress is provided in a quote request, the router applies TSP -- a mechanism that tracks a user's recent trading session and adjusts the Weight Breaking Fee accordingly. This prevents users from slicing large trades into smaller ones to avoid WBF.
WAD Format
All percentages and prices use WAD format where 1e18 = 1.0:
| WAD Value | Human Value |
|---|---|
1000000000000000000 | 1.0 (100%) |
3000000000000000 | 0.003 (0.3%) |
1600000000000000000000 | 1600.0 ($1,600) |
Response Headers
| Header | Description |
|---|---|
X-Processing-Time-Us | Total processing time (microseconds) |
X-Route-Time-Us | Route-finding time (microseconds) |
Error Format
json
{
"error": "description of what went wrong"
}