Double Spending
16/04/2026
Double spending is the attempt to spend the same cryptocurrency funds more than once — sending the same coins to two different recipients simultaneously. It is the fundamental problem that blockchain technology was designed to solve.
The problem
In traditional digital files, data can be copied freely. Without a mechanism to prevent copying, digital money could be duplicated indefinitely — the same coins could be sent to multiple people. Banks solve this by maintaining a central ledger. Bitcoin solves it without a central authority.
How blockchain prevents it
Proof of Work consensus ensures:
- Only one version of the transaction history is accepted (the longest valid chain)
- Altering history requires redoing more work than the entire honest network has done
- Once a transaction has enough confirmations, reversing it is computationally infeasible
0-confirmation attack
The only practical double-spend risk is against merchants who accept 0-confirmation transactions:
- Attacker sends TX1 to merchant (pays for goods)
- Simultaneously broadcasts TX2 to the network spending the same coins back to themselves
- If TX2 confirms first, TX1 is invalidated — the merchant is defrauded
Waiting for even 1 confirmation makes this attack extremely difficult. Multiple confirmations make it practically impossible.
51% attack
If an attacker controls >50% of network hashrate, they can theoretically rewrite recent blocks to reverse their own transactions. This is expensive and impractical for large networks like Bitcoin, but has occurred on smaller PoW coins.
