Fees & trade costs

Audit a claim that one swap route saves gas

Audit a claim of lower swap gas by matching operations and separating consumed gas units from the price paid per gas.

A lower network bill can result from fewer gas units, a cheaper gas price, or a narrower set of operations. A claim that routing saves gas should identify which of those changed and compare the same task.

Separate efficiency from market pricing

In a hypothetical test, Route A consumes 200,000 gas at 2 gwei, costing 0.0004 native tokens under an Ethereum-style unit conversion. Route B consumes 180,000 gas at 3 gwei, costing 0.00054. B uses 10% fewer gas units but costs 35% more in native units.

It is accurate to describe B's lower gas consumption for those operations. It is inaccurate to say the user paid less. Ethereum's fee equation combines consumed units and the applicable price per unit.

Match the workload

Check whether one measurement includes approval, wrapping, account setup or another operation omitted from the other. A combined transaction can be compared with several separate transactions only when the final assets and permissions match the intended task.

Also distinguish estimated gas, gas limit and actual consumption. A lower limit is not evidence of less work; it may simply be a tighter ceiling. A simulation estimate is not an observed execution result.

Define the evidence behind a percentage

Report the baseline, asset pair, size, route, wallet state, network and observation conditions. For repeated measurements, include the number of observations and their distribution. A single unusually expensive baseline should not support a universal savings claim.

If actual prices differ across observations, show both gas-unit savings and native-asset spending. Convert to dollars with an explicit price convention only afterward. This separation lets readers distinguish an implementation change from favorable network conditions and prevents a real improvement in one metric from being overstated as an improvement in every metric.

Sources & verification (1)

Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.

  1. Ethereum gas and fees: technical overview

    Gas cost calculation, maximum fee versus actual cost, and fees for executed failed transactions.

    https://ethereum.org/developers/docs/gas/

Continue reading

How failed attempts change the cost of completing a swap Why moving through liquidity boundaries can affect swap gas Convert native-token gas into the swap's comparison currency