Skip to content
Reading depth

Each view includes the earlier layers; the complete engineer or auditor page is shown by default.

Slippage is the difference between a reference or expected trade price and the price at which the trade actually settles.

Opposed arrows category cue

Slippage compares an expected or reference trade price with the price that actually settles.

Quotes become stale, markets move, routes change, orders consume liquidity, and transactions wait for inclusion. Slippage measures the resulting execution difference. It is not one universal number until the reference, direction, amount, fees, route, and time are specified.

Implementation shortfall is a useful analogy. On-chain trading adds public pending transactions, adversarial ordering, deterministic curve movement, gas, reverts, and atomic or solver-based settlement. A tolerance field is a contract bound, not the realized metric itself.

Do not add all rows blindly: a quoted output may already include price impact and fees. Define the quote convention before decomposing the difference.

One signed convention is:

slippageFraction = (executionPrice - referencePrice) / referencePrice

Both prices must quote the same asset direction, such as USDC per ETH. Under that convention a higher execution price is worse for an ETH buyer but better for an ETH seller. A cost-positive implementation should condition on trade direction or compare actual and reference output for a fixed input. The fraction is unitless; multiply by 100 only when labelling a percentage.

  1. Declare the traded amount, asset direction, route, reference price, quote convention, and observation time.
  2. Obtain an executable quote and identify whether it already includes price impact and venue fees.
  3. Authorize a minimum output, maximum input, deadline, or equivalent execution boundary.
  4. Observe the amounts and costs that actually settle, or record that the trade reverted or remained unfilled.
  5. Compare settlement with the reference using one consistent price direction and percentage convention.
  6. Attribute price impact, market movement, ordering, fees, gas, and route changes without double counting.

For exact input, the trader normally authorizes a minimum output. For exact output, the trader authorizes a maximum input. A deadline limits quote age. These controls turn excessive slippage into a revert or unfilled order, subject to the venue’s partial-fill and refund rules.

Capital flow is actual input, output, fee, and gas. Information flow includes the reference quote, route, timestamp or block, and price source. Claim flow can leave an open order, refund, or partial-fill entitlement when settlement is not fully atomic. Return flow is absent from slippage itself; any counterparty, arbitrage, or strategy gain must be traced separately. Risk flow reaches the trader when the authorized bound is too loose or the trade fails when it is too tight. Makers and LPs can bear the opposite inventory effect.

Slippage is normally a trading cost relative to the chosen reference, not a new asset. The counterparty, arbitrageur, LP, solver, or later market move may capture the other side, but no single recipient is guaranteed. Failed execution still can impose gas and opportunity cost.

Test price inversion, token decimals, fee inclusion, exact-input/output rounding, stale quotes, changed routes, partial fills, minimum output, maximum input, deadlines, refunds, fee-on-transfer tokens, and front-running scenarios. User interfaces should not label price impact, fee, and slippage as the same value.

Uniswap v2’s pricing documentation provides one implementation-specific example of amount bounds and price safety. Its mechanics do not define every order book, RFQ, auction, or solver system. The documentation was reviewed 2026-08-10.

  • “Slippage tolerance predicts slippage.” It specifies an execution boundary.
  • “All slippage is price impact.” Market movement, ordering, routing, and quote conventions also matter.
  • “Zero slippage means a free trade.” Fees, gas, spread, and opportunity cost can remain.

Compare the narrower price-impact measure.

Machine-readable model

Key equations

Canonical expressions come from the structured concept record. KaTeX renders the notation, while the plain-text expression and variable table keep its meaning and units inspectable without JavaScript. Read the narrative above for the model's domain, assumptions, and rounding rules.

  1. Equation 1

    Plain-text equation: slippageFraction = (executionPrice - referencePrice) / referencePrice

Assurance contract

Security properties

These structured statements define desired behavior. Their stable IDs can bind tests, invariants, specifications, audit findings, or proof results without turning descriptive review advice into an assurance claim.

Desired · not evaluated: No test, audit, or proof result is implied until scoped evidence is linked to this property.

  1. The reference and execution prices use the same asset direction, units, and fee convention

  2. Exact-input settlement enforces minimum output and exact-output settlement enforces maximum input

  3. Expiry and partial-fill behavior match the user-authorized order model

  4. User interfaces distinguish estimated slippage, realized slippage, price impact, fees, and gas

Knowledge check

Quiz

Answer in your own words, then open the model answer.

What problem does Slippage exist to address?

Model answer

Slippage measures execution uncertainty created by changing markets, routing, transaction delay, partial fills, ordering, and available liquidity.