liveBook · Manning

Double-spend

As explained in Real-World Cryptography

A double-spend is the unauthorized use of the same cryptocurrency funds in more than one conflicting transaction.

A double-spend occurs when the same cryptocurrency funds are used in conflicting transactions. One payment may reach you, while a competing transaction later redirects those funds elsewhere. section 12.2.3

A 51% attack

An attacker with slightly more than half of a proof-of-work network’s computational power can rewrite part of the ledger, create a longer chain that omits an earlier payment, and replace it with a transaction sending the funds to another address. Earlier payees are left with invalidated coins. section 12.2.3

This failure exploits blockchain forks: miners follow the longer competing chain, allowing a rewritten history to replace the chain containing the original transaction. Such attacks affected Vertcoin, Ethereum Classic, and Bitcoin Gold. section 12.2.3

Figure 12.6 A fork in the blockchain: two miners publish a valid block at height 3 (meaning 3 blocks after genesis). Later, another miner mines a block at height 4 that points to the second block at height 3. As the second fork is now longer, it is the valid fork that miners should continue to extend. Note that arrows coming out of a block point to the parent block (the block they extend).

Use the fork diagram to follow how a later block makes one competing chain longer and therefore the chain miners extend. section 12.2.3

How Real-World Cryptography covers it

How deep it goes
Explains the attack through forks, rewritten ledger history, dominant hashing power, and longest-chain selection.
Examples
Uses a fork diagram and attacks on Vertcoin, Ethereum Classic, and Bitcoin Gold as concrete examples.
What it assumes
Assumes basic familiarity with cryptocurrency transactions, blocks, miners, and blockchain history.
What you can do after
Diagnose how dominant hashing power can replace a payment with a conflicting transaction.
How it connects
Connects double-spending with blockchain forks, mining, proof of work, longest-chain selection, and 51% attacks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.