نسخهٔ فارسی

Transparent, non-custodial, yours

Paying for failure: why a revert still costs gas

A revert undoes state but not work. Why the network keeps the fee, how much a failure costs, and how to stop paying it repeatedly.

What is charged Gas for computation actually performed
What is undone Every balance and state change the transaction attempted
Worst case Out-of-gas, which consumes the entire gas limit

FBT Swap

What you should know

It is the most counterintuitive charge in crypto: the transaction achieved nothing, your balances are unchanged, and the fee is gone. This is not a penalty and not a bug.

Validators executed your code to find out that it would fail. That execution consumed real resources on thousands of machines, and the fee pays for it.

What a revert undoes and what it does not

A revert rolls back every state change the transaction attempted — balances, allowances, pool reserves. It does not roll back the computation itself, because that already happened, nor the nonce in most cases.

If it were free to fail, an attacker could flood the network with transactions designed to revert and pay nothing for the load.

How much a failure actually costs

Usually less than the successful version would have cost, because execution stops at the failing check rather than completing the whole route. A slippage revert on a swap typically burns a meaningful fraction of the full cost, not all of it.

The exception is out-of-gas: that consumes the entire gas limit you set, because execution ran until there was nothing left.

The repeat-failure trap

Three reverts in a row on a volatile pair can cost more than accepting a slightly wider tolerance once would have. Conversely, raising tolerance to force a transfer-fee token through converts a free failure into a permanent loss.

The deciding question is always which of the five causes you are actually hitting — the guide on failed swaps lists them with their signatures.

Nobody can refund it

Gas is paid to validators and partially burned. It never reaches the interface, so no interface can return it, and a service that offers to refund network gas is either subsidising you from its own funds or is not telling the truth.

FBT Swap re-quotes immediately before signing, which removes the stale-quote revert — the single most common avoidable cause.

At a glance

At a glance

What is charged

Gas for computation actually performed

What is undone

Every balance and state change the transaction attempted

Worst case

Out-of-gas, which consumes the entire gas limit

Refundable

No. The fee went to validators and the burn, not to any interface

FAQ

Frequently asked questions

Clear answers before you decide.

Is a failed transaction a sign of a scam?

Not usually. The common causes are mechanical. A token that can be bought but never sold is a different matter — that is a honeypot, and it looks like a repeated sell-side failure.

Can I cancel a pending transaction to avoid the fee?

You can replace it with a zero-value transaction to yourself using the same nonce and a higher tip. That replacement itself costs gas, so it is cheaper than a bad fill but not free.

Does a failed transaction affect my wallet?

No, beyond the gas. Balances are unchanged, approvals are unchanged, and there is no record that affects future transactions other than the nonce having advanced.

Risk notice

Crypto assets are volatile and on-chain transactions cannot be reversed. You can lose money, including all of it. Nothing here is financial advice.