THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Confirmation Depth: Reorganization Probability and Settlement Risk

permalink THAMER
#bitcoin#confirmations#proof-of-work#reorganization#settlement

A Bitcoin confirmation is evidence that a transaction is included in a block on the node's currently active chain. Confirmation depth increases as subsequent blocks build on that block. It is a useful measure of settlement confidence, but it is not a promise that a transaction can never be removed from the active history.

Counting confirmations correctly

A transaction in the active tip has one confirmation. If its containing block has height 800000 and the active tip has height 800005, it has six confirmations: 800005 - 800000 + 1. This calculation is meaningful only if the containing block belongs to the active chain. A stale block at the same height cannot be used to claim confirmation depth.

The block hash matters because two competing blocks can have identical heights. Applications that store only a height may misidentify the status of a payment after a reorganization.

Why deeper blocks are harder to replace

An alternative branch must accumulate enough proof of work to overtake the active chain. Replacing a transaction buried beneath several blocks generally requires more competing work than replacing a transaction in the newest block. Under simplified assumptions, an attacker's probability of catching up decreases with depth when the attacker controls less than half of the relevant hash power.

Real-world risk estimates also depend on network propagation, miner incentives, hashrate concentration, timing, and whether an adversary is deliberately attempting a double spend. Confirmation counts alone cannot capture every assumption. The often-cited six-confirmation convention is a risk-management heuristic, not a consensus rule or universal threshold.

Unconfirmed, confirmed, and finalized are different concepts

An unconfirmed transaction may be visible in one or more mempools but is not yet part of the active chain. A confirmed transaction is included in an active block. Bitcoin does not provide an absolute deterministic finality certificate after a fixed number of blocks; its settlement confidence is probabilistic under the proof-of-work model.

A wallet may present labels such as pending, confirming, and confirmed, but the implementation must still be able to move a transaction backward in status if a reorg occurs. Business applications should avoid treating a displayed confirmation count as an irreversible database event.

Building a confirmation policy

Choose thresholds according to the cost of a reversal, the payment's value, and operational response time. For low-value deliveries, a merchant may accept more risk. For irreversible high-value fulfillment, deeper confirmations and independent monitoring may be appropriate. Neither approach changes consensus or forces miners to include a transaction.

Monitor active-chain block hashes, track confirmations from the node's current chain, and define explicit behavior for a payment that becomes unconfirmed or conflicts after a reorg. Where funds are credited internally, accounting adjustments must be traceable and reversible.

Primary references

Bitcoin whitepaper — Section 11, Calculations: https://bitcoin.org/bitcoin.pdf

Bitcoin Developer Guide — Block Chain: https://developer.bitcoin.org/devguide/block_chain.html

Bitcoin Core RPC documentation: https://bitcoincore.org/en/doc/

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects