What Are Gas Fees in Crypto?

Learn what gas fees are in cryptocurrency, how they work on Ethereum and other blockchains, why gas fees fluctuate, and practical strategies for reducing transaction costs in DeFi.

What Are Gas Fees in Crypto?

If you have ever tried to make a transaction on Ethereum or another blockchain, you have encountered gas fees. They are the unavoidable cost of doing business on a decentralized network, and understanding how they work is essential for anyone participating in DeFi.

Gas fees are the transaction costs users pay to have their operations processed and validated by the blockchain network. The name comes from a useful analogy: just as a car needs gasoline to run, a blockchain transaction needs "gas" to execute. The more complex the operation, the more gas it requires.

For DeFi users, gas fees are a particularly important consideration. Simple token transfers are relatively cheap, but complex smart contract interactions, such as depositing collateral, borrowing stablecoins, or executing a liquidation, can consume significantly more gas. Understanding gas fees helps you make informed decisions about when, where, and how to execute your DeFi transactions.

How Gas Fees Work on Ethereum

The Gas Unit System

Ethereum's gas system has three key components:

  1. Gas units — A measure of computational effort. Each type of operation has a fixed gas cost. A simple addition costs 3 gas, storing a value costs 20,000 gas, and a standard ETH transfer costs 21,000 gas. Complex DeFi transactions can consume hundreds of thousands of gas units.

  2. Gas price (in gwei) — The amount of ETH you are willing to pay per gas unit. One gwei is 0.000000001 ETH (one billionth of an ETH). Gas prices fluctuate based on network demand.

  3. Gas limit — The maximum number of gas units you are willing to consume. This acts as a safety cap. If a transaction would exceed the gas limit, it fails and reverts, but you still pay for the gas consumed up to that point.

Your total transaction fee equals: Gas units used x Gas price per unit

For example, a simple token transfer using 21,000 gas at a gas price of 30 gwei costs: 21,000 x 30 gwei = 630,000 gwei = 0.00063 ETH.

EIP-1559: The Modern Fee Structure

In August 2021, Ethereum implemented EIP-1559, which fundamentally changed how gas fees work. Instead of a single gas price, transactions now have two components:

  • Base fee — A minimum fee per gas unit that is algorithmically set by the network. This fee is burned (destroyed) rather than paid to validators. The base fee increases when blocks are more than 50% full and decreases when they are less than 50% full.

  • Priority tip — An optional additional fee paid directly to validators to incentivize them to include your transaction sooner. During high-demand periods, a higher priority tip means faster inclusion.

This system made gas fees more predictable. Instead of blindly guessing a gas price, users can see the current base fee and decide how much of a priority tip to add based on their urgency.

Why Gas Fees Fluctuate

Supply and Demand Dynamics

Gas fees are fundamentally driven by supply and demand. Each Ethereum block has a target gas limit of roughly 15 million gas units (with a maximum of 30 million). This means there is a fixed supply of block space available per block, produced roughly every 12 seconds.

When demand for block space is high, users compete by offering higher priority tips. When demand is low, even minimal tips result in fast confirmation. This creates a fee market where prices can swing dramatically depending on network activity.

What Causes Fee Spikes

Several common scenarios cause gas fee spikes:

  • Popular NFT launches — When a highly anticipated NFT collection goes live, thousands of users simultaneously compete to mint, driving fees sky-high.
  • Market crashes — During sharp price drops, users rush to add collateral, repay loans, or exit positions before liquidation. This DeFi-driven demand can push gas fees to extreme levels precisely when users can least afford them.
  • Protocol launches — New DeFi protocols, airdrops, or token launches attract large numbers of simultaneous transactions.
  • Memecoin frenzies — Surges in speculative trading on decentralized exchanges can fill blocks rapidly.

Time-of-Day Patterns

Gas fees tend to follow predictable daily patterns tied to when different regions are most active. Fees are typically highest during US and European business hours and lowest during Asian evening hours and weekends. Savvy DeFi users time non-urgent transactions accordingly.

Gas Fees Across Different Blockchains

Ethereum Mainnet

Ethereum mainnet has historically had the highest gas fees in the crypto ecosystem because of its popularity and relatively limited throughput. A complex DeFi transaction can easily cost $10-50 during normal times and over $100 during peak congestion. This has made Ethereum mainnet increasingly the domain of larger transactions where the fee is a smaller percentage of the total value.

Layer 2 Networks

Layer 2 scaling solutions like Arbitrum, Optimism, and Base have been the most effective answer to Ethereum's high gas fees. These networks process transactions off the Ethereum mainnet while inheriting its security guarantees.

Gas fees on Layer 2 networks are typically 10-100x cheaper than Ethereum mainnet. A DeFi transaction that costs $30 on mainnet might cost $0.10-0.50 on Arbitrum. This dramatic reduction has made DeFi accessible to a much broader range of users and transaction sizes.

Borrow by Sats Terminal supports multiple chains, including Layer 2 networks, giving users the flexibility to choose lower-cost networks for their Bitcoin-backed borrowing.

Solana

Solana takes a different approach, with a fixed base fee of 5,000 lamports (approximately $0.001) per signature, plus priority fees during congestion. Solana's high throughput means that even during busy periods, fees rarely exceed a few cents. However, this low-fee model has its own trade-offs in terms of network architecture and decentralization.

Bitcoin

Bitcoin uses a fee market based on transaction size in bytes rather than computational complexity. During busy periods, Bitcoin transaction fees can be substantial, but the introduction of the Lightning Network and other layer 2 solutions has provided lower-cost alternatives for smaller transactions.

Gas Fees and DeFi Transactions

Common DeFi Operations and Their Gas Costs

Not all DeFi transactions cost the same amount of gas. Here is a rough hierarchy from least to most expensive:

  • Simple token transfer — ~21,000 gas units. The cheapest possible on-chain operation.
  • Token approval — ~46,000 gas units. Required before interacting with a new protocol for the first time.
  • Token swap on a DEX — ~100,000-200,000 gas units. Varies based on the AMM and routing complexity.
  • Lending protocol deposit — ~150,000-300,000 gas units. Depositing collateral into a lending protocol.
  • Borrowing — ~200,000-400,000 gas units. Drawing a loan against deposited collateral.
  • Complex multi-step transactions — ~500,000+ gas units. Flash loans, yield farming deposits, and other multi-contract interactions.

The Gas Fee Dilemma for Borrowers

Gas fees create a meaningful consideration for DeFi borrowers. If you are borrowing $500 worth of stablecoins against Bitcoin collateral, paying $30-50 in gas fees on Ethereum mainnet represents a 6-10% upfront cost. This is why smaller borrowers benefit significantly from using Layer 2 networks or alternative chains where gas fees are negligible relative to the loan amount.

Platforms like Borrow by Sats Terminal help address this by supporting lending protocols across multiple chains, so users can choose the network that offers the best combination of rates and transaction costs for their specific loan size. Borrow also collapses what would normally be a multi-step DeFi strategy — bridge, wrap, supply, borrow — into a single approval flow. The gas overhead is whatever the chosen chain requires, not the sum of every intermediate step you'd otherwise click through yourself.

Failed Transactions Still Cost Gas

One important gotcha for DeFi beginners: if your transaction fails (for example, due to insufficient gas limit, expired slippage tolerance, or a reverted smart contract call), you still pay for the gas consumed up to the point of failure. The blockchain's validators performed computational work to attempt your transaction, and they are compensated for that work regardless of the outcome.

This means setting appropriate gas limits and double-checking transaction parameters before confirming is important to avoid paying for failed transactions.

Strategies for Reducing Gas Fees

Use Layer 2 Networks

The single most effective strategy for reducing gas fees is to use Layer 2 networks. Arbitrum, Optimism, Base, and other L2s offer Ethereum's security with a fraction of the cost. Most major DeFi protocols now deploy on multiple L2s, and bridging assets to these networks is straightforward.

Time Your Transactions

If your transaction is not time-sensitive, waiting for a period of lower network activity can save significant amounts on gas. Tools like Etherscan's gas tracker show current and historical gas prices, helping you identify optimal timing. Weekends and late-night hours (US time) typically offer lower fees.

Batch Transactions

Some protocols and wallets support transaction batching, where multiple operations are combined into a single transaction. This amortizes the base transaction cost across multiple actions, reducing the per-operation gas fee.

Use Gas-Efficient Protocols

Not all protocols are equally gas-efficient. Some DeFi protocols have been specifically optimized for lower gas consumption through careful smart contract engineering. When comparing lending protocols on Borrow , gas costs are an additional factor worth considering alongside interest rates and liquidation thresholds.

Set Appropriate Gas Limits

Most wallets automatically estimate the gas limit for a transaction, but they often add a generous buffer. For standard operations, the wallet's estimate is usually fine. For complex DeFi transactions, it is worth checking that the gas limit is reasonable. Setting it too low causes the transaction to fail, and setting it too high does not cost extra (you only pay for gas actually used), but it can tie up funds temporarily.

The Future of Gas Fees

EIP-4844 and Proto-Danksharding

Ethereum's EIP-4844 (implemented in early 2024) introduced "blob" transactions that dramatically reduced the data costs for Layer 2 networks. This made L2 gas fees even cheaper, often bringing DeFi transaction costs down to pennies. Further upgrades in Ethereum's roadmap aim to continue reducing costs.

Account Abstraction

Account abstraction (ERC-4337) enables new gas fee models, including the ability for protocols to pay gas fees on behalf of their users (gas sponsorship). This could eliminate the need for users to hold ETH for gas entirely, making DeFi more accessible to newcomers.

Alternative Fee Models

Some newer blockchains and Layer 2 networks are experimenting with alternative fee models, including fixed fees, subscription-based gas, and fee markets denominated in stablecoins. These innovations aim to make transaction costs more predictable and user-friendly.

Key Takeaways

  • Gas fees are the transaction costs paid to blockchain validators for processing and validating operations on the network.
  • Fees fluctuate based on network demand; high-activity periods drive fees up as users compete for limited block space.
  • Complex DeFi transactions like borrowing and lending consume more gas than simple transfers, making fee optimization important for active users.
  • Layer 2 networks offer dramatically lower gas fees, often 10-100x cheaper than Ethereum mainnet, while maintaining security.
  • Platforms like Borrow by Sats Terminal support multiple chains, helping users choose the most cost-effective network for their Bitcoin-backed lending and borrowing needs.

Common Questions

Gas fees are the transaction costs users pay to execute operations on a blockchain network. On Ethereum, gas fees compensate validators for the computational resources needed to process and validate transactions. Every action on the blockchain, from a simple token transfer to a complex smart contract interaction like borrowing against collateral, requires gas. The fee amount depends on the complexity of the transaction and current network demand.

Related Questions