Track 0 · Genesis · lesson 1

Spending the same coin twice

4 min


Send someone a photo and you still have the photo. Copying digital things is free — that is the whole point of digital things.

Now try to send someone money that way.

Predict

You email Bob a file called 10-dollars.txt. What stops you emailing the identical file to Carol a second later?

Choose one answer

The usual fix, and its price

We already solved this. Your bank keeps a ledger, deducts from your row, adds to theirs, and refuses the second payment because your balance is gone.

It works because everyone agreed to trust one referee.

That referee can also freeze your account, reverse the entry, charge for the privilege, or go under. You are not holding money — you are holding a promise from an institution that it will keep an accurate row about you.

So the real question is not how do we stop double spending? We know how. The question is: can we stop it without putting one party in charge of the ledger?

What a blockchain actually is

One answer: give the ledger to everybody.

Every participant keeps the full history. When you spend, you announce it to the whole network, and each participant checks it against the copy they already hold. Spend the same coin twice and the second attempt contradicts a history thousands of machines can already see.

There is no referee to bribe, because there is no referee.

block #12prev 0000…a1hash 7f3c…9eblock #13prev 7f3c…9ehash b204…1dblock #14prev b204…1dhash c8a7…40
Each block stores the hash of the one before it. That is the chain.

That leaves two hard problems, which are the rest of this track:

  1. If everyone holds a copy, what stops someone editing theirs?
  2. If nobody is in charge, who decides whose version is correct?

Check

Why does handing the ledger to everyone make double spending harder?

Choose one answer
Why did this take until 2008?Optional

Digital cash proposals go back to the 1980s, and most worked — as long as you accepted a trusted issuer. Removing the issuer was the stuck part, because a network with no referee has no obvious way to agree on ordering, and an attacker can cheaply pretend to be thousands of participants.

Bitcoin's contribution was not the ledger or the cryptography, both of which already existed. It was a way to make agreement expensive enough to be trustworthy. That is what you will mine by hand two lessons from now.

Worth remembering

  • The double-spend problem: digital things copy for free, so spending must be made to actually remove something.
  • Banks solve it with a trusted referee, and you pay for that in control.
  • A blockchain solves it by giving every participant the whole ledger, so contradictions are visible to everyone.
  • That trade buys you no referee — and creates two new problems: tamper-resistance and agreement.