Search projects, hackathons, sponsors and tech

    ← All projects

    QuoteBridge

    Recover missing Tempo route quotes and validate execution before route comparison.

    About

    A swap route can be executable yet unavailable for price comparison because its quote simulation fails. QuoteBridge addresses a specific case involving Uniswap v4 and TempoExchangeAggregator. During standard quote simulation, the hook attempts to transfer input tokens from PoolManager. If PoolManager lacks those tokens, the quote fails, even when a full Router transaction that settles the user's input before swapping can execute successfully. QuoteBridge composes quotes for supported Tempo routes, constructs a compatible execution plan, and validates the complete Universal Router transaction on a local fork before admitting the candidate for comparison. At the tested historical block, the standard quoter fails for a 25 cUSD -> PathUSD -> USDT0 route. QuoteBridge recovers a quote of 24.997499 USDT0 and verifies that the recipient receives that amount. The project includes a reproducible fork demo, an evidence dashboard, and a proposed UniRoute integration patch. It demonstrates recovery of an executable route; it does not claim production deployment or measured savings over competing routes.

    How it's made

    We built a standalone Python quote and validation adapter using deployed Uniswap v4 hooks, PoolManager, Universal Router, and Tempo Exchange on an Anvil fork of Tempo at block 41,183,156. For supported routes, the adapter calls each deployed Tempo hook's quote function and passes its output into the next hop. It constructs a SETTLE -> SWAP -> TAKE execution plan and validates the complete Universal Router transaction. Candidate admission is bound to the route, input amount, block context, and execution-plan digest. Failed or indeterminate validation prevents admission. A key debugging finding involved PathUSD: when the payer and recipient were the same wallet, gas paid in the output token reduced the wallet's balance increase despite a correct swap transfer. We separated swap output from wallet balance changes and used receipt evidence to account for the gas payment. The recorded fork suite passes 29 tests. We also prepared a TypeScript patch for UniRoute's quote-dispatch boundary. That boundary is tested with mocks; wiring the real validator into the complete UniRoute service remains unfinished because required internal components are absent from the public checkout. The dashboard displays recorded fork evidence, and the repository provides reproduction commands and explicit scope limitations.