Does a Failed Swap Use All the Gas Limit? See What You Pay
Does a failed swap use all the gas limit? Usually no: you pay for gas used before a revert, while an out-of-gas transaction can use the full limit.
Uruguay Can Editorial

Usually, no: a failed KyberSwap swap pays for the gas it used before reverting, not automatically the full gas limit; an out-of-gas execution can use the entire limit.
The gas limit is the most gas your transaction is allowed to use. It is a cap, not a preset fee. On the Ethereum Virtual Machine, the fee for an included transaction depends on gas consumed and the effective gas price.
KyberSwap is a decentralized exchange aggregator that finds swap routes across supported liquidity sources and networks. Its swaps follow the same gas rules as other on-chain transactions. For more context, KyberSwap failed-swap gas costs explains what you pay when a transaction fails and adds detail on revert costs.
A revert spends gas up to the failure
An on-chain swap that reverts still pays for the execution completed before the failure. The network keeps gas already spent processing the transaction, while unused gas is not charged.
Say you submit a KyberSwap swap with a gas limit, but a condition in the transaction causes it to revert before reaching that cap. The transaction is included on-chain, so it costs gas, but its receipt can report a gasUsed amount below the limit. The difference is gas that was available but never consumed.
A failure during estimation, before the transaction is broadcast and included on-chain, has no on-chain gas charge. That is different from a revert: a revert appears as an included transaction, and its execution up to the failure costs gas.
The receipt shows whether the limit was used
The transaction receipt shows the gas consumed and the effective gas price used to calculate the execution fee. Compare gasUsed with the gas limit you set: a lower gasUsed means the transaction did not use the full allowance.
If execution runs out of gas, it can consume the full limit. This is the exception to the usual revert outcome: execution uses the available gas before it can stop, so there may be no unused portion left.
To check a failed swap, open the transaction details in your wallet or block explorer, then:
- Find the gas limit you submitted.
- Read gasUsed in the receipt.
- Use the receipt’s effectiveGasPrice to understand the execution fee.
A revert preserves gas left over at the point of failure, but it cannot return gas already spent reaching that point.
- An included revert costs gas used before failure.
- Unused gas is not charged.
- Out-of-gas execution can use the full limit.