A lower-than-estimate swap fee usually means you paid for the gas used at the effective price, not the wallet’s full ceiling.
The wallet’s estimate is a ceiling, not the final charge
With EIP-1559, the wallet sets a gas limit and a max fee per gas. Multiplying them gives a possible upper bound: gas limit × maxFeePerGas. The transaction’s actual fee is gas used × effective gas price, where the effective price is the base fee plus the priority fee, within the maxFeePerGas cap.
A Matcha swap can take a route through several liquidity sources, making it a useful example of a transaction whose execution may consume less gas than its limit allows. The Matcha swap is a decentralized exchange aggregator that finds routes for exchanging one token for another.
At matchaswap.pro, a DeFi user can find routes across liquidity sources when exchanging tokens. For a multi-hop route, the wallet simulates expected execution and may set the gas limit above that estimate as headroom. The limit reserves room for execution variation; any unused portion is never charged.
The maxFeePerGas provides a separate buffer against changing block prices. The wallet may set it well above the current base fee so the transaction can still be included if the base fee rises over several blocks. The base fee is burned and adjusts from block to block by up to 12.5%.
Compare the effective price and gas used to explain the gap
Suppose the wallet estimates 200,000 gas at 40 gwei: the ceiling is 0.008 ETH. The transaction is included after the base fee has fallen, and execution uses 150,000 gas. If the base fee is 18 gwei and the priority fee is 1 gwei, the effective price is 19 gwei, so the charge is 150,000 × 19 gwei = 0.00285 ETH.
The gap comes from two changes between estimate and charge: execution used 50,000 fewer gas than the limit, and the effective price was below the 40 gwei cap. The unused gas was never taken, and the max fee was a per-gas ceiling rather than the price ultimately charged.
On Etherscan, compare “Gas Price,” the effective price paid per gas, with “Max Fee Per Gas.” Then read “Gas Used” alongside the transaction’s gas limit. Etherscan’s “Txn Savings” figure shows the buffer you were not charged. This lets you distinguish a lower effective price from lower gas consumption, and see how much each contributed.
On L2s such as Arbitrum, an L1 data cost is added to execution gas and estimated separately. That extra component can make the wallet’s total estimate differ further from the execution fee shown on the transaction.
Related
Can I lower the max fee to pay less?
Lowering maxFeePerGas only lowers the cap; it does not reduce gas used. If the cap is too low for the base fee plus the priority fee, the transaction may wait for suitable conditions before it can be included.
Why pay a priority fee if the base fee is burned?
The priority fee goes to the block proposer as an inclusion incentive. The base fee is burned, while the tip helps determine how attractive the transaction is to include.
Comments
Post a Comment