Skip to main content

The Routing Layer

Status: Partially implemented. Solana settlement via Jupiter is live. Cross-chain settlement (the sw4p engine) and gasless transactions (Kora) are planned.
AGG (Aggregator) is the routing layer for value movement across the RNDRNTWRK. It abstracts away the complexity of blockchain payments, allowing users to pay with any token on any chain.

Routing Architecture

AGG functions like a DEX aggregator (Jupiter) but for payments, not just swaps. It solves the “n-to-1” problem: Users have n tokens on m chains, but the Merchant wants 1 specific token on 1 chain.

1. The 402 Handshake

The protocol begins when a client hits a gated resource. Server Response (402 Payment Required)

2. Pathfinding

The AGG Client (SDK) calculates the optimal route based on the user’s wallet state. Factors:
  • Gas Cost: Solana (less than $0.001) vs Base vs Polygon.
  • Swap Slippage: If paying with SOL to settle in USDC (routed via Jupiter).
  • Bridge Time: If paying from Base to settle on Solana (via the sw4p engine).
Example Route: User (Base/ETH) -> Uniswap (USDC) -> the sw4p engine Bridge -> Solana (USDC) -> Merchant

3. Solana Settlement (v0 + LUTs)

On Solana, AGG uses Versioned Transactions (v0) and Address Lookup Tables (LUTs) to pack complex logic into a single atomic transaction with sub-2-second finality. Transaction Structure:
  1. Swap Instruction: Jupiter CPI to convert User Token -> USDC.
  2. Fee Instruction: Transfer platform fee to Treasury.
  3. Payment Instruction: Transfer remaining amount to Merchant.
  4. Memo Instruction: Attach orderId for reconciliation.

Fee Structure

AGG enforces a transparent fee model:

Cross-Chain Settlement

For cross-chain payments (e.g., Base -> Solana), AGG utilizes the sw4p engine (Cross-Chain Transfer Protocol).
  1. Burn (Source): User burns USDC on source chain.
  2. Attest: the engine observes and verifies the burn attestation.
  3. Mint (Destination): USDC minted on destination chain and forwarded to Merchant.

Integrations

  • Jupiter: Optimal swap routing on Solana.
  • Kora: Gasless transaction sponsorship, users don’t need SOL for gas.
  • the sw4p engine: Non-custodial cross-chain USDC transfers.