SKIP TO CONTENT
Conceptdefi basicsBeginner

What is Gas in Crypto?

Understanding transaction fees on Ethereum and other blockchains.

11 min read

What is Gas?

Gas is the fee you pay to execute transactions and run smart contracts on blockchain networks. The term originated from Ethereum, where "gas" represents the computational effort required to process your transaction. Similar to how a car needs gas to run, blockchain transactions need gas to execute.

Understanding gas is essential for any DeFi user because it directly impacts your costs. On Ethereum mainnet during peak activity, a simple token swap might cost $20-50 in gas fees. During quiet periods, the same transaction might cost $2. Learning when and how to optimize gas can save you significant money.

How Gas Fees Work

Gas fees on Ethereum (and EVM-compatible chains) consist of several components:

Gas Limit: The maximum amount of computational work your transaction can use. Simple transfers need ~21,000 gas. Complex DeFi interactions might need 200,000-500,000+ gas. Base Fee: The minimum price per unit of gas, set by the network based on demand. This fee is burned (destroyed), not paid to validators. Priority Fee (Tip): An optional additional fee paid directly to validators to prioritize your transaction. Higher tips = faster inclusion. Total Fee Formula:

Total Fee = Gas Used × (Base Fee + Priority Fee)

Example: A swap using 150,000 gas at 30 Gwei base fee + 2 Gwei tip:

150,000 × 32 Gwei = 4,800,000 Gwei = 0.0048 ETH ≈ $12 at $2,500 ETH

Understanding Gwei

Gwei is the standard unit for measuring gas prices:

  • 1 Gwei = 0.000000001 ETH (one-billionth of an ETH)
  • 1 ETH = 1,000,000,000 Gwei

Using Gwei makes gas prices more readable. Instead of saying "0.000000030 ETH per gas," we say "30 Gwei."

Typical Gas Price Ranges (Ethereum L1):
ConditionBase FeePriority FeeTotal
. . . . . -. . . . .. . . . . . .. . . -
Very Low5-10 Gwei1-2 Gwei6-12 Gwei
Normal15-30 Gwei1-3 Gwei16-33 Gwei
High50-100 Gwei2-5 Gwei52-105 Gwei
Extreme200+ Gwei5-10+ Gwei210+ Gwei

Why Gas Prices Fluctuate

Block Space is Limited: Ethereum processes ~15 transactions per second. When demand exceeds capacity, users bid up gas prices to get included. Market Events: Major token launches, NFT mints, or market volatility cause spikes as everyone rushes to transact. Time of Day: Gas is typically lower during US night hours (when Europe and US overlap is minimal) and weekends. Network Upgrades: Gas spikes occur during major protocol events as users reposition.

Gas on Layer 2 Networks

L2 networks process transactions off Ethereum mainnet, dramatically reducing gas costs:

NetworkTypical Swap Costvs Ethereum L1
. . . . -. . . . . . . . .. . . . . . . .
Ethereum L1$5-50Baseline
Arbitrum$0.10-0.5095% cheaper
Optimism$0.10-0.5095% cheaper
Base$0.05-0.3097% cheaper
Polygon$0.01-0.1099% cheaper

L2s achieve lower costs by batching many transactions together and posting compressed data to Ethereum.

Tips for Saving on Gas

Use L2 Networks: For transactions under $10,000, L2s offer the same DeFi protocols at 90-99% lower gas costs. Time Your Transactions: Use tools like Etherscan Gas Tracker to find low-activity periods. Weekends and US night hours are typically cheaper. Batch Operations: Combine multiple actions into fewer transactions when possible. Some protocols offer batch functions. Set Appropriate Gas Limits: Too high wastes money on buffer; too low causes failures. Most wallets estimate well, but verify for complex transactions. Use Gas Tokens: Some protocols (like Cowswap) offer gas-free swaps by batching orders. Simulate First: Use tools like Tenderly to simulate transactions before submitting, avoiding failed transaction fees.

Gas on Non-EVM Chains

Different blockchains have different fee structures:

Solana: Fees are typically $0.00025-0.001 per transaction, regardless of complexity. No gas bidding. Fees are fixed. Bitcoin: Fees based on transaction size in bytes, not computation. Priority by fee-per-byte. Cosmos Chains: Each chain sets its own fee token and pricing.

Understanding Failed Transactions

When a transaction fails, you still pay gas for the computational work performed before failure:

Common Causes:
  • Slippage exceeded (swap price moved too much)
  • Ran out of gas (limit set too low)
  • Reverted by contract (conditions not met)
  • Nonce issues (wrong transaction order)
How to Avoid:
  • Set appropriate slippage tolerance
  • Don't manually lower gas limits
  • Check contract conditions before submitting
  • Clear pending transactions before new ones

Gas Monitoring Tools

Etherscan Gas Tracker: Real-time gas prices with historical charts blocknative.com: Gas price predictions and mempool data L2BEAT: Compare L2 gas costs across networks Fensory: Track gas costs across your DeFi positions

Monitor gas prices and optimize your DeFi costs with Fensory. Know when fees are low and save on every transaction.

Frequently Asked Questions

Why are Ethereum fees so high?

Ethereum L1 has limited block space (~15 TPS). When demand exceeds capacity, users bid up prices. Use L2s (Arbitrum, Base, Optimism) for 90-99% lower fees.

What is Gwei?

Gwei is 0.000000001 ETH. It's used to express gas prices in readable numbers. 30 Gwei is easier to understand than 0.00000003 ETH.

Why did I pay gas for a failed transaction?

You pay for computational work performed before the failure. The network processed your transaction until it hit an error. To avoid: set correct slippage, don't lower gas limits, verify conditions.

When is gas cheapest?

Typically US night hours (12-6 AM ET) and weekends when trading activity is lower. Use gas trackers to find optimal times.

Do I need ETH for gas on L2s?

Yes, most L2s use ETH for gas. Bridge some ETH to your L2 before attempting transactions.

Risk Disclaimer

Gas costs are variable and can spike unexpectedly. Failed transactions still consume gas. Always verify transaction details and ensure sufficient balance for fees. This content is educational and not financial advice.

. -

Want to minimize your DeFi costs? Fensory is the crypto wealth super app that helps you track gas and find the most cost-effective opportunities.

[Explore Fensory →](https://www.fensory.com)

Frequently Asked Questions

Ready to apply what you learned? See live yield data.

Track live yields, compare protocols, and build your DeFi portfolio with Fensory.

GET EARLY ACCESSArrow right