user-robotOff-Chain Quoting & Simulation

Deterministic quote simulation without repeated on-chain calls

Overview

Bolt’s pricing and execution logic is fully deterministic given the current pool state and oracle price. This allows integrators—especially DEX aggregators and routers—to simulate amountIn → amountOut off-chain without issuing repeated on-chain quote calls.

Off-chain simulation is recommended for applications that require:

  • Sub-300ms quote latency

  • Route optimization across many liquidity sources

  • Trade splitting and pathfinding

How Off-Chain Quoting Works

  1. Index current pool state from the Bolt Outpost

  2. Fetch the current oracle price

  3. Apply the Bolt contract math to compute amountOut

  4. Evaluate inventory constraints to determine executability

Because pricing does not depend on pool depth or bonding curves, quote results are stable and do not degrade with simulated trade size.

Determinism Guarantees

  • Quotes are deterministic given the same inputs

  • No curve-based slippage

  • Identical results on-chain and off-chain when using the same math

Reference Materials

Bolt provides:

  • Swap math formulas

  • Worked examples

  • Reference test vectors

Please contact the Bolt team to obtain the latest contract math and test vectors, as these must always match the current on-chain implementation.

Last updated