How It Works Airdrop Jackpot White Label 🔐 Log in Launch Bot ↗
Documentation — Quoting and Routing on Robinhood Chain (Loxley AI)

The price you see must be the price the chain intends to give you.

How Loxley AI quotes and routes swaps: V2 constant-product math, Uniswap V4 hook-aware quote simulation, multi-endpoint RPC failover, degraded-state rules, and why naive V2 quoting misprices hook pools.

A trading bot lives or dies by a deceptively simple function: given this much input, how much output will the trade actually return? This document describes how Loxley AI answers that question on Robinhood Chain, where liquidity exists as both classic V2-style pairs and Uniswap V4 hook pools.

V2-style quoting

For constant-product pairs the math is well understood: read reserves on-chain, apply the fee, compute output including price impact. We implement the formula against live reserve reads — never cached reserves — because on launch pairs, reserves change every block.

Why V4 hook pools break naive quoting

Uniswap V4 lets a pool's hook modify swaps mid-flight: dynamic fees in either direction, output adjustments in afterSwap, even conditional reverts. A quote computed with constant-product assumptions on a hooked pool is fiction. Our quoter therefore simulates the swap including hook behavior — the displayed number is what the composed pool+hook system returns, not what textbook AMM math hopes.

Divergence as a signal

We additionally track the gap between the naive quote and the hook-simulated quote. A persistent divergence is evidence the hook is extracting or obstructing value, and it feeds the safety verdict described in the hook scanner documentation. Quoting is not just pricing — it is reconnaissance.

Routing and broadcast

Quotes feed route selection across available pools; execution broadcasts through redundant RPC endpoints with automatic failover. Timeouts are classified by cause — rate-limit, upstream outage, capability gap — so fallback behavior matches the failure instead of blindly retrying. If premium endpoints degrade, the system falls back to public endpoints with honest degraded reporting to the operator.

Degraded is a state, not an exception

When quoting dependencies fail, the answer is "unknown", and unknown is treated with the same strictness as "bad" for unattended automation. No silent retry-until-lucky, no stale quote reuse, no cached verdicts from a broken layer. Members see a plain status; operators see the lane state; automation stands down.

Invariants we test against

Next: wallet custody → All docs

Built for operators, not slippage goblins. Talk to us →