How Gas Fees Work and 7 Ways To Reduce Them
Gas fees are transaction costs on Ethereum. This guide explains what they are, why they vary, and practical strategies to minimize them.
TLDR
- Gas fees are payments to network validators for processing transactions
- Fees = Gas Used × Gas Price (measured in gwei per gas unit)
- Network congestion drives fees up. Busy times cost more.
- Use Layer 2 solutions (Arbitrum, Optimism, Base) for 10-100x lower fees
- Batch transactions, use off-peak hours, and optimize gas limits to save
By William S. · Published May 8, 2024
What Are Gas Fees?
Gas fees are payments you make to Ethereum network validators (nodes) for processing your transactions. Every transaction, from sending ETH to swapping tokens on Uniswap, requires gas.
Think of gas like a toll road: you pay validators to include your transaction in the next block. Higher fees = faster inclusion. Lower fees = wait longer (or get skipped entirely).
How Gas Fees Are Calculated
Gas fees = Gas Used × Gas Price
Gas Used
Every operation on Ethereum costs a certain amount of "gas units":
- Simple ETH transfer: 21,000 gas units
- ERC-20 token transfer: ~65,000 gas units (includes approval)
- Uniswap swap: ~150,000–200,000 gas units (complex calculation)
- NFT mint: ~50,000–150,000 gas units (varies by contract)
The contract's code determines gas used. More complex operations = more gas.
Gas Price
Gas price is measured in gwei (1 gwei = 0.000000001 ETH). You set this when submitting a transaction. Validators prioritize higher gas price transactions.
Example: If gas used = 100,000 and gas price = 50 gwei:
100,000 × 50 gwei = 5,000,000 gwei = 0.005 ETH
At ETH price of $3,000, that's $15 for one transaction.
Why Gas Fees Vary
Network Congestion
Blocks have limited space (~30M gas per block on Ethereum). When demand exceeds capacity, fees spike. During peak hours (U.S. evenings, major NFT drops, DeFi activity), fees can hit $50–200+ per transaction.
Block Space Competition
Validators prioritize transactions by gas price. If everyone's offering 50 gwei, you need 60+ gwei to get included faster. This creates an auction system where fees rise with demand.
Transaction Complexity
Complex operations (multi-step DeFi interactions, contract deployments) use more gas than simple transfers. Using smart contracts with efficient code helps, but the blockchain's computation limits still apply.
7 Ways To Reduce Gas Fees
1. Use Layer 2 Solutions
Layer 2 networks (L2s) like Arbitrum, Optimism, Base, and Polygon process transactions off-chain and batch them to Ethereum. Result: 10-100x lower fees.
Example costs (as of January 2025):
- Ethereum mainnet: $5–50 per transaction
- Arbitrum: $0.10–$0.50 per transaction
- Optimism: $0.15–$0.60 per transaction
- Base: $0.05–$0.30 per transaction
Most DeFi protocols (Uniswap, Aave, etc.) are available on L2s. You'll pay a one-time bridge fee to move assets from mainnet to L2, then enjoy low fees for all subsequent transactions.
2. Time Your Transactions
Gas fees are lowest during off-peak hours:
- Best times: Early morning U.S. hours (2 AM–6 AM ET), weekends, holidays
- Worst times: U.S. evenings (6 PM–11 PM ET), major NFT drops, market volatility
Tools like Etherscan Gas Tracker show current fee estimates. Wait for dips if your transaction isn't urgent.
3. Batch Multiple Operations
Instead of 5 separate transactions costing $10 each ($50 total), batch them into one transaction costing $20–$30. Many wallets and dApps support batching:
- Gnosis Safe: Multi-sig wallet with built-in batching
- Uniswap: Combine multiple swaps in one transaction
- MetaMask: "Advanced gas controls" let you optimize gas settings
4. Optimize Gas Price
You don't always need the highest gas price. Use tools to find the minimum price that gets included:
- BlockNative Gas Estimator: Real-time gas price recommendations
- MetaMask's "Low" or "Medium" setting often works for non-urgent transactions
- Set a custom gas price slightly above the "safe low" estimate
If your transaction isn't time-sensitive, start with a lower gas price. If it doesn't get included within a few blocks, increase it.
5. Reduce Gas Limit When Possible
Gas limit is the maximum gas you're willing to pay. Setting it too high wastes money if the transaction uses less. Setting it too low causes the transaction to fail (but you still pay the gas).
Most wallets auto-estimate gas limits. For simple transfers, use 21,000 gas. For token approvals, wallets typically suggest 45,000–65,000 gas, which is usually safe.
Only manually adjust gas limits if you know what you're doing. Default estimates are usually correct.
6. Use Efficient DApps and Contracts
Some DeFi protocols are more gas-efficient than others. Example: Curve's concentrated liquidity pools are more efficient than Uniswap V2 for certain trades. Compare gas costs before choosing a platform.
On Layer 2s, efficiency matters less since fees are already low. On mainnet, small differences add up over many transactions.
7. Avoid Unnecessary Contract Interactions
Each contract call costs gas. Minimize:
- Token approvals: Approve once with a high limit (or infinite with trusted contracts) instead of approving for each transaction
- Separate swaps: Use aggregators like 1inch or ParaSwap that route through the best path automatically
- Multiple NFT transactions: Batch minting or transfers when possible
Real-World Example: Saving $45 on a Swap
Scenario: You want to swap 1 ETH for USDC.
Option 1 (Mainnet): Uniswap on Ethereum during peak hours
- Gas price: 100 gwei
- Gas used: 150,000
- Cost: 150,000 × 100 gwei = 0.015 ETH = $45 (at $3,000 ETH)
Option 2 (Layer 2): Uniswap on Arbitrum
- Gas price: 0.1 gwei (on L2)
- Gas used: 150,000
- Cost: 150,000 × 0.1 gwei = 0.000015 ETH = $0.045
Savings: $44.96 (you'd need to bridge to L2 first, but that's usually a one-time cost).
When High Gas Fees Are Worth It
Sometimes paying more makes sense:
- Urgent transactions: If you need a liquidation or trade executed immediately, pay the premium
- Large transaction values: If you're moving $100,000, a $50 gas fee is 0.05%, acceptable
- One-time setup: Bridge to L2, deploy a contract, or set up complex positions might justify higher fees
Tools and Resources
- Etherscan Gas Tracker: Real-time gas price estimates
- BlockNative Gas Estimator: Advanced gas price recommendations
- L2Fees.info: Compare fees across Layer 2 networks
- Revoke.cash: Revoke unnecessary token approvals (saves gas on future transactions)
Future: Ethereum Improvements
Ethereum is working on reducing fees:
- EIP-4844 (Proto-Danksharding): Reduces L2 data costs, making L2s even cheaper
- Full Danksharding: Increases block space capacity, reducing mainnet fees
- Account Abstraction: Could enable gasless transactions for users (sponsors pay)
Until then, Layer 2s remain the most practical solution for most users.
Frequently Asked Questions
What's the difference between gas price and gas limit?
Gas limit is the maximum gas you'll pay (set by you, based on transaction complexity). Gas price is what you pay per gas unit (set by you, based on network demand). Total cost = limit × price.
Why do gas fees fluctuate so much?
Fees are determined by supply and demand. When many people want to transact simultaneously (NFT drops, market volatility, popular dApps launching), fees spike. Off-peak hours see lower fees.
Can I cancel a pending transaction?
You can replace a pending transaction with a new one using the same nonce and a higher gas price. Some wallets support this with a "Speed Up" or "Cancel" button. The new transaction replaces the old one.
Are gas fees refunded if a transaction fails?
No. Failed transactions still consume gas (validators still process them). If a transaction fails due to low gas limit, you pay for gas used up to the failure point. Always test with small amounts first.
How do Layer 2 solutions reduce fees?
L2s process transactions off-chain and batch them to Ethereum mainnet. Instead of paying for each transaction individually, thousands of transactions share the cost of one mainnet batch, dramatically reducing per-transaction fees.
Should I always use Layer 2 for everything?
For most DeFi interactions, yes. L2s are cheaper and faster. However, mainnet might be needed for large transfers (better security), interactions with protocols only on mainnet, or one-time operations where L2 bridge fees aren't worth it.