Formula & Calculator
Transaction Confirmation Probability
Estimates the probability that a transaction with n confirmations is secure against a double-spend attack, based on the attacker's relative hash power.
Interpretation
P(n confirmations safe) ≈ 1 − (q/p)^n. The probability that a confirmed transaction is irreversible. q is attacker hash rate, p is honest hash rate.
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| P | Probability the transaction is secure | |
| q | Attacker's fraction of network hash power | |
| p | Honest network's fraction of hash power (1-q) | |
| n | Number of confirmations |
What it means
In Bitcoin, the probability of a double‑spend decreases exponentially with confirmations. This formula estimates the safety of a transaction after n confirmations. It is used by exchanges and merchants to decide how many confirmations to wait for. Understanding this is essential for secure blockchain transaction acceptance.
Worked example
Transaction Confirmation Probability – Two Detailed Examples
Real‑World| Parameter | Value |
|---|---|
| Attacker Hash Power (q) | 10% |
| Confirmations (n) | 6 |
| Parameter | Value |
|---|---|
| q | 30% |
| n | 6 |
Common mistakes
- Transaction confirmation probability: Approximate probability that a transaction is safe after n confirmations.
- q: Probability of an attacker catching up (often <0.5).
- p: Probability of honest chain extending (1−q).
- Assumption: Simplified model – use for rough estimates only.
Applications
Transaction confirmation probability estimates the likelihood that a transaction with a given number of confirmations is safe from double‑spend attacks, using the probability of a successful attack. This is based on the assumed attacker hash rate q and honest miner hash rate p. Understanding this helps merchants and users decide how many confirmations are needed.
- Determining the number of confirmations required for merchant acceptance
- Assessing the security of transactions against double‑spends
- Setting deposit confirmation policies on exchanges
- Risk management for high‑value transactions
- Educational understanding of blockchain security
Frequently Asked Questions
P(n confirmations safe) ≈ 1 - (q/p)^n, where q is the attacker's hash power fraction, p = 1 - q. For example, with q=10% and n=6, the probability is about 99.99% (since (0.1/0.9)^6 ≈ 0.000001). This assumes the attacker has not already mined a longer chain.
Historically, 6 confirmations was recommended to reduce the risk of a double-spend to below 0.1% for an attacker with 10% hash power. It is a risk management guideline, not a guarantee.
Yes, the probability that a transaction is safe depends on the attacker's relative hash power. Higher total hash rate means it is harder for an attacker to succeed, but the relative fraction is what matters.
With one confirmation, the risk is higher. For an attacker with 10% hash power, the probability of a successful double-spend is about 11% (q/p). This is why one confirmation is not considered safe for large transactions.
The formula assumes the attacker can mine a longer chain than the honest network. The probability of success is based on the attacker's ability to catch up, which is governed by the Poisson distribution. The simplified formula is a good approximation.
Yes, the same logic applies to any PoW chain, but you need to adjust the block time and the attacker's hash power fraction accordingly.
Proof-of-stake networks often have deterministic finality after a certain number of epochs, not probabilistic. The risk of reversal is different and often lower than in PoW.
For small amounts, 1-3 confirmations may be acceptable. For larger amounts, 6 or more is recommended. The risk tolerance depends on the value and the trust in the counterparty.