Lecture
Double Spends
- Inconsistent state in a distributed network of nodes, and the mischief which can ensue!
Slides
Ch2.2 Overview
Double Spend
- A double spend is when someone tries to broadcast two transactions that both spend the same account balance. This can be the result of sending a transaction again because it's doesn't look like it's being processed, or from trying to spend money you don't have. Blockchains operate in an asynchronous environment so we we never know if/when messages will be processed. To prevent double spends we use things like nonces to determine which messages to process and which to discard. This is important to ensure that everyone on the network agrees on the shared state of the network.
Recommended Resources
Double Spend Game - Visualization that lets you see what happens to a naive payments network when someone tries to double spend (click on a character to spend or double spend).
Wikipedia - Blockchain forking explained in detail.