Skip to main content

What is the difference between Route amountOut and Quoter amountOut?

Route amountOut is the simulated output of a path Enso built, alongside minAmountOut and tx. Quoter amountOut is the predicted output of calldata you already have.

J
Written by Javier Diaz

Route amountOut is the simulated output of a path Enso built, returned with minAmountOut and signer-ready tx data. Quoter amountOut is the predicted output of calldata you already have, returned with a simulationId for a later integrity check.

Definition

Both figures come from simulation, but they answer different questions. Route answers “if Enso routes this input to this destination, what should the user receive?” Quoter answers “if I send this already-built transaction, what output does the fork predict for the tokens I asked it to track?”

How it works

  • Use Route when you need Enso to find the path. The response amountOut is for that path, and minAmountOut is the protected floor when available. You submit the returned tx unchanged.

  • Use Quoter when the transaction already exists. result.amountOut is an array, one value per tokenOut, in wei. Quoter does not add a minAmountOut to your calldata.

  • Route already simulates internally, so you do not need Quoter to get a Route amountOut.

  • In both cases, on-chain results can differ if state changes after the simulation. Keep slippage protection in the transaction.

How Enso does this

POST https://api.enso.build/api/v1/shortcuts/route returns Route amountOut. POST https://quoter.api.enso.build/api/v1/simulate returns Quoter result.amountOut. See DeFi and Swap Routing and How It Works. You can optionally run a Route tx through Quoter because Quoter is source-agnostic, but that is not required.

FAQ

Which number should I show on a Route review screen?

Show the Route response amountOut and minAmountOut (and priceImpact when present). That is the quote for the path the user will sign.

Can I treat Quoter amountOut as a minimum received amount?

No. It is a prediction at simulation time. Put slippage protection in the calldata you built.

Related articles

  • Enso Route vs Enso Quoter

  • How do I preview the output of a transaction?

  • How do I show a quote before the user signs?

  • What is minAmountOut?

  • What is Enso Quoter?

Sources

Did this answer your question?