Back to blogs
Written by
ProgrammerSmart
Published on
October 11, 2024

What Is A Blockchain Unconfirmed Transaction?

Table of Contents

What does a blockchain unconfirmed transaction mean?

Blockchain unconfirmed transactions are transactions sent to the blockchain network but not yet included in a block. This is a normal stage in the lifecycle of every blockchain transaction.

There are 2 common ways a transaction can be unconfirmed:

  1. It hasn’t yet been selected by a node for block inclusion
  2. The transaction was in a forked chain that did not reach consensus

Blockchain transaction lifecycle

The technical details of how transactions are included in a block differs from chain to chain. Here we will paint a broad picture that applies to blockchains that operate with proof of work consensus (PoW) such as Bitcoin and blockchains with proof of stake (PoS) consensus such as Ethereum.

1. The transaction is stored in the mempool

When a user submits a transaction, the transaction is propagated over the blockchain network. Nodes (miners for PoW and validators for PoS) pick up these transactions and temporarily store them in a place where other unconfirmed transactions are stored.

This place where all unconfirmed blockchain transactions are stored is called a mempool. Each node has their own unique mempool, and collectively, all mempools of all nodes is referred to as "the mempool".

Diagram of a user's unconfirmed transaction broadcasting to nodes.
Illustration of unconfirmed transactionss in a node's mempool

2. A Node validates the transactions

Nodes  select and validate the unconfirmed transactions from the mempool to include them in the next block. In general, nodes pick transactions and arrange them in a way to maximize profit if their proposed block is accepted.

Sometimes, a transaction might remain unconfirmed if no node has decided to include it into a block to be proposed. The most common cause for this is low transaction fee.

Two most common strategies adopted by nodes to maximize profit are:

  1. Ordering transactions by highest transaction fee
  2. MEV (Maximal Extractable Value). This topic is out scope for this article.

Illustration of unconfirmed transactions in the mempool being added to blocks.

In PoW chains, miners perform intensive number-crunching calculations to find the next block. In PoS chains, validators simply propose the new block.

The block is broadcasted to the network, each node in the network verifies this block and appends it to what they think is the latest state of the blockchain. The unconfirmed transaction is now included into the blockchain.

So it’s now confirmed, right? Yup the transaction is confirmed. For now. Maybe. But it might also change back to unconfirmed. You need to wait before your blockchain transaction is truly confirmed.

Illustration of blocks with unconfirmed transactions being transmitted to the network.

How can a confirmed transaction become an unconfirmed blockchain transaction?

The short answer is that a fork in the chain can cause transactions to be included in one chain but not in another. Once consensus is reached, the transaction's status becomes finalized. Check out here for more info.

What is a fork?

A fork is a split in the chain caused by disagreement between nodes about the current state of the blockchain. However blockchains are designed, to eventually converge into a single chain, or at least make it infeasible for chain splits to remain unresolved for a long time. For example, Bitcoin is mathematically designed so that forks resolve to a single chain over time. In Ethereum, blocks are typically finalized after 2 to 3 epochs (1 epoch is 32 blocks). We won’t dig any deeper on how different protocols come to consensus on the state of the blockchain.

Let’s say that the transaction you submitted was included into block A. Imagine that the network is experiencing a fork in the chain. Half of the nodes in the network claim block A is latest while the other half of the nodes claim that block B is latest.  Let’s say overtime the chain with block B won the consensus. Block A is dropped and any transactions in block A that were not in block B are returned to the mempool. These transactions revert to unconfirmed.

Diagram illustrating a forked chain indicating different blocks being selected for inclusion.
Venn diagram illustrating different transactions in multiple blocks in a forked chain and how they can be different.

Despite this scenario, confirmed transactions are generally considered finalized after a sufficient number of blocks are appended to the chain.  In Bitcoin, having at least 6 blocks (about 60 minutes) mined after the block which includes your transaction is considered sufficiently secure. In Ethereum, it’s at least 64 blocks (about 12.8 minutes).

Common causes of blockchain unconfirmed transactions

1. Transaction hasn’t been selected by a node for block inclusion

Transaction remains unconfirmed if it is still in the mempool and no node has decided to include it into a block to be proposed. The most common cause for this is low transaction fee. Nodes prioritize processing transactions with the highest transaction fees first. Transactions with low fees are not appealing , so they remain in the mempool.

2. Transaction from a forked chain

A fork in the chain can cause the transaction to be confirmed on one chain and unconfirmed on another. The safest action you can take is to wait. Wait for the diverging chains to come to a consensus. At this point your transaction will either be include in a block or remain unconfirmed.

If you've sent a transaction to transfer tokens and it remains unconfirmed, don't worry. Your tokens aren't lost. As long as the transaction is unconfirmed, it won't affect your wallet or token balances.

What can you do if your blockchain transaction is unconfirmed?

If your transaction remains unconfirmed for an extended period, you have a few options. Generally, you can either wait longer or resubmit the same transaction with a higher fee. In some cases, it's possible to cancel your unconfirmed transaction. The specific steps vary depending on the blockchain. For instance, on Ethereum, you can cancel a transaction by sending a zero-value transaction (e.g., 0 ETH) to your own wallet, using the same nonce as the original transaction but with a higher fee.

Summary

Unconfirmed blockchain transactions  are transactions that are submitted to the network but not yet included into a block. After the transaction is included into a block, the transaction’s status changes to confirmed. However, typically there is a time period where the status of the transaction is not finalized and it can revert back to unconfirmed.  Wait a moment longer for the chain to stabilize and the transaction to be considered confirmed and finalized.

Secure your protocol today

Join some of the biggest protocols and companies in creating a better internet. Our security researchers will help you throughout the whole process.
Stay on the bleeding edge of security
Carefully crafted, short smart contract security tips and news freshly delivered every week.