ETH & Gas: ETH's Roles, Gas Mechanics, Fees and Failed Transactions
Disclaimer: This article is for informational and educational purposes only and simplifies underlying technical concepts for clarity. It is not financial, investment, or security advice.
Every action on Ethereum comes at a cost. That cost is paid in ETH and measured in gas, which represents the computational work the network has to do.
Sending ETH, transferring a token, minting an NFT or swapping on a decentralised exchange all look like a single tap in a wallet. Behind each one, thousands of computers around the world execute the same instructions and record the result.
The relationship between ETH, gas and fees is central to understanding how Ethereum works and, ultimately, what it costs to use and build on the network. It can be summarised in one line:
In This Article, You'll Learn
- ✓ The three roles ETH plays in the Ethereum network
- ✓ What gas is, and why complex transactions use more of it
- ✓ Why gas used and gas price should always be considered separately
- ✓ How EIP-1559 splits fees into a burned base fee and a priority fee
- ✓ How to read a wallet's fee estimate
- ✓ What happens when a transaction fails or gets stuck
1. The Key Roles of ETH
ETH is the native asset of Ethereum. It has three important roles within the network.
1.1 ETH Is the Fuel for Using Ethereum
When a user sends ETH, transfers an ERC-20 token, mints an NFT, or interacts with a DeFi application, the transaction requires computational work from the Ethereum network. The user pays for that work in ETH.
For example:
- Sending ETH requires network processing.
- Transferring USDC requires the USDC smart contract to execute.
- Minting an NFT requires a smart contract to create and record the NFT.
- Swapping tokens on a DEX requires multiple smart contract operations.
The underlying actions are different, but all consume Ethereum's computational resources and therefore require fees. This is why ETH is often described as the fuel of the Ethereum network.
1.2 ETH Provides Economic Security for Validators
ETH also helps secure the Ethereum network through Proof of Stake. Validators stake ETH to participate in validating transactions and maintaining the network, and their staked ETH creates an economic incentive to follow Ethereum's rules.
Validators can earn rewards for participating correctly, while certain forms of misconduct can result in penalties, including slashing. ETH therefore has an important role in Ethereum's security, not just its operation.
1.3 ETH Is a Widely Used Digital Asset
ETH is also an asset that can be held, transferred, traded, used as collateral, or deployed across applications. For example, ETH can be:
- Held in a wallet
- Sent to another Ethereum account
- Used as collateral in DeFi
- Exchanged for other tokens
- Wrapped into assets such as WETH
- Staked to participate in Ethereum's proof-of-stake system
These uses are separate from its role as the network's native payment mechanism, but they reinforce ETH's importance across the Ethereum ecosystem.
2. What Is a Transaction Fee?
Whenever a transaction is submitted, Ethereum needs to perform some amount of computational work. The fee is the economic price of using those network resources, and the more computational work an operation requires, the more gas it generally consumes.
The amount the user ultimately pays depends on two things:
This relationship is the foundation for understanding Ethereum fees. To understand why one transaction costs more than another, we need to look separately at gas used and gas price.
3. Gas Used: How Much Work Does the Transaction Require?
3.1 What Is Gas?
Instead, gas measures how much computational effort is required to execute a transaction. A simple transaction requires relatively little work; a complex smart contract interaction can require much more. The exact gas consumed depends on what the transaction actually does.
3.2 Why Does Every Action Have a Gas Cost?
Ethereum charges for every action because it is a shared resource: without a price, it would be flooded, and the people who keep it running would not be paid.
Remember that every transaction is repeated on thousands of computers around the world, and its results are stored by all of them, permanently. That is what makes Ethereum trustworthy, but it also makes computation on Ethereum far more expensive than on an ordinary server. Fees exist for three reasons:
- To prevent spam and attacks. If actions were free, anyone could clog the network with millions of useless transactions. A fee, even a small one, makes that expensive.
- To stop programs that never end. Ethereum can run any program, including one stuck in an endless loop by mistake or on purpose. Because every step costs gas, a runaway program simply runs out of fuel and stops. This is one of Ethereum's most elegant design choices.
- To reward the people who run the network. Validators spend money on hardware and lock up ETH. Newly issued ETH, plus the tips users add to their fees, pays them for doing this honestly. (The main part of each fee is burned rather than paid to validators, as Section 6 explains.)
A useful comparison is a toll road. The toll keeps traffic manageable, pays for maintenance, and charges more for heavier vehicles that cause more wear.
Gas therefore acts as both a pricing mechanism and a resource-management mechanism.
3.3 Why Do Complex Transactions Use More Gas?
Not all Ethereum transactions require the same amount of work. Consider two transactions:
Transaction B involves substantially more computation and state changes, so it consumes more gas.
| Transaction | What Ethereum has to do | Gas used |
|---|---|---|
| ETH transfer | Process a simple transfer | Lower |
| Token transfer | Execute token contract logic | Higher |
| DeFi swap | Execute multiple contract operations and update state | Higher |
| Complex DeFi transaction | Execute several interconnected operations | Potentially much higher |
The important distinction is: gas used measures the amount of computational work required by the transaction.
Every step a contract performs has a gas cost set by Ethereum's rules. Simple arithmetic is cheap, while reading and especially writing to permanent storage is expensive, because every node has to keep that data.
Typical amounts of gas used look roughly like this (exact figures vary by app and contract):
| Action | Approximate gas used | Why |
|---|---|---|
| Sending ETH | 21,000 (fixed) | The simplest possible transaction |
| Sending an ERC-20 token such as USDC | About 45,000 to 65,000 | Runs the token contract and updates two balances |
| Approving a token | About 45,000 | Writes one new allowance record |
| Swapping tokens on a trading app | About 100,000 to 200,000+ | Several contracts, prices, and balances involved |
| Minting an NFT | About 50,000 to 150,000+ | Creates a new record of ownership |
| Publishing a new smart contract | Often 1,000,000 or more | Stores the program's code permanently |
Worked Example
A token swap uses 150,000 gas, and the gas price is 2 gwei. The fee is 150,000 × 2 = 300,000 gwei, which is 0.0003 ETH. If ETH is worth $3,000, that is about $0.90.
If the network gets busy and the gas price rises to 40 gwei, the same swap would cost 0.006 ETH, or about $18. Same work, different price.
4. Gas Price: How Much Does Each Unit of Work Cost?
Gas price tells us how much you pay for each unit of gas used by a transaction. It is generally expressed in gwei, rather than ETH, because gas prices are usually very small amounts.
Before going further, it helps to understand the units Ethereum uses:
| Unit | Value in ETH | Where you'll see it |
|---|---|---|
| ETH | 1 | ETH balances, payments and asset prices |
| gwei | 0.000000001 ETH (one billionth) | Gas prices and fee settings |
| wei | 0.000000000000000001 ETH | Smallest unit; primarily used behind the scenes by software |
When a wallet or website says "gas price: 2 gwei," it means each unit of gas costs 2 billionths of an ETH.
4.1 What Determines the Gas Price?
Each block has limited space, so when more people want in than can fit, the price of getting in goes up.
A new Ethereum block is produced every 12 seconds, and each block can only hold a certain total amount of gas. This limit is set by the validators collectively and has been raised several times as the network's software has improved, but at any moment it is fixed. Block space is scarce, like seats on a flight.
When demand is low, there is room for everyone and the price stays low. When demand spikes, people compete for limited space and the price climbs, just as airline tickets cost more during holidays or ride-hailing prices surge during rush hour.
What causes spikes? Usually a burst of excitement where many people want to act at the same moment:
- A popular NFT launch, where thousands try to mint in the same few minutes
- Sharp market moves, when traders rush to buy, sell, or avoid having their loans closed
- A new token or app going viral
History offers vivid examples. In late 2017, the CryptoKitties game became so popular that it slowed the whole network. During the boom of 2021, a single token swap could cost $50 or more at peak times, pricing out ordinary users.
5. Why Gas Used and Gas Price Should Be Considered Separately
This distinction is one of the most important concepts in understanding Ethereum fees. A transaction can become more expensive because the transaction itself requires more work (gas used increases), or because Ethereum is more expensive to use at that moment (gas price increases). Or both can happen at the same time.
This distinction becomes particularly useful when diagnosing transaction costs. If a DeFi transaction is expensive, the question is not simply "Why is gas expensive?" Instead, ask:
6. The 2021 Fee Reform: EIP-1559
Ethereum's fee system was significantly changed in 2021 through EIP-1559. Before this reform, users primarily competed by submitting bids for gas, so the fee market could be difficult to predict, particularly during periods of high demand.
EIP-1559 introduced a more structured mechanism built around two key components, the base fee and the priority fee, which changed how Ethereum determines and distributes transaction fees.
6.1 Base Fee
The base fee is the protocol-determined minimum fee per unit of gas required for a transaction to be included in a block. It changes according to network demand: when demand is high, the base fee increases; when demand falls, the base fee decreases. The base fee therefore reflects the underlying demand for Ethereum's block space.
6.2 Priority Fee
The priority fee, often called the tip, is an additional amount offered to the validator. The user is effectively saying:
The priority fee can therefore influence how attractive a transaction is for inclusion, particularly when there is competition for block space. The validator receives the priority fee.
6.3 What Happens to the Transaction Fee?
Under the EIP-1559 model, the user's fee can be understood as having two major components:
Transaction fee = Gas used × (Base fee + Priority fee)
In practice, your wallet also sets a maximum fee per gas. You pay the current base fee plus your tip, up to that maximum, and any amount you allowed above what was actually needed is never charged.
So imagine your transaction uses 50,000 gas, and Ethereum's current fees are (a busy-network example): base fee = 50 gwei and priority fee = 2 gwei. Your total gas price is 52 gwei, and your transaction fee is:
But the 0.0026 ETH is split economically:
| Component | Amount | Where it goes |
|---|---|---|
| Base fee | 0.0025 ETH | Burned |
| Priority fee | 0.0001 ETH | Validator |
| Total | 0.0026 ETH |
So: base fee = required network charge → burned, and priority fee = additional tip → validator.
6.4 The Economics Behind EIP-1559
The 2021 fee reform (EIP-1559) answers three economic questions: how should a scarce resource be priced, who should be paid for providing it, and what should happen to the money? Each part of the fee answers one of these.
The resource: block space. Every 12 seconds, Ethereum produces a block with limited capacity. Block space is a perishable, scarce good, like airline seats or hotel rooms: unused space in one block can't be saved for the next. The challenge is pricing it fairly when demand swings wildly from minute to minute.
The problem with the old auction. Before 2021, Ethereum used a first-price auction: everyone submitted a sealed bid, and the highest bids won. Economists know this design has well-known flaws:
- Overpaying. You pay what you bid, not the minimum needed to get in. Since nobody knows what others will bid, people either overpay to be safe or underbid and wait.
- Strategic guessing. The best bid depends on predicting everyone else's bid, which is hard for experts and nearly impossible for ordinary users.
- Volatility. Prices jumped erratically from block to block even when overall demand was steady.
The result was a market that rewarded sophistication rather than simply willingness to pay.
The base fee: a posted price that adjusts like congestion pricing. EIP-1559 replaced the auction with a posted price, like a price tag in a shop. The network sets the base fee, and everyone in a block pays the same one. You no longer have to guess; you either accept the price or wait.
The clever part is how the price is set. Each block has a target size of half its maximum. If a block comes in above target, the base fee rises by up to 12.5% for the next block; if it comes in below, it falls. This is a feedback loop, similar to congestion pricing on toll roads: when traffic is heavy, the toll rises until enough people choose to wait, and when roads are empty, it falls.
Two economic features make this work well. First, the elastic block size acts as a buffer. Because blocks can temporarily stretch to twice the target, short bursts of demand are absorbed instead of instantly causing a price spike. Second, the base fee discovers the market price over time. Because 12.5% compounds quickly, sustained demand above capacity can roughly double the price every minute and raise it about tenfold within four minutes, until demand matches supply again.
The priority fee: paying for the marginal service. If the base fee sets the price of space, why tip at all? The tip covers two things. In normal conditions, it compensates the validator for the small extra cost and risk of including your transaction, so a small tip is enough; in a typical quiet period it is little more than a courtesy.
During sudden spikes, when demand exceeds even the doubled block size before the base fee can catch up, the tip becomes a mini-auction again. Those who value fast inclusion most can outbid others. So EIP-1559 doesn't abolish auctions entirely; it confines them to the moments when they're genuinely needed.
Burning: making the system honest. Burning the base fee is the most important and least intuitive part. The core reason is incentive compatibility: designing rules so that following them honestly is also each participant's best strategy.
If the base fee went to the validator who produced the block, validators would have reasons to manipulate it. They could fill blocks with their own fake transactions to push the base fee up for everyone, then collect the higher fees.
By destroying the base fee, no one profits from inflating it, so no one has a reason to game it. The validator's fee income from a transaction comes only from the tip, which the user chooses, so there is nothing to gain from pushing the base fee up. Economist Tim Roughgarden, who analysed EIP-1559 formally in 2020, showed that this design makes honest behaviour the best strategy for both users and validators under normal conditions.
6.5 Burning and ETH Supply
Burning the base fee creates a direct link between Ethereum network usage and ETH supply. When users consume Ethereum's block space, they pay base fees, and those base fees are burned. Therefore:
The amount burned depends on both how much gas is used and the base fee at the time, so periods of high network demand can result in significant ETH burning.
However, this does not mean that ETH automatically becomes deflationary whenever Ethereum is busy. Ethereum is simultaneously creating new ETH to reward validators, so there are two opposing flows:
- If issuance is greater than burning, ETH supply increases.
- If burning is greater than issuance, ETH supply decreases.
- If they are roughly equal, supply remains relatively stable.
6.6 The Trade-offs and Debates
The design isn't free of criticism, and these make good discussion points:
- Security budget. Burning means validators earn less from fees. Under proof of stake, security is mainly paid for by new issuance, so this matters less than it would have under mining, but some economists worry about long-term validator income if issuance is reduced.
- Value capture with Layer 2s. As activity moves to Layer 2s, fewer fees are burned on the main network. This has fuelled debate about whether ETH holders still benefit enough from Ethereum's growth.
- Not a fix for high demand. EIP-1559 makes fees more predictable, not cheaper. When demand exceeds capacity, prices still rise. The real fix for cost is more capacity, through Layer 2s and higher block limits.
- Extended to blob space. The 2024 Dencun upgrade added a separate fee market for the data that Layer 2s post to Ethereum ("blobs"), with its own base fee and burn. This shows the design was considered successful enough to reuse.
7. Reading a Transaction Fee Estimate
When you use a wallet, you usually do not calculate the fee manually. The wallet estimates the transaction's gas requirement and the prevailing gas prices, then presents an expected fee. You might see:
Depending on the wallet, you may also see:
| Field | What it means | Why it matters |
|---|---|---|
| Gas limit | The maximum amount of gas the transaction is allowed to consume | Sets a safety boundary for the transaction |
| Estimated gas used | The wallet's estimate of how much gas the transaction will actually consume if it executes successfully | Helps estimate the transaction's cost |
| Base fee | The protocol-determined price per unit of gas required for the transaction to be included | Reflects demand for Ethereum's block space; this portion is burned |
| Priority fee | The additional amount per unit of gas offered to the validator | Gives the validator an incentive to include the transaction |
| Maximum fee per gas | The maximum total price per unit of gas you are willing to pay, including base fee and priority fee | Protects you from paying more than your specified maximum if the base fee changes before inclusion |
| Estimated total fee | The wallet's estimate of the total ETH the transaction is expected to cost | Shows you approximately how much ETH you need |
The terminology can initially look confusing, but the underlying question is straightforward:
A useful way to interpret the estimate is:
- Step 1: Look at the gas requirement. How much work is the transaction expected to perform?
- Step 2: Look at the gas price. How expensive is Ethereum block space at that moment?
- Step 3: Look at the resulting fee. How much ETH will you actually need to pay?
8. What Happens When a Transaction Fails?
A transaction can fail for two common reasons:
- It ran out of gas because the gas limit was set too low for the work required.
- The contract refused it, perhaps because a sale sold out, or you lacked enough tokens or approval.
When this happens, everything the transaction tried to do is reversed. Your tokens stay where they were. But you still pay for the gas used up to the point of failure. If the contract refused it, that is only the gas used before it stopped. If it ran out of gas, that is the entire gas limit, because all of it was used up. The validators did the work of processing it, just as a taxi still charges if you get out halfway. Failed transactions show clearly on Etherscan, usually with a short reason.
9. When a Transaction Gets Stuck
A transaction can remain pending when it has not yet been included in a block. This can happen during periods of high demand if the transaction's fee settings are not attractive enough compared with other transactions competing for block space.
For transactions sent from the same account, Ethereum processes them according to their nonce, which establishes their order. A pending transaction can therefore hold up later transactions from that account.
Most wallets provide two ways to resolve this, both of which reuse the same nonce:
- Speed up: The wallet creates a replacement transaction with the same nonce but a higher fee, making it more attractive for inclusion. Most nodes only accept a replacement if its fee is meaningfully higher, typically by at least 10%. Only one transaction with a given nonce can ever confirm: if the replacement confirms first, the original is dropped, but if the original happens to be included first, the replacement is dropped instead.
- Cancel: The wallet creates a replacement transaction with the same nonce, typically sending 0 ETH to your own address, with a higher fee. If confirmed, this effectively replaces the original transaction, preventing the original action from being executed.
Both replacement transactions require paying a network fee because they are themselves transactions that must be processed by Ethereum.
10. A Practical Mental Model
When thinking about an Ethereum transaction fee, work through the following sequence:
This sequence gives you a complete picture of why an Ethereum transaction costs what it does.
11. Conclusion
For users, gas is the cost of accessing Ethereum's computational infrastructure. For businesses, gas is better understood as a variable cost of running blockchain-enabled functionality.
The fundamental principle is simple: Ethereum is a shared computational network, and gas is the mechanism that measures and prices the use of that network.
Key Takeaways
- ETH has three major roles: network fuel (it pays for computation), security asset (it is staked by validators) and digital asset (it is widely held, traded and used across applications).
- The transaction fee is the amount of ETH paid for using Ethereum's computational resources: Transaction Fee = Gas Used × Gas Price.
- Gas used is how much computational work the transaction requires, driven by its complexity, smart contract logic, number of operations and state changes.
- Gas price is how much each unit of that work costs, driven by demand for Ethereum's limited block space.
- A transaction can become more expensive because it requires more computation, because the network is busy, or both.
- Since EIP-1559, the base fee is burned and the priority fee goes to the validator; net ETH supply change = ETH issued − ETH burned.
- A failed transaction can still consume gas because Ethereum must execute it to determine that it should fail. The intended state changes are rolled back, but the computational resources already consumed cannot be recovered.





