# Mempools and Gas

> Pending crypto transactions wait in the mempool and pay fees to be included. Learn how Bitcoin fees and Ethereum gas work, EIP 1559 and how to avoid overpaying.

Source: https://learn.tradelabsai.com/crypto/mempools-and-gas/  
Track: Crypto · Level: Advanced · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "Mempools and Gas", https://learn.tradelabsai.com/crypto/mempools-and-gas/

When you send a crypto transaction, it is not confirmed instantly. It first goes into the mempool, a waiting area of pending transactions held by network nodes. Block producers pick transactions from the mempool, usually those paying the highest fees, and include them in the next block. On Ethereum and similar chains, fees are measured in gas. Understanding mempools and fees helps traders avoid overpaying, avoid stuck transactions and understand why costs spike during busy markets.

## The mempool

| Concept | Meaning |
|---|---|
| Mempool | Pool of valid but unconfirmed transactions on each node |
| Fee market | Users compete with fees for limited block space |
| Confirmation | Inclusion in a block; more blocks on top add security |
| Stuck transaction | A transaction with too low a fee that waits for a long time |
| Replace by fee | Resending the same transaction with a higher fee to speed it up |

When demand for block space is high, such as during market crashes, popular token launches or NFT mints, the mempool fills up and fees rise sharply.

## Bitcoin fees

Bitcoin blocks have limited space (measured in virtual bytes). Fees are quoted in satoshis per virtual byte (sat/vB):

```
fee = fee rate (sat/vB) × transaction size (vB)
```

A typical simple transaction is about 140 to 250 virtual bytes. At 20 sat/vB, a 200 vB transaction costs 4,000 satoshis, or $4 if Bitcoin is $100,000. During congestion, fee rates have exceeded 100 sat/vB. Wallets usually let you choose fast, normal or slow fees.

## Ethereum gas

Ethereum measures computation in gas. A simple ETH transfer uses 21,000 gas; a DEX swap might use 100,000 to 200,000 gas or more.

Since the EIP 1559 upgrade in August 2021, each block has a base fee that rises when blocks are full and falls when they are not. Users also add a priority fee (tip) for validators.

```
transaction fee = gas used × (base fee + priority fee)
```

The base fee is burned (destroyed), which reduces ETH supply. See [Ethereum](https://learn.tradelabsai.com/crypto/ethereum/).

**Example: Paying for a swap**
You make a DEX swap that uses 150,000 gas. The base fee is 20 gwei and you add a 2 gwei tip (1 gwei = 0.000000001 ETH). Fee = 150,000 × 22 gwei = 3,300,000 gwei = 0.0033 ETH. At $3,000 per ETH, that is about $9.90. In a quiet period with a base fee of 2 gwei, the same swap would cost about $1.80; during a frenzy with a base fee of 200 gwei, about $90. For small trades, gas can be a large share of the cost. See [Transaction Costs](https://learn.tradelabsai.com/orders/transaction-costs/).

## Layer 2 networks and cheaper chains

High fees on Ethereum's main chain pushed activity to layer 2 rollups such as Arbitrum, Optimism and Base, and to other chains such as Solana. After Ethereum's Dencun upgrade in March 2024 introduced cheaper data storage for rollups, typical layer 2 fees fell to cents or less. See [Blockchain Basics](https://learn.tradelabsai.com/crypto/blockchain-basics/).

## Mempools, MEV and privacy

Because public mempools show pending transactions, bots can react to them before confirmation, enabling front running and sandwich attacks. Private transaction relays let users bypass the public mempool. See [MEV](https://learn.tradelabsai.com/crypto/mev/).

## Practical tips

1. **Check current fees** with a fee tracker before sending.
2. **Avoid busy periods** for non urgent transactions.
3. **Use layer 2 networks** for small, frequent trades.
4. **Set appropriate fees:** too low can leave transactions stuck; too high wastes money.
5. **Use replace by fee or speed up options** if a transaction stalls.
6. **Batch transactions** where possible.
7. **Factor gas into DEX trade costs.** See [Centralized vs Decentralized Exchanges](https://learn.tradelabsai.com/crypto/cex-vs-dex/).

## Fees as a market signal

Rising fees and full mempools can signal heavy activity, often during sharp market moves, speculative manias or large liquidations. Some on chain analysts track fees as an indicator of network demand. See [On-Chain Analytics](https://learn.tradelabsai.com/crypto/on-chain-analytics/).

## Frequently asked questions

### What is the mempool?

The set of pending transactions that have been broadcast but not yet included in a block.

### What is gas in Ethereum?

A unit measuring computational work; users pay gas fees in ETH, made up of a burned base fee and a priority tip.

### Why are crypto fees high sometimes?

Because block space is limited, and when many users want to transact at once, they bid up fees to get included faster.

Next, learn the risks of moving assets between chains in [Bridge and Smart Contract Risk](https://learn.tradelabsai.com/crypto/bridge-and-smart-contract-risk/).

## Continue learning

- Next lesson: [Bridge and Smart Contract Risk](https://learn.tradelabsai.com/crypto/bridge-and-smart-contract-risk/)
- Previous lesson: [MEV](https://learn.tradelabsai.com/crypto/mev/)
- Related: [MEV](https://learn.tradelabsai.com/crypto/mev/): MEV is value extracted by reordering or inserting blockchain transactions. Learn sandwich attacks, arbitrage and liquidation MEV, and how to protect trades.
- Related: [Blockchain Basics](https://learn.tradelabsai.com/crypto/blockchain-basics/): A blockchain is a shared ledger secured by cryptography and consensus. Learn blocks, hashes, keys, wallets, proof of work and proof of stake, and finality.
- Related: [Ethereum](https://learn.tradelabsai.com/crypto/ethereum/): Ethereum is a programmable blockchain that runs smart contracts, with ether (ETH) as its native asset. Learn how it works, proof of stake, gas and price drivers.
- Related: [Centralized vs Decentralized Exchanges](https://learn.tradelabsai.com/crypto/cex-vs-dex/): Centralised exchanges hold your funds and match orders; decentralised exchanges trade from your wallet via smart contracts. Compare costs, safety and how each works.
- Related: [Transaction Costs](https://learn.tradelabsai.com/orders/transaction-costs/): Transaction costs include commissions, spreads, slippage, market impact and missed trades. Learn each part, how to estimate it and why it decides profits.
