Do I Lose Gas Fees If My Transaction Fails on Ethereum?
Do you lose gas fees if your transaction fails? On Ethereum, a reverted transaction costs gas already used, while an unsent transaction costs nothing.
Uruguay Can Editorial

No. If your Ethereum transaction reverts on-chain, you pay for the gas it used because validators performed that computation and the block includes the failed transaction.
It can look as if nothing happened: your balances stay the same and the app reports a failure. That makes it easy to think the network canceled the transaction before doing any work.
KyberSwap is a decentralized exchange aggregator that finds swap routes across supported liquidity sources and networks. If you are checking whether a route is available on your network, the kyberswap supported chains topic helps you confirm that step.
A reverted transaction is mined and costs the gas it used
A reverted Ethereum transaction incurs a fee for the gas consumed before execution stopped. Under EIP-1559, the fee is gas used multiplied by the base fee plus the priority fee; the base fee is burned, so no party can refund it.
- Rejected by wallet simulation before sending: no fee.
- Never broadcast: no fee.
- Mined, then reverted: fee for gas used.
- Gas limit left unused: not charged.
The gas limit is the maximum amount of gas the transaction can use, not a flat charge. Once a transaction is mined, you pay for the work completed up to the revert. If it stops early, it uses less gas than a revert late in execution, so it costs less. Either way, the unused portion of the limit is not billed.
A swap revert returns tokens but still uses gas
A KyberSwap swap that reverts because the price moved beyond your slippage tolerance charges gas, but the swap’s state changes are rolled back, returning all the input tokens. You lose the fee for the computation, not the tokens the swap was meant to exchange.
After a revert, open the transaction receipt and compare gas used with the gas limit. That shows how much of the available execution the transaction consumed and helps you understand the fee you paid.