Architecture
Ryze Protocol consists of several services that integrators interact with:
+-----------+
| Your App |
+-----+-----+
|
+-----------+-----------+-----------+
| | | |
+-----v-----+ +---v---+ +----v----+ +----v----+
| Ryze API | | Router | | Relayer | | Price |
| | | | | | | Proxy |
+------------+ +--------+ +---------+ +---------+Services
Ryze API
Serves pool data, portfolio tracking, analytics, and token metadata.
- Pool states, volume/fee history, APR
- User LP positions and order history
- Protocol-wide analytics and leaderboards
- Token list with oracle feed IDs
Ryze Router
Computes optimal swap and join routes across Ryze pools in real-time.
- Multi-hop swap quotes with fee breakdowns
- Single-asset and proportional join quotes
- Oracle price data (blended Pyth + CEX)
- Aggregator-ready quotes with calldata
Relayer
Executes transactions on behalf of users via signed EIP-712 intents.
- Batches intents for gas-efficient execution
- Handles oracle price data and gas management
- Supports swaps, joins, and exits
Price Proxy
Streams low-latency execution prices used by the protocol.
- Hermes-compatible SSE and REST interface
- Blended Pyth + CEX prices (~200ms updates)
- Drop-in replacement for
hermes.pyth.network
Data Flow
Swap Flow
1. Your app calls Router POST /quote
→ Router finds optimal route, returns amounts + fees
2. User approves MultiHopRouter to spend tokens (ERC-20 approve)
3. User signs an EIP-712 SwapIntent with their wallet
4. Your app submits signed intent to Relayer POST /intents/submit
5. Relayer validates, batches, and executes on-chain
6. Your app polls Relayer GET /intents/:intentId until confirmedJoin Flow
1. Your app calls Router POST /join-quote
→ Router calculates LP shares out + fees
2. User approves MultiHopRouter for deposit tokens
3. User signs a JoinIntent (single) or JoinProportionalIntent
4. Your app submits to Relayer → executes on-chain
5. User receives LP sharesPrice Flow
1. On page load: fetch Price Proxy GET /v2/updates/price/latest
→ Instant price snapshot
2. Connect to Price Proxy SSE /v2/updates/price/stream
→ Live price updates (~200ms cadence)