IFCCI
Back to NewsInsight

What is a Mempool?

IFCCI Editorial · Communications22 July 2025

How Bitcoin Decides Which Transaction to Keep

Bitcoin elegantly solves the problem of conflicting transactions with a system called mining.

Let’s break it down.

Step 1: Transactions Go to the Memory Pool

When a transaction is made on the Bitcoin network, it’s not immediately written to the blockchain. Instead, it’s first sent to a temporary holding area called the memory pool, or mempool for short.

Every full node (computer running the Bitcoin software) has its own mempool. It stores unconfirmed transactions that the node has verified as valid. Think of it like a queue where transactions wait their turn to be added to the blockchain.

  • The mempool holds unconfirmed transactions.
  • The blockchain holds confirmed transactions bundled into blocks.

Step 2: Conflicting Transactions Enter the Network

Let’s say you try to cheat the system:

  • On one part of the network, you send Transaction A (purple) using your bitcoin to one person.
  • Then on another node, you send Transaction B (red), using the same bitcoin to someone else.

Both transactions will enter the network and spread to other nodes.

Each node stores the transactions in its mempool but does not immediately update the blockchain. Some nodes may get Transaction A first, others may get Transaction B.

But again—nothing is final yet. These are just unconfirmed transactions waiting in mempools.

Step 3: Mining Decides Which Transaction Gets Confirmed

Here’s where mining comes in.

All miners on the network start working to confirm transactions from their mempools by adding them to a new block on the blockchain.

They compete to be the first to successfully add a block (which includes a set of transactions) to the blockchain.

Let’s say one miner (the yellow node) wins the race. It adds a block that includes Transaction A to its copy of the blockchain.

Once that happens:

  • It shares the updated blockchain with other nodes.
  • Other nodes accept this version as the official record.
  • They remove Transaction B from their mempools since the bitcoin it tried to spend has already been used in Transaction A.

Final Outcome

Now the entire Bitcoin network agrees on a single version of the blockchain that includes only Transaction A. The attempted double-spend in Transaction B fails.

This process of competition—mining—ensures only one valid transaction makes it to the blockchain, solving the double-spending problem.

So, to recap:

  • Transactions go to the mempool first.
  • Nodes compete through mining to confirm transactions.
  • The first valid block added to the blockchain becomes the official record.
  • Conflicting transactions are discarded.

And that’s how Bitcoin picks which transaction to keep.

Stay updated with IFCCI developments