Back

Gas fees and congestion

P02-L04 · P02 · P02-M01

Explain resource pricing and failed transaction costs

ILLUSTRATIVE · needs_review

Prerequisites: P02-L03

Learning objectives

  • Explain resource pricing and failed transaction costs
  • Calculate a simplified execution fee.
  • Distinguish failed execution from rejected submission.
  • Keep network-specific resource models separate.

EN source master · P02-L04 · 30 minutes estimated · needs_review

Read-only study. No wallet connection, real money, seed phrase, private key, signature or live trade. Duration is an editorial estimate; visual assets are specifications, not deployed components.

Why this matters

Fees pay for resources, not a guarantee of the desired result. ‘The action failed’ is incomplete until you know whether it was executed, rejected before inclusion or merely not observed.

Explanation

Separate quantity and unit price

In the supplied Ethereum execution case, gasUsed is the resource quantity and effectiveGasPrice is its price. Their product is the execution fee [GAS]. The gas limit is a bound, not the measured consumption. The exercise excludes blob and rollup fees so the multiplication has a clearly defined scope.

Network congestion can affect inclusion and pricing, but a fee quote is not a promise about timing. This lesson calculates frozen cases rather than recommending settings or conducting a transaction.

Failure has stages

An included transaction can execute and fail while still costing fees [GAS]. A local validation error before submission is different. A remote procedure call (RPC) requests a method result from a node or provider. An RPC timeout does not by itself tell you whether a transaction reached another node or was included. Do not convert transport uncertainty into either a charged-fee claim or a zero-fee claim without evidence.

Do not copy one network's formula everywhere

Solana distinguishes base and prioritization fee components [SOLFEE]. Its resource model must not be renamed Ethereum gas. A normalized dashboard may present one fee field, but its meaning and native unit depend on the chain. For cross-network comparison, preserve original units; conversion needs a sourced exchange rate at a specified time.

Build a fee ledger

Record network, inclusion/execution context, fee components, units, and missing components. If a packet stipulates no inclusion for a locally rejected attempt, describe that scope precisely. For an uncertain timeout, request status evidence rather than inventing a result.

A fee comparison says nothing by itself about application correctness, token legitimacy or execution profitability. A lower number in one currency is not automatically cheaper than a higher number in another.

Evidence-state classification

OBSERVED in the fixture: A's included revert/resource fields, B's pre-submission rejection and C's timeout. INFERRED: A's execution-only fee is 0.001 ETH-equivalent under the supplied inputs. UNKNOWN: C's inclusion and fee. INSUFFICIENT EVIDENCE: transport timeout proves no fee or fee payment guarantees the intended application outcome.

Key terms

  • Gas limit: allowed resource ceiling.
  • Gas used: charged execution quantity in the case.
  • Effective price: actual per-unit price.
  • Transport error: communication failure, not execution diagnosis.

Historical example

ILLUSTRATIVE EVM case A: included revert, gasUsed40000, gasLimit100000, effectiveGasPrice25 gwei, no other components. B: local validation rejects before any submission, explicitly stipulated. C: request times out; inclusion unknown. No real transaction is submitted.

Visual specifications

Evidence panel with A included/reverted/0.001 ETH; B local rejection/no submission; C transport timeout/fee unknown. Alt: three failure-looking situations have different evidentiary scopes.

What the evidence proves

Fee arithmetic and stage-specific handling of the supplied attempts.

What the evidence does not prove

A live quote, universal fee formula, guaranteed timing or future cost.

Common mistakes

  • Every failure is free.
  • Every timeout is a failed transaction.
  • Comparing raw fees in unlike currencies.

Practical exercise

Compute A's fee, explain B's scope and classify C's fee. What would go wrong if you used A's gasLimit?

Submit a short evidence table and reasoning, using only the provided material. Suggested allocation: study 12 min, inspection/calculation 8 min, correction/quiz 10 min.

Show worked correction

A=40000×25=1000000 gwei=0.001 ETH. Limit-based arithmetic would give0.0025 ETH, not actual supplied consumption. B has no network transaction in this stipulated case. C's fee is UNKNOWN until execution/inclusion evidence is obtained. No conclusion about network congestion can be measured from these cards alone.

Review rubric: 1 point each for exact scope, source/fixture provenance, correct reasoning, explicit limitations and safe offline handling (5 total). An invented observation or unsupported human attribution requires correction regardless of score. This is formative feedback, not certification.

Checklist

  • Identify chain and units.
  • Was it included?
  • Use actual consumption.
  • List extra components or exclusions.
  • Timeout stays unresolved.

Summary

Fees pay for resources, not a guarantee of the desired result. ‘The action failed’ is incomplete until you know whether it was executed, rejected before inclusion or merely not observed. The supplied material supports fee arithmetic and stage-specific handling of the supplied attempts. It does not establish a live quote, universal fee formula, guaranteed timing or future cost.

Summary

  • Calculate a simplified execution fee.
  • Distinguish failed execution from rejected submission.
  • Keep network-specific resource models separate.

Next lesson

P02-L05 after reviewing this exercise and its prerequisites.

Tools

NONE. The authoritative catalog requires no product access for this lesson. Use the frozen/offline material.

Sources & claim boundaries

  • [GAS] Ethereum gas and fees — Gas used times effective price and included failure costs. Checked 2026-10-01.
  • [SOLFEE] Solana fees — Base fee and optional prioritization fee, including failure costs. Checked 2026-10-01.

Synthetic values are author-created exercise inputs. Historical values, if any, must use the linked dataset and its narrower provenance. Source inspection is not independent editorial acceptance.

Visual specifications

P02-L04-V01

SPECIFICATION_ONLY · ILLUSTRATIVE

Explain resource pricing and failed transaction costs

Illustrative teaching data; not a live screen

Evidence panel with A included/reverted/0.001 ETH; B local rejection/no submission; C transport timeout/fee unknown. Alt: three failure-looking situations have different evidentiary scopes.

three failure-looking situations have different evidentiary scopes.

390px stacked rows with complete text equivalent; 768px/desktop render acceptance pending

RTL prose; identifiers and number units remain LTR; preserve factual arrow directions

FIX-P02-L04

Sources & claim boundaries

GAS · PRIMARY_DOCUMENTATION

Ethereum gas and fees

Supported claim
Gas used times effective price and included failure costs.
Verification boundary
Primary page inspected for the stated mechanism or attributed publication; does not authenticate illustrative data.
Checked at
2026-10-01
Open primary source
https://ethereum.org/en/developers/docs/gas/

SOLFEE · PRIMARY_DOCUMENTATION

Solana fees

Supported claim
Base fee and optional prioritization fee, including failure costs.
Verification boundary
Primary page inspected for the stated mechanism or attributed publication; does not authenticate illustrative data.
Checked at
2026-10-01
Open primary source
https://solana.com/docs/core/fees

Dataset provenance

id: FIX-P02-L04

dataStatus: ILLUSTRATIVE

source: Original teaching fixture embedded below; not externally observed

observedAt: null

timeBasis: SIM/T markers are fictional; no real timestamp or chain observation

scope: Invalid training labels; no usable wallet, key or signature

Test your reasoning

P02-L04-Q1 · A fee?
P02-L04-Q2 · C's fee?
P02-L04-Q3 · B's special assumption?
P02-L04-Q4 · Can raw ETH and SOL fee numbers be ranked as cost?
P02-L04-Q5 · Does paying a fee guarantee application outcome?