Double-Spending Problem

The risk that the same unit of digital money is spent more than once.

What is the Double-Spending Problem?

The double-spending problem is the risk that a unit of digital money is spent more than once. Digital information can be copied perfectly, so without some mechanism to prevent it, a person could send the same coin to two different recipients.

How it was handled before Bitcoin

Traditional electronic payment systems solve the problem with a trusted central party. A bank or payment processor keeps the ledger, checks every transaction against it and rejects any attempt to spend money that has already been spent. This works, but it requires everyone to trust and depend on the operator.

How blockchains solve it

The Bitcoin whitepaper, published in 2008, described a way to prevent double spending without a central party. All transactions are announced publicly, and the network agrees on a single order for them by placing them in a chain of blocks secured by proof of work. Only the first of two conflicting transactions to be included in the chain counts; the other is rejected by every node as invalid. Reversing a confirmed transaction would require redoing the work of its block and all later blocks faster than the rest of the network.

Example

Someone signs two transactions that spend the same bitcoin, one to a shop and one back to themselves, and broadcasts both. Nodes see the conflict. A miner includes one of them in a block; the other can never be confirmed. If the shop waits for the payment to be confirmed before handing over goods, it is not harmed.

Why it matters

Solving double spending without a middleman is the central invention that makes decentralised digital money possible. It is also the reason confirmations exist: each new block makes a reversal harder.

Remaining risks

Unconfirmed transactions can still be replaced or dropped. A party controlling a majority of a network's mining power could rewrite recent blocks and double spend, which is known as a 51% attack. Larger payments therefore usually wait for more confirmations.

Related terms