Fintech Lab
Lesson 75Crypto-fiat boundaryAdvanced
Failed on-chain transactions: gas paid, value not moved
Ethereum transactions can fail. The gas is gone. The user expects their balance back.

Unlike BTC (transactions that confirm always succeed), Ethereum-family chains can EXECUTE-AND-REVERT, the EVM runs the transaction, charges gas, but reverts state if a contract assertion fails. Your user submitted a swap or NFT mint; it ran out of gas mid-execution or an OUTPUT contract rejected; gas is paid (you lose it), but no value was transferred. The user's wallet should NOT show the swap's intended debit, it never happened. The gas fee, however, was real. This lesson posts the gas-only entry that handles a failed Ethereum transaction.

Fintech Lab is a free, interactive lab for fintech engineers. Real ledger, your own sandbox, engineering patterns from production. See all 85 lessons.

Search lessons

Type to find any of the 85 lessons. Press Enter to open.