‹ CHAPTER 11, ALL LESSONS

PATHFINDER · CHAPTER 11 · LESSON 1 OF 4

Double spending

The double spend problem

Why is spending the same coin twice the central problem of digital money? 4 min

A photo can be sent to a thousand people and you still have it. If money were a file, you could pay a thousand shops with the same coin. Any digital cash has to answer one question: when the same coin is sent twice, which payment counts?

The race

The attack is simple to imagine. Alice signs a payment to a shop and, at the same moment, a second payment of the same coins to herself. Both are valid signatures. If the shop delivers before it knows which one the network kept, Alice may leave with the goods and keep the coins.

Banks avoid this because they keep the only ledger. Bitcoin has thousands of copies, so it needs a rule that every copy applies the same way to pick one payment and drop the other.

▶ SEE IT IN THE MACHINE

At NODES, every copy of the ledger checks each block; a block spending a coin twice fails the check everywhere.

What to remember

  • Digital data can be copied; money must not be.
  • Two conflicting payments can both carry valid signatures.
  • Bitcoin needs one shared order to pick which one counts.

Quick check

Alice signs two payments of the same coin. Are both signatures valid?

How did banks avoid double spending before Bitcoin?