START HERE

Why did MetaMask charge gas after a failed transaction? Check the final on-chain status and actual fee before retrying or assuming a refund is possible.

Decision flow: rejected before submission has no on-chain gas fee; pending requires final-status check; failed on-chain execution can charge gas.
Original diagnostic flow based on MetaMask and Ethereum documentation. This is not a wallet screenshot. Official reference ↗

A MetaMask user described a transfer that kept changing from pending to failed, then asked a very practical question: “I pay for every failed attempt, do I?” (Read the question.) A failed transaction can cost gas, but the word failed in a wallet is not enough by itself to tell you what happened. The useful clue is whether the transaction was actually recorded on the blockchain.

Short answer: If a transaction was included on Ethereum and failed during execution, the network still used computation, so its gas fee is charged. MetaMask does not collect or refund that network fee. If you never submitted the transaction, there is no on-chain execution fee for that attempt. Check the transaction record before assuming every failed-looking attempt was charged. MetaMask explains the fee; Ethereum explains why failed execution still consumes gas.

Did the failed transaction reach the blockchain?

Imagine a transfer that shows failed in MetaMask. This is an illustrative troubleshooting scenario, not a transaction HideFi made. First, open that transaction's details in the wallet and follow its View on block explorer link. MetaMask's transaction-ID guide explains where to find the hash if you need to search manually. Use the explorer for the same network as the transaction.

  • A confirmed on-chain record says Failed or Reverted: Look for its transaction fee or gas used. The attempted action did not finish, but execution still took work. That fee was paid to the network; retrying may spend another fee.
  • No transaction was submitted: A blocked confirmation or rejected wallet prompt did not create an on-chain execution fee. Check for another transaction before treating a lower wallet balance as evidence of this attempt being charged.
  • Pending, dropped, or replaced: Do not call this a confirmed failed execution yet. Identify the final transaction hash and status first. A replacement may have its own fee; a dropped transaction that never landed is a different case.

The diagram above keeps these three states separate. It is a diagnostic aid, not a MetaMask screen.

Why can a failed swap still cost money?

A swap can reach a smart contract and then revert. The token exchange does not complete, yet the network has already processed the attempt. Ethereum's gas documentation says the fee is paid whether execution succeeds or fails; when execution runs out of gas, changes revert while the gas consumed for that work is still spent. The gas limit is a ceiling, not automatically the amount charged in every failure. Read the actual fee on the final on-chain record.

If you also think the token amount disappeared, that is a separate question. Do not assume the entire missing amount was gas. Compare the token transfers and final balances on the correct network's explorer. If the action used a third-party swap or deposit contract, its own records or support may be needed to explain the token movement. Never share a recovery phrase or sign a “refund” transaction offered in a direct message.

Can MetaMask refund a failed transaction's gas?

No: MetaMask says it does not receive the gas fee and cannot refund it. Before another attempt, identify the actual failure reason rather than repeatedly resending the same action. An out-of-gas error and a contract execution reverted error point to different causes; a fee refund is not the fix for either one. If the transaction is still pending, use our pending MetaMask transaction guide instead of treating it as a completed failure.

Official sources

Product interfaces and recovery policies can change. Confirm the current steps before acting.