Security & Resilience
The race attack, and why propagation decides it
Protocol referenceSource: Bitcoin Core transaction-relay documentationThe attack is described as a zero-confirmation risk; no fee or price figure is quoted here.
- Written by
- The Bitcoin Data Guide editorial team
- Reviewed by
- Protocol review desk
- Dates
- Published 2026-10-31 · Last reviewed 2026-10-31
Fact
Two conflicting transactions that spend the same output cannot both confirm; the network orders them by which reaches a miner first and is included in a block.
Forecast
Whether a given attacker wins the race depends on its connectivity relative to the merchant's node, which the attack model assumes rather than measures.
The attack model
The attacker controls a set of coins and wants to spend them twice. It builds two transactions that spend the same output: one paying a merchant, and one paying an address the attacker controls. It sends the payment to the merchant directly, so the merchant sees a valid transaction and releases the goods on zero confirmations. At the same time, it broadcasts the conflicting transaction to the network through as many well-connected peers as it can reach.
The two transactions cannot both be confirmed, because they spend the same output and a valid block can contain only one of them. The network's mempool keeps the first one it saw and rejects the second as a conflict, so the race is decided by which transaction reaches the miners first. If the attacker's transaction reaches a miner before the merchant's does, the attacker's transaction is the one that gets mined, and the merchant's payment is discarded.
Unlike the Finney attack, the race attack does not require the attacker to be a miner. It requires only that the attacker's transaction propagate faster than the merchant's. That is a connectivity advantage rather than a hash-rate advantage, which is why the attack is described as a propagation race.
The assumptions the attack needs
The first assumption is zero-confirmation acceptance, exactly as in the Finney attack. If the merchant waits for a confirmation, the race is over before it starts: the merchant's transaction is in a block, and the conflicting transaction can never be mined. The attack is a bet that the merchant treats an unconfirmed transaction as final.
The second assumption is a propagation advantage. The attacker must get its transaction to a miner before the merchant's transaction does. That depends on how the attacker is connected, how the merchant broadcasts, and how quickly the two transactions travel. An attacker on a well-connected node with a direct path to a large miner has an advantage; an attacker on a slow connection does not.
The third assumption is that the merchant does not detect the conflict. A merchant that watches the mempool for a conflicting spend of the same output can see the race in progress and refuse to release the goods. The attack works against a merchant that checks only that the payment it received is valid, not that no conflicting spend exists.
What the defence actually is
The primary defence is confirmation depth: a merchant that waits for one confirmation has removed the race, because the network has already ordered the two transactions and only one of them can be in the chain. The secondary defence is mempool monitoring. A merchant that watches for a conflicting spend of the output it was paid can see the attacker's transaction arrive and hold the goods until the conflict is resolved.
The race attack and the Finney attack are the two ways to double spend against a merchant that accepts zero confirmations. The Finney attack page covers the variant that requires the attacker to be a miner, and the double spending page sets out the confirmation-depth argument that closes both.
Sources
- Bitcoin Core
- Transaction relay and mempool documentation — how conflicting transactions are handled before confirmation.
- Nakamoto (2008)
- Bitcoin: A Peer-to-Peer Electronic Cash System, section 8 — the confirmation-depth argument the attack sidesteps.
Related reading
- Security & ResilienceHow the network resists attack, and what happens when it is stressed.
- Can Miners Cheat?What a miner can and cannot do with the block it finds, and why invalid blocks fail.
- Double SpendingHow a double spend works, and why confirmation depth is the defence.
- 51% AttacksWhat a majority of hash rate can achieve, and what it cannot.
- Eclipse AttacksHow a node can be isolated from the honest network, and the defences against it.
- When Your Node Goes OfflineWhy a disconnected node is not a threat, and how it catches up on return.