{
  "schemaVersion": "1.0.0",
  "id": "article.v3-3275a91f-c7c6-4cb2-a3dd-9235963fa74d",
  "contentType": "evergreen_guide",
  "title": "Failed Ethereum Transactions: How to Read the Receipt and Account for Gas",
  "slug": "failed-ethereum-transactions-receipt-gas",
  "category": "ethereum_transactions",
  "intent": "Why did my Ethereum transaction fail while still costing ETH, and which receipt fields explain the outcome and execution fee?",
  "directAnswer": "An Ethereum transaction can fail after inclusion and still cost ETH. Its receipt records the execution outcome and the gas charged; it does not, by itself, explain the failure. Start with that evidence before changing fees or trying again.",
  "sections": [
    {
      "heading": "Read the receipt before diagnosing the cause",
      "paragraphs": [
        "For post-Byzantium receipts, [EIP-658](https://eips.ethereum.org/EIPS/eip-658#specification) defines status `0` as top-level failure and `1` as success. Neither value is a contract-specific error message.",
        "| Evidence | What it tells you |\n| --- | --- |\n| Transaction hash, block hash and block number | Which included transaction you are examining. |\n| `gasUsed` | The gas charged to this transaction. |\n| Actual execution gas price | The per-gas price used for the charge. ethers v6 exposes this as receipt `gasPrice`. |\n| ethers v6 receipt `fee` | The execution-fee value in wei. This is a library property, not a field that every raw RPC receipt must contain. |\n| `cumulativeGasUsed` | Gas used by this transaction and earlier transactions in the block; do not use it as this transaction's gas consumption. |",
        "The field definitions are documented in the [ethers v6 TransactionReceipt reference](https://docs.ethers.org/v6/api/providers/#TransactionReceipt)."
      ]
    },
    {
      "heading": "REVERT removes the reverted execution's logs",
      "paragraphs": [
        "[EIP-140](https://eips.ethereum.org/EIPS/eip-140#specification) defines REVERT as aborting an execution and undoing its state changes. Logs from that reverted execution are also discarded. An event emitted before a top-level revert therefore does not survive in the receipt as a convenient error breadcrumb.",
        "Revert return data is different from an event log. It can convey information to a caller, but EIP-140 does not prescribe a universal error format. A reverted subcall also returns a failure signal to its caller; that call-level result must not be confused with the receipt's top-level outcome."
      ]
    },
    {
      "heading": "Calculate the execution fee from the actual price",
      "paragraphs": [
        "For an ordinary EIP-1559 transaction on Ethereum mainnet, the execution charge is:",
        "`execution fee = gasUsed × effective gas price`",
        "The [EIP-1559 accounting](https://eips.ethereum.org/EIPS/eip-1559#specification) defines the effective price as the block base fee plus the smaller of the priority-fee cap and the remaining room under the maximum-fee cap. Its accounting charges the gas allowance and credits back unused gas. That protocol accounting occurs during block execution; broadcasting a transaction is not evidence that this charge has happened.",
        "`maxFeePerGas` is a ceiling, not the final bill. The base-fee portion is burned and the priority-fee portion goes to the block producer. Unused gas being credited back does not mean the computation already performed becomes free."
      ]
    },
    {
      "heading": "Illustrative receipt: account for a failed execution",
      "paragraphs": [
        "Illustrative example, not a live transaction or a complete RPC receipt. Assume an included mainnet transaction with an 80,000 gas limit, a 30 gwei base fee, a 2 gwei priority-fee cap and a 50 gwei maximum-fee cap. The [EIP-1559 rules](https://eips.ethereum.org/EIPS/eip-1559#specification) give an effective price of 32 gwei.",
        "| Receipt field | Invented value | Reading |\n| --- | --- | --- |\n| `status` | `0x0` | Top-level failure; no cause is encoded here. |\n| `gasUsed` | `0xc350` = 50,000 | Per-transaction gas charged. |\n| `effectiveGasPrice` | `0x773594000` = 32,000,000,000 wei/gas | Actual execution price. |\n| `cumulativeGasUsed` | `0x30d40` = 200,000 | Block running total; exclude it from this calculation. |",
        "`50,000 × 32,000,000,000 = 1,600,000,000,000,000 wei = 0.0016 ETH`. The base-fee share is 0.0015 ETH and the priority-fee share is 0.0001 ETH. Using the full gas limit or the maximum-fee cap would overstate this example’s execution charge. These fields still do not establish whether a REVERT, Out-of-Gas or another condition caused the failure.",
        "Field names and hexadecimal quantities follow the [Ethereum JSON-RPC receipt documentation](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionreceipt). The arithmetic is an educational calculation; no transaction was submitted or replayed."
      ]
    },
    {
      "heading": "A high gas total is not a diagnosis",
      "paragraphs": [
        "A normal REVERT leaves unused gas available. EIP-140 also specifies cases where insufficient gas to perform REVERT, or a stack underflow, instead consumes the remaining gas. These distinctions make gas consumption alone an unreliable explanation for a failure.",
        "Treat a transaction close to its gas limit as a reason to inspect execution evidence, rather than proof of Out-of-Gas. Keep the gas limit separate from the price per gas: increasing a priority fee does not itself provide more execution gas. EIP-1559 requires the fee cap to cover the inclusion block's base fee; a cap below that base fee is an inclusion-validity problem, not an explanation for an included transaction running out of gas."
      ]
    },
    {
      "heading": "Check the limits of your diagnostic tools",
      "paragraphs": [
        "The [ethers v6 documentation](https://docs.ethers.org/v6/api/providers/#TransactionReceipt-getResult) describes `getResult()` as retrieving an execution return value, with limited support requiring an archive node and debug or trace APIs. Do not promise that any provider will return a readable revert reason through that method.",
        "If the needed execution evidence is unavailable, record the cause as unresolved. A receipt status and a plausible guess are not a substitute for a supported diagnostic result."
      ]
    },
    {
      "heading": "Keep account authorization separate",
      "paragraphs": [
        "[EIP-7702](https://eips.ethereum.org/EIPS/eip-7702#behavior) processes authorization tuples before the main execution. A tuple that fails its authorization checks is skipped; that is different from a later execution failure. Processed delegation indicators are not rolled back when that later execution fails. Consequently, a failed receipt does not establish that account delegation remained unchanged."
      ]
    },
    {
      "heading": "A practical reading order",
      "paragraphs": [
        "1. Match the transaction and block identifiers.\n2. Read the top-level status without assigning an unsupported cause.\n3. Use per-transaction gas usage and the actual execution price to account for the fee.\n4. Obtain supported execution evidence if the precise failure matters before a retry.\n5. Check resulting delegation separately if the transaction involved EIP-7702.",
        "This guide covers Ethereum mainnet execution fees. Blob charges, L2 fee components and sponsored-account billing require their own accounting. It is an AI-assisted documentation review, not a transaction replay, a wallet test or a guaranteed retry procedure."
      ]
    }
  ],
  "sources": [
    {
      "id": "p01-s1",
      "label": "EIP-658: Embedding transaction status code in receipts",
      "url": "https://eips.ethereum.org/EIPS/eip-658",
      "sourceType": "primary",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "id": "p01-s2",
      "label": "EIP-140: REVERT instruction",
      "url": "https://eips.ethereum.org/EIPS/eip-140",
      "sourceType": "primary",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "id": "p01-s3",
      "label": "EIP-1559: Fee market change for ETH 1.0 chain",
      "url": "https://eips.ethereum.org/EIPS/eip-1559",
      "sourceType": "primary",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "id": "p01-s4",
      "label": "ethers v6 Providers: TransactionReceipt",
      "url": "https://docs.ethers.org/v6/api/providers/",
      "sourceType": "primary",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "id": "p01-s5",
      "label": "EIP-7702: Set Code for EOAs",
      "url": "https://eips.ethereum.org/EIPS/eip-7702",
      "sourceType": "primary",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "id": "p01-s6",
      "label": "Ethereum JSON-RPC: eth_getTransactionReceipt",
      "url": "https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionreceipt",
      "sourceType": "primary",
      "publishedAt": null,
      "verifiedAt": "2026-11-10T08:12:37.245Z"
    }
  ],
  "sourceDates": [
    {
      "sourceId": "p01-s1",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "sourceId": "p01-s2",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "sourceId": "p01-s3",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "sourceId": "p01-s4",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "sourceId": "p01-s5",
      "publishedAt": null,
      "verifiedAt": "2026-11-09T13:20:12.115Z"
    },
    {
      "sourceId": "p01-s6",
      "publishedAt": null,
      "verifiedAt": "2026-11-10T08:12:37.245Z"
    }
  ],
  "originalEvidence": [
    {
      "type": "source_audit",
      "description": "Documentation-based comparison of receipt outcome, reverted logs, actual execution-fee accounting and persistent delegation, organized into an evidence-first reading checklist. No transaction replay or wallet experiment is claimed.",
      "observedAt": "2026-11-09T13:20:12.117Z"
    },
    {
      "type": "calculation",
      "description": "Illustrative EIP-1559 arithmetic and receipt interpretation with declared invented inputs.",
      "observedAt": "2026-11-10T08:12:37.245Z"
    }
  ],
  "reviewedAt": "2026-11-10T08:12:37.245Z",
  "affiliate": {
    "enabled": false,
    "partnerId": null,
    "linkId": null,
    "disclosureRequired": false,
    "rel": null
  },
  "disclosure": "AI-assisted review of Ethereum transaction specifications and ethers documentation. No transaction was replayed or wallet tested. No affiliate links are enabled.",
  "internalLinks": [
    "/articles/eip7702-wallet-delegation-security-checks/",
    "/articles/ethereum-staking-withdrawals-credentials-exit-queues/"
  ],
  "telegramCohort": {
    "surface": "article",
    "cohortId": "article"
  },
  "format": "markdown",
  "seoTitle": "Failed Ethereum Transactions: How to Read the Receipt and Account for Gas",
  "metaDescription": "Read a failed Ethereum transaction receipt, distinguish gas usage from price, and check why execution status does not prove the cause or undo delegation.",
  "ads": "off",
  "datePublished": "2026-11-09T21:02:14.438Z",
  "dateModified": "2026-11-10T08:12:37.245Z",
  "heroImage": {
    "src": "/articles/assets/failed-ethereum-transactions-receipt-gas/diagram.png",
    "width": 1600,
    "height": 900,
    "sha256": "3437bd86345896fd1b0b0405bfa42654813847103ec6fb9ab37326e076806d18",
    "alt": "Three explanatory cards distinguish a transaction receipt, reverted execution and the actual gas charge.",
    "variants": [
      {
        "src": "/articles/assets/failed-ethereum-transactions-receipt-gas/diagram-768.png",
        "width": 768,
        "height": 432,
        "sha256": "5d1c358b841df31ce2017f5b05481d3488055b978a7cf951d0a5d9a7c2c13b7b"
      },
      {
        "src": "/articles/assets/failed-ethereum-transactions-receipt-gas/diagram-480.png",
        "width": 480,
        "height": 270,
        "sha256": "765a8f944c732834dd1b3be7d4092aa51937452f700cd212741873ad1d842c74"
      }
    ],
    "rights": {
      "status": "owned",
      "kind": "owned_explanatory_diagram",
      "credit": "JEPETA — owned programmatic explanatory diagram"
    },
    "provenance": {
      "createdAt": "2026-11-09T15:06:26.370Z",
      "sourceSha256": "c052bc9bc9a8bb04fa8172521069bce7ac5c586758849baf33705ed922c21ddc",
      "tool": "Chromium fixed trusted diagram renderer",
      "method": "Escaped editorial labels rendered through a fixed layout; no model-generated HTML or commands."
    },
    "diagram": {
      "title": "Failed transactions: receipt, revert and gas",
      "labels": [
        "Receipt: confirm the included transaction",
        "Revert: inspect rolled-back execution",
        "Gas: use the actual execution price"
      ],
      "caption": "A failed receipt does not identify a cause. Fees account for execution already performed.",
      "alt": "Three explanatory cards distinguish a transaction receipt, reverted execution and the actual gas charge."
    }
  },
  "keyTakeaways": [
    "Use receipt status to establish the execution outcome; obtain execution evidence separately to diagnose a failure.",
    "Calculate the execution fee with per-transaction gasUsed and the effective price, rather than the gas limit or fee cap.",
    "Check EIP-7702 delegation separately: a later execution failure does not undo processed authorization changes."
  ],
  "related": [
    {
      "url": "/articles/eip7702-wallet-delegation-security-checks/",
      "title": "EIP-7702 wallet delegation security checks"
    },
    {
      "url": "/articles/ethereum-staking-withdrawals-credentials-exit-queues/",
      "title": "Distinguish staking payouts from transaction receipts"
    }
  ],
  "editorialTransparency": "AI-assisted review of Ethereum transaction specifications and ethers documentation. No transaction was replayed or wallet tested. No affiliate links are enabled. Examples are explicitly illustrative. They do not represent live chain observations or completed wallet or validator tests."
}
