Crypto glossary

Double spending

Definition

Double spending is the act of spending the same digital coins twice, the core problem that a blockchain's consensus rules are designed to prevent.

Digital files can be copied, so a digital currency needs a way to stop someone from sending the same coins to two people. Banks solve this with a central ledger. Bitcoin solved it without one: all nodes follow the same chain of blocks, and once a transaction is recorded, any conflicting transaction spending the same coins is rejected.

The risk returns when an attacker can rewrite recent history. With a 51% attack, someone pays a merchant, waits for the goods, then publishes a longer private chain where those coins went elsewhere. Ethereum Classic suffered such reorganizations in 2019 and 2020, and exchanges lost funds from deposits that later vanished.

Waiting for enough confirmations or for protocol finality is the main defence, and the safe wait depends on how costly the chain is to attack. Zero-confirmation payments are the most exposed, because an unconfirmed transaction can still be replaced by a conflicting one.

Example

An attacker deposits 10,000 coins on an exchange, trades and withdraws, then publishes a longer chain in which those 10,000 coins were sent to their own address instead.

Related terms