Mcap -- BTC -- ETH -- SOL -- BNB -- XRP -- F&G -- View Market
Loading prices…

Double Spend

The attack where someone tries to spend the same coin twice. Preventing it is the entire reason blockchains have to exist.

Consensus 3 min read

A double spend is what happens β€” or rather, what would happen if you did not prevent it β€” when the same digital coin is spent twice. Digital money has always had a double spend problem because files are trivially copyable. If a dollar is just a number in a database, there is nothing physically stopping you from sending that dollar to Alice and then sending the same dollar to Bob a second later, hoping the network will accept both transactions. Traditional payment systems solve this with a central operator (a bank) who rejects the second transaction. Bitcoin was the first system to solve it without one.

The solution is the blockchain itself. When Alice receives a payment, she waits for it to be included in a block and then for a few additional blocks to be mined on top. Each subsequent block makes it exponentially harder for an attacker to rewrite the history and unwind the transaction. By the time six blocks (about an hour on Bitcoin) have been mined on top, the amount of work an attacker would have to redo to double-spend is so great that it is economically absurd for ordinary transaction sizes. For very large payments people wait longer.

When Double Spends Actually Happen

Real double spends on major chains are rare but not mythological. A 51% attack, where an attacker controls more than half the network’s hash rate, is the classical way to pull one off β€” with majority hash rate you can mine a secret chain that eventually overtakes the public one and rewrites recent history. It has happened to Ethereum Classic several times, most visibly in 2019 and 2020, with attackers stealing several million dollars each time. It has happened to Bitcoin Gold, Vertcoin, and other smaller proof-of-work chains. It has never happened to Bitcoin itself because the hash rate is too expensive to rent at that scale.

There is also the much less glamorous version: a user broadcasts a transaction, then before it is confirmed broadcasts a second transaction that conflicts with the first (same inputs, different outputs), hoping that the network will pick the second one. This is easy to try and sometimes works against merchants who accept zero-confirmation payments, which is why almost no one accepts zero-conf for anything important.

Why the Whole System Exists for This

It is worth stepping back. Bitcoin’s entire design β€” the blocks, the proof-of-work, the chain, the nodes, the game-theoretic incentives β€” exists to solve one problem: preventing double spends without a central authority. Everything else in crypto is downstream of that. Smart contracts, NFTs, DeFi, staking, rollups β€” they all depend on an underlying ledger that cannot be rewritten to let the same asset be spent twice, and the mechanism for achieving that is the consensus layer.

When you read about a chain’s consensus algorithm, what you are reading about is how it prevents double spends. Everything else is an implementation detail.