Digital money is easy to copy. Learn how Bitcoin stops anyone spending the same coins twice, without a bank, using UTXOs, blocks and proof of work.
Why digital money is hard
A photo can be copied endlessly. If money were just a file, you could send the same file to two people. Banks prevent this by keeping one central ledger. Bitcoin needed a way to do it without a bank.
How Bitcoin stops it
- Every coin is an unspent output that can be spent exactly once.
- When two transactions try to spend the same output, nodes accept only the first one they see into their mempool.
- Once one of them is in a block, the other is permanently invalid.
- To undo that, an attacker would have to rebuild that block and every block after it, faster than the rest of the network. See The 51% attack.
What this means for you
An unconfirmed payment can still be replaced by a conflicting one. A payment with several confirmations is very hard to reverse. That's why services wait for confirmations before treating large payments as final.
A real-world comparison
Writing a cheque to two people for the same money works until the bank refuses the second one. Bitcoin has no bank, so every node acts as the bank's checking clerk, and the blockchain acts as the shared record of which cheques were already cashed.
The attacks people try
| Attack | How it works | Defence |
|---|---|---|
| Race attack | Send two conflicting payments almost at once | Wait for at least 1 confirmation |
| Replace attack | Replace an unconfirmed payment with RBF | Don't treat unconfirmed as final. See Replace-by-fee (RBF) |
| 51% attack | Rewrite recent blocks with majority hash power | More confirmations. See The 51% attack |
Check a payment yourself
Paste a txid into the MyBitcoinExplorer search: if it shows confirmations, it is in a block and a conflicting spend is no longer valid.
Key takeaways
- Each output can be spent only once; nodes reject conflicting spends.
- Once a transaction is in a block, a conflicting one is invalid.
- More confirmations make reversal increasingly impractical.
Common questions
Has Bitcoin ever been double spent?
Unconfirmed transactions can be double spent by replacing them. Reversing confirmed transactions on Bitcoin's main chain requires enormous computing power and has not been done in practice in recent years.
How many confirmations are safe?
It depends on the amount. Many services treat 1 to 3 confirmations as enough for small payments and wait for 6 or more for large ones.
Can a confirmed Bitcoin transaction be reversed?
Only by rewriting the blocks containing it, which needs more hash power than the rest of the network. The more confirmations, the less practical it becomes.
Is zero-confirmation safe?
Only for small amounts where the risk is acceptable. An unconfirmed payment can still be replaced.