Skip to main content
Two different numbers decide how much a swap delivers. Price impact is the cost of your trade’s size against the liquidity available, and it is already part of the quote. Slippage is the tolerance you set for price movement between the quote and the block that includes your transaction. Olympex turns your slippage into a minimum output that the transaction enforces on-chain. It doesn’t report price impact, so you measure it yourself.

Slippage

slippage is a percentage sent as a string: "1" is 1% and "0.5" is 0.5%. It is required on POST /quotes and POST /swap, in both modes. Send the same value to both, so the minimum you show matches the one the calldata enforces: minimumReceived from the quote for cross-chain transfers, and minOutAmount from /swap for single-chain swaps. Slippage sets the floor of the trade: In the single-chain example on Build a swap, /swap returns outAmount "9991223" and, with slippage "1", minOutAmount "9891061", about 1% lower. For USDC’s 6 decimals, the user expects 9.991223 USDC and receives at least 9.891061 USDC. In the cross-chain example on Get a quote, 10 USDT on Polygon to USDT on Ethereum, toTokenAmount "9985000" comes with minimumReceived "9885149", also about 1% lower.

Price impact

Price impact is the gap between the pair’s market price and the average price your trade gets, caused by the trade’s size relative to the liquidity it draws on. It grows with the amount and shrinks with deeper liquidity. Splitting a trade across venues, which sources do inside routes, is one way to reduce it. Price impact is already reflected in outAmount: a quote for a larger amount returns a lower rate. The API doesn’t return a separate price-impact figure. To measure it, compare the rate of your trade with the rate of a small reference trade for the same pair:
The result is an estimate. The reference quote carries a little impact of its own, the two quotes can come from different sources, and prices can move between the two calls, so a small negative result means “no measurable impact”. Gas isn’t part of outAmount; for small trades it can cost more than price impact does. See Gas and fees.

Price impact versus slippage

Quotes are not reserved

Olympex doesn’t hold a price between calls. For single-chain swaps, POST /swap returns its own outAmount and minOutAmount for the calldata it builds, and those are the numbers the transaction commits to: show them to the user before anyone signs. Cross-chain /swap returns neither, so show the quote’s toTokenAmount and minimumReceived. Then send right away. The calldata carries an on-chain expiry, 5 minutes on most routes, and prices keep moving while it waits. Some routes also include a market maker’s firm quote that expires within seconds of the build: if the transaction reverts because that quote expired, build the swap again.

Choosing a slippage tolerance

Slippage is a trade-off between two failure modes:
  • Too tight: normal price movement between the quote and inclusion pushes the output below the minimum, and the transaction reverts. The user still pays gas for the reverted transaction.
  • Too loose: the minimum output drops, so the trade can fill at a worse price. A wide tolerance also leaves more room for bots that trade around pending transactions (sandwich attacks) to extract value from the swap.
Set it by what you trade:
  • Stablecoin pairs and deep liquidity move little between quote and execution, and tolerate tight settings. The examples in these docs use "1" on a stablecoin pair.
  • Volatile or thinly traded tokens need more room.
  • Cross-chain routes can include swaps on both chains and a bridge, listed in middlewareRoute, which gives the price more time to move.
  • Measure and adjust. Track how often your transactions revert and how realized output compares with outAmount, per pair, and tune your defaults from that data.
Don’t widen slippage to force a failing trade through. If quotes or transactions keep failing, request a fresh quote or reduce the amount. A wider tolerance only lowers the minimum the user accepts.

What this means for your integration

  • Send the same slippage string to /quotes and /swap.
  • Show the minimum the user receives (minOutAmount or minimumReceived, converted from base units) next to the expected output.
  • Measure price impact with a reference quote and warn users above a threshold you choose.
  • Build and send promptly. Re-quote instead of widening slippage.

Aggregation and routing

How the quote is chosen and how its route is split.

Gas and fees

The other costs a swap carries.

Get a quote

The POST /quotes reference.

Execute a swap

From quote to a confirmed transaction.