Quoter’s gas estimate comes from actual EVM execution on a forked state, so it is highly accurate at the time of simulation. Gas consumption can still change if on-chain state changes between simulation and execution, for example when other transactions modify storage.
Definition
result.gas is the gas consumed during the simulated execution, not a static formula. It reflects the path the calldata actually took on the fork at that block.
How it works
Quoter executes the transaction on a fork of current state and records the gas used.
You show that figure as an estimate when the user reviews the transaction.
If state changes before the transaction is mined, consumption can differ from the simulation.
Re-simulate close to signing when you need a fresher gas figure, then validate the new
simulationId.
How Enso does this
The Quoter FAQ describes this accuracy model. POST https://quoter.api.enso.build/api/v1/simulate returns result.gas as a string. The Route API also returns a gas estimate from its own internal simulation when it builds a path; that is a different endpoint from Quoter.
FAQ
Should I set the transaction gas limit exactly to result.gas?
Use the estimate as a guide when you construct the live transaction. Public Quoter docs do not prescribe a buffer. If you change value or other checked fields after simulation, validation will fail.
Is a failed simulation’s gas still useful?
When result.status is "Error", inspect result.error first. The transaction may have run out of gas or reverted; fix the call and simulate again rather than treating that gas figure as a submission limit.
Related articles
What is a forked EVM simulation?
How do I estimate gas for a DeFi transaction?
How do I preview the output of a transaction?
Why should I re-simulate instead of retrying validation?
What is transaction simulation in DeFi?
