Skip to content

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.pro

Endpoints ​

MethodPathDescription
POST/quoteGet swap quote with optimal routing
POST/join-quoteGet liquidity add quote
GET/bandsBand data for all pools
GET/bands-prices/:tokenBand quotes for a specific token
POST/aggregator/quoteAggregator-ready quote with calldata
GET/healthService 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:

FeeDescriptionLP Share
Swap FeeBase fee on every swap100%
Taker FeeFixed taker feeProtocol
Slippage FeeDynamic fee based on trade size vs. liquidity50%
WBF (Weight Breaking Fee)Penalty for imbalancing the pool25%
WBR (Weight Breaking Reward)Reward for rebalancing the poolPaid 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 ValueHuman Value
10000000000000000001.0 (100%)
30000000000000000.003 (0.3%)
16000000000000000000001600.0 ($1,600)

Response Headers ​

HeaderDescription
X-Processing-Time-UsTotal processing time (microseconds)
X-Route-Time-UsRoute-finding time (microseconds)

Error Format ​

json
{
  "error": "description of what went wrong"
}