Gas Fee
A gas fee is the transaction fee paid to a blockchain network, such as Ethereum, to have a transaction processed; it rises when the network is busy.
A gas fee is what you pay the network to process a transaction or smart contract call. On Ethereum it has two parts: a base fee set by the protocol and a tip that helps your transaction get picked. Fees rise when the network is busy.
- Category
- Cryptocurrency and Blockchain
- Reading time
- 4 min
- Also called
- Gas, Network fee, Transaction fee
- Updated
Gas fees in plain words
What you pay in gas has two parts: a base fee and an optional tip, called the priority fee.1
The base fee is the minimum for a valid transaction.1 It is burned, and validators keep only the tip.2
Offer too small a tip and validators may skip your transaction.1
How a gas fee is worked out
Gas units
Every action costs gas units; a simple ETH transfer uses 21,000.1
Base fee
Each block sets a base fee that works like a minimum price.1
Add a tip
The priority fee is added on top to attract validators.1
Set a max fee
Your wallet sets a maximum fee, and anything above base fee plus tip is refunded.1
Multiply
Fee = gas units × (base fee + tip).
Watch demand
The base fee can rise or fall by up to 12.5% per block depending on how full blocks are.1
Worked examples
Example 1 — Simple ETH transfer
0.000252 ETHA hypothetical transfer uses 21,000 gas. Base fee 10 gwei, tip 2 gwei.
| Price per gas | 10 + 2 = 12 gwei |
| Total | 21,000 × 12 = 252,000 gwei |
| In ETH | 252,000 gwei = 0.000252 ETH |
The transfer size matches the 21,000 units of gas ethereum.org gives for an ETH transfer.1
Example 2 — Busy network
≈ +42% in 3 blocksHypothetically the base fee climbs from 10 gwei for 3 full blocks at the maximum step.
| Block 1 | 10 × 1.125 = 11.25 gwei |
| Block 2 | 11.25 × 1.125 ≈ 12.66 gwei |
| Block 3 | 12.66 × 1.125 ≈ 14.24 gwei |
Each full block can push the base fee up by a maximum of 12.5%.1
Example 3 — Max fee refund
0.0015 ETH refundedA hypothetical swap uses 150,000 gas with max fee 30 gwei; base fee is 18 gwei and tip 2 gwei.
| Paid | 150,000 × 20 = 3,000,000 gwei |
| Reserved | 150,000 × 30 = 4,500,000 gwei |
| Refunded | 4,500,000 − 3,000,000 = 1,500,000 gwei |
The unused part of the maximum fee — above base fee plus tip — went back to the sender.1
Base fee vs priority fee
| Aspect | Base fee | Priority fee (tip) |
|---|---|---|
| Who sets it | The protocol | The user or wallet |
| Who receives it | Nobody, it is burned | The validator |
| Purpose | Minimum price for block space | Win priority in the block |
| Moves with | Block fullness | Competition for inclusion |
Where gas fees affect trading
DEX trades
Add gas to Trading Fees and Commissions when judging small trades.
Timing
Busy periods during Volatility raise costs.
Order size
Fixed gas hurts small Order sizes most.
Fast exits
Higher tips help urgent trades during a Liquidation risk.
Advantages and disadvantages
Advantages
- Prevents spam by pricing block space.
- Fee formula is transparent.
- Max fee caps what you can pay.
Disadvantages
- Costs spike when the network is busy.
- Fixed costs hurt small trades.
- Failed transactions still cost gas.
- Gas units vary by contract, so estimates can be off.
Going deeper
Read as far as you need. Each level builds on the one before it.
Two parts
Beginner
Your fee is base fee plus tip, multiplied by gas used.1
Why the base fee is burned
Intermediate
Because the base fee is burned, validators gain nothing by pushing it up.2
Failed transactions
Advanced
Fees are charged whether a transaction succeeds or fails, so a reverted DeFi trade still costs money.3
Common mistakes
Setting the tip to zero
The transaction may sit unpicked.
Ignoring gas on small trades
Fees can exceed the profit.
Retrying failed swaps blindly
Each failure is charged.
Confusing gas units and price
Units measure work; gwei is the price.
Check your understanding
Test yourself before moving on. Each answer comes with an explanation.
Key points to remember
- Gas is the fee for network work.
- Fee = gas used × (base fee + tip).
- The base fee is burned; the tip goes to the validator.
- Busy blocks raise the base fee.
- Failed transactions still pay gas.
Frequently asked questions
What is gwei?
Why are gas fees sometimes very high?
Can I get gas back?
Further learning
- Trading Fees and Commissions
Total trading cost.
- Slippage
The other hidden cost on DEXs.
- Volatility
Why fees spike in fast markets.
- Order
How order size meets fixed fees.
Sources
This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.
- ethereum.org. Ethereum gas and fees: technical overview (opens in a new tab) Checked .
- Ethereum Improvement Proposals. EIP-1559: Fee market change for ETH 1.0 chain (opens in a new tab) Checked .
- European Securities and Markets Authority (ESMA). Decentralised Finance in the EU: Developments and risks (TRV, Oct 2023) (opens in a new tab) Checked .
Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.