Skip to main content
Bolt’s pricing model is fundamentally different from traditional AMMs. Instead of computing price from a bonding curve, Bolt anchors pricing to an oracle and derives settlement amounts directly from that reference price, independent of pool depth. This oracle-anchored approach enables zero-slippage execution and deterministic pricing.
In Bolt, price is an input from the oracle, not an output from a curve. This is the core mathematical difference that enables deterministic settlement.

The Pricing Model

Bolt uses oracle-anchored reference pricing rather than bonding curve mechanics. When you submit a swap:
  1. Oracle publishes a reference price for the asset pair (e.g., 1 token A = X token B)
  2. Fee rate is applied to the reference price to calculate the execution price
  3. amountOut is derived directly: amountOut = amountIn × oraclePrice × (1 - feeRate)
  4. Inventory is validated to ensure sufficient liquidity exists to settle the trade
  5. Settlement occurs at the calculated amountOut, regardless of pool depth
This approach guarantees that the execution price is independent of how much liquidity other traders have already consumed. Pool depth affects only whether a trade can settle; it never affects the price your trade receives.

Simplified Pricing Formula

amountOut = amountIn × oraclePrice × (1 - feeRate)
Where:
  • amountIn: The quantity of input asset you’re trading
  • oraclePrice: The current oracle reference price for the asset pair
  • feeRate: The percentage fee applied to all swaps (e.g., 0.25% = 0.0025)
  • amountOut: The deterministic output amount

How Pricing Differs

Traditional AMMs (e.g., x*y=k) compute price from pool state using a bonding curve.
  • Price depends on pool depth
  • Each trade shifts the curve; quotes become stale instantly
  • Slippage increases with trade size relative to liquidity
  • Example: swapping 1% of pool liquidity causes visible price movement
Bolt anchors price to an external oracle.
  • Price is independent of pool depth
  • Quotes remain valid as long as oracle price and inventory are unchanged
  • No slippage regardless of trade size (until inventory is exhausted)
  • Example: swapping 50% of pool inventory has zero slippage if inventory is sufficient

Step-by-Step Price Computation

1

Oracle Publishes Price

The oracle publishes the current reference price for the asset pair, e.g., 1 USDC = 0.001 BTC. This is updated on-chain periodically and signed by the oracle authority.
2

Fee Rate Applied

The pool’s configured fee rate is applied to the oracle price. For a 0.25% fee rate, the effective price becomes: oraclePrice × (1 - 0.0025) = oraclePrice × 0.9975.
3

Inventory Check

The contract checks whether available inventory for the output token is sufficient to settle the calculated amountOut. If inventory is insufficient, the trade is rejected.
4

Settlement Amount Calculated

The final settlement amount is computed as: amountOut = amountIn × oraclePrice × (1 - feeRate).
5

Trade Settles Atomically

The trade settles: you transfer amountIn to the pool, and receive amountOut. Settlement is atomic; it either fully succeeds or fully reverts.

Fee Structure

Fees in Bolt are straightforward and transparent:
  • Applied at execution time: Fees are deducted from the oracle price before settlement
  • Expressed as a rate: Pools define a fee rate (e.g., 0.0025 for 0.25%)
  • Applied symmetrically: Both token A to token B and token B to token A swaps use the same fee rate
  • Example: With a 0.25% fee and oracle price of 1.0, the execution price is 0.9975
Fees are collected in the pool and accrue to liquidity providers. They are not taken from the oracle price; they adjust the execution price downward to compensate MMs for providing liquidity.

Precision and Rounding

Bolt contracts use fixed-point arithmetic to avoid floating-point errors:
  • Precision: Prices and amounts are represented with high decimal precision (e.g., 18 decimals)
  • Rounding: Amounts are rounded down (in favor of the pool) to prevent dust accumulation
  • Test vectors: Always validate against test vectors provided by the Bolt team to ensure precision handling is correct in your off-chain implementation
  • SDK integration: The Bolt SDK handles precision automatically; use it for off-chain quoting to avoid manual decimal conversion errors

AVO Price Verification Math

The AVO ensures that Bolt prices reflect best-available market rates through a multi-layer pricing pipeline:
  • Multi-venue composite: Prices are derived from depth-weighted composite mid-prices across Gate.io, Binance, OKX, Bybit, and Crypto.com, with staleness filtering (2s max) and outlier rejection (0.3% deviation or 5x median spread)
  • Adaptive velocity model: A 6-step EMA velocity model computes log returns, adapts its smoothing rate to both spread width and volatility magnitude, and predicts where price is heading rather than chasing it
  • A-S reservation pricing: Fair value is adjusted by net inventory using fair = oracle - net_delta * gamma * sigma_fast^2 * T, where gamma auto-calibrates daily from 30-second taker markouts
  • Optimal spread sizing: The half-spread delta = (gamma * sigma^2 * T)/2 + (1/gamma) * ln(1 + gamma/kappa) adapts to volatility regime (Hot/Normal/Cold via dual EWMA) and fill velocity
  • No arbitrage at execution: The oracle blends its velocity prediction with the composite mid and clamps movement to a maximum of 0.7% per tick
  • Validity proof: The contract verifies that the oracle signature is recent and valid before settlement
This mechanism prevents Bolt from falling out of sync with market prices and ensures traders receive fair execution.

Important Notes

Contract math is subject to change with protocol upgrades. Always verify your implementation against the latest contract source code and test vectors provided by the Bolt team. Breaking changes to pricing formulas will be communicated in advance.
For the full mathematical specification, precision constants, and comprehensive test vectors, contact the Bolt team. We provide reference implementations and test data to validate your off-chain quoting logic.

Off-Chain Quoting

How to implement deterministic off-chain quoting using contract math.

Pool State Indexing

How to track inventory and pool parameters for accurate pricing.