Bitcoin 500 years ago?


Introduction

I spent a long time thinking about how to explain Bitcoin here in the form of a story — and whether this is even necessary at all, given that there are already so many explanations out there. In the end, however, I decided to write such a story anyway, because I believe I have found an excellent approach to explaining the Bitcoin network in a truly vivid and intuitive way.

The idea is to attempt to implement Bitcoin historically, in a non-digital world. In some sense, this will lead to familiar concepts, such as a book that records transactions, and in that regard many people have already explained Bitcoin in similar ways. However, when you place the whole system into a historical context, you are forced to think through every single detail very carefully — how each part interacts with the others and how the system can actually be functional as a whole.

Along the way, we will work through many core elements, such as cryptography and proof of work. By examining precisely which abstract roles the individual components of the Bitcoin network must fulfill, and then finding historically implementable, non-digital analogues for them, I believe it becomes possible to truly understand every aspect of Bitcoin. Everything remains grounded in the real world; this way, nothing is merely “magic internet money” anymore. Instead, the entire Bitcoin machinery operates within a historical, analog setting, where each component, due to its tangible nature, is easy to grasp and intuitively understandable.

Finally, we will return to the digital implementation and examine how these same ideas are realized in practice. By mapping the historical analogies back onto modern technology, we can clearly see why Bitcoin is designed the way it is, which problems each component solves, and how all of this comes together in the actual network that exists today.

The Imaginary Historical Setting

After a flood of silver and gold from the New World has eroded the value of money and driven up prices all over Europe, causing severe economic disruption, especially in the Kingdom of Spain, a group of powerful merchants decides it is time to take the idea of money away from nature and put it under the control of humans. The money should be issued algorithmically, with an ever-decreasing new supply approaching a fixed amount — no discovery of new land should ever again be able to disrupt trade between people through a massive spike in the money supply.

So they meet and start to design their perfect money, “dinero perfecto”, as they call it. At the core of this system sits a ledger, a book in which all transactions are recorded. The issue, of course, is that one could simply copy such a transaction history and manipulate it; in general, such a book cannot act as a single source of truth. However, they have a genius idea: every person, whether merchant, king or peasant, may have such a book and start recording the transactions, but an intelligent communication procedure ensures that everyone will agree on the same list of transactions — and if somebody deviates from it, it can easily be verified that this is a fraudulent transaction history. But how can it be ensured that all of them record the same transactions — exactly the ones that actually happened?

Adding a Sense of Effort to the Network — Proof of Work

To address this issue, they first introduce an effort that is required to record transactions in a book. How can this be achieved, you might wonder? Every new page that gets added to the book, containing new transactions, has to fulfill some mathematical condition. Checking whether this condition is indeed met requires little effort; however, finding a page that satisfies the condition requires a tremendous amount of work.

To put something like this into actual practice, they strictly define how transactions should be recorded, so that every word and number appearing in a record follows a strict protocol. Additionally, they define a way to translate all transactions of a page into digits (for example, A → 1, B → 2, and so on). Hence, each transaction list of a page is essentially equivalent to a very long sequence of digits.

These digits are then run through a calculation ritual: a long, precisely prescribed sequence of arithmetic steps that every clerk in Europe carries out in exactly the same way. The digits of the page are processed one block after another, and each time, they are thoroughly mixed with a running intermediate result through a whole series of steps: this intermediate result is multiplied by itself, the next block of digits is added, the result is divided by a fixed large number and only the remainder is kept, and so on. What remains at the end is a number of fixed length that depends on every single digit of the page — change one letter anywhere, and the result comes out completely different. This result serves, so to speak, as the fingerprint of the page.

The mathematical condition concerns exactly this fingerprint: it must be smaller than a threshold that is written into the protocol. For instance, the threshold might be chosen such that the fingerprint has to begin with at least four zeros. Since the result of the ritual cannot be foreseen, this can only be achieved by trial and error, and the condition might, for example, be met with a chance of one in ten thousand. To actually get a different result each time, a small change has to be made to the page each time. For this purpose, the last line of each page is reserved, and any digits may be written there. So each time, the clerks write a trial number into this line, perform the ritual, and if the result is too large, they start again with a different trial number — again and again, until the fingerprint finally falls below the permitted threshold. The choice of the threshold thus determines how much effort it takes to add a new valid page.

The following figure shows this search. On the left is the page with its reserved last line, on the right the attempts: every trial number leads to a different fingerprint, and only the one that falls below the threshold — here, the one beginning with four zeros — makes the page valid.

A ledger page with a reserved last line and the search for it: trial numbers 0001, 0002, … give different fingerprints until 4172 gives one below the threshold, starting with four zeros

Checking a finished page therefore requires performing the ritual just once. Finding a valid page, however, takes ten thousand attempts on average if the threshold demands four leading zeros, a hundred thousand if it demands five, and so on — each of them a laborious piece of arithmetic by hand. The effort required to write one page is rooted exactly in the time it takes to find suitable trial digits.

Everything hinges on the ritual offering no shortcut. If a clever mathematician could foresee which trial digits lead to a small result, he could produce valid pages at will, and the whole scheme would collapse. The merchants' best minds therefore take great care to design the steps of the ritual such that its result can only be learned by actually performing it. As a consequence, every attempt is a fresh throw of the dice: a clerk who has already failed a thousand times is no closer to success than one who is just starting. What matters is not brilliance but the sheer number of attempts — in other words, how much calculating power someone commands.

Additionally, the fingerprint of the previous page is written at the very top of every new page. Since this fingerprint depends on every digit of the previous page, and that page in turn carries the fingerprint of the one before it, all pages are firmly interlinked. This ensures that one cannot simply find one valid page and duplicate it thousands of times to create a full transaction book with very little effort. And whoever changes a single letter on an old page changes its fingerprint, which breaks that page and, through the chain of fingerprints, every page that follows.

The figure below shows three consecutive pages linked in this way: the fingerprint of each page reappears at the very top of the next one.

Three consecutive ledger pages, the fingerprint of each page written at the top of the next one

Now, what have the merchants achieved with this system of making it costly to add a page to the transaction book? No one can fake such a book. If the real book — the set of transactions that everyone agrees on — is already 100 pages long, it is practically impossible for another entity to come up with a fake book of the same size containing manipulated transactions. This is because a single altered transaction breaks its page and all pages after it, so the forger would have to repeat the entire search for trial digits for every one of them. The real book, on the other hand, is sustained by many merchants, each employing dozens of clerks to add new pages, and it keeps growing while the forger is still at work. For a single entity, it is extremely difficult to gather that much calculating power. Trust is therefore built by the size of the book.

In particular, every merchant, guild, king, or whoever wants to participate in maintaining the transaction history of the dinero perfecto will create a copy of the ledger. They collect the transactions that people want to perform and try to create a valid page by searching for suitable trial digits. Whenever a valid page has been found, they send a copy of that page to all other merchants, guilds, or kings they know, who then add it to their transaction book. The book with the greatest size is always the one that is trusted. So, for example, if a merchant in Spain finds a new valid page and sends it to his neighboring merchants, but at the same time, on the other side of Europe in Moscow, the Tsar manages to find two valid pages in a row, the version of the book containing the two pages from Russia will eventually prevail. This is because every participant will favor the version of the book with the greater size.

The following figure illustrates this. After page 100 there are two versions of the book: one with a single new page, the other with two. The version with pages 101 and 102 is the longer one and prevails, while the other page 101 is discarded.

After page 100 the book splits into two versions; the longer one with pages 101 and 102 prevails, the other page 101 is discarded

This procedure ensures that there is always a version of the book that can be trusted and that is de facto impossible to manipulate without gaining more calculating power than all other participants combined. The question that arises now is, of course, why anyone should take on the burden of maintaining and extending the ledger. After all, it requires keeping up constant communication with other merchants and, even more crucially, one has to put constant effort into the search for trial digits to produce new valid pages so that new transactions can be recorded.

Economic Incentive to Maintain a Ledger — Coin Issuance

This is resolved by organizing the issuance of new coins through exactly those entities that put in the effort to find new pages. In particular, for every page one special transaction can be added that has no sender but only a receiver. The receiver can be arbitrary, but the amount of coins sent is fixed. These coins that appear out of nothing control the issuance of new money supply — and they allow the merchant who found the page to collect a reward (although in theory he does not have to send those new coins to himself, in practice this is what will happen).

This raises the question of how many new coins will be introduced with each page. Since the original cause for launching this project was the inflation triggered by the massive new supply of silver and gold from the New World, the merchants aim for a very strict coin issuance policy. In particular, the amount of coins that can be written in this special transaction is cut in half after a fixed number of pages. That means the early pages will be very lucrative, and the thicker the book gets, the less reward there is to be taken. Since halving in fixed intervals creates a geometric series, the total amount of coins of the dinero perfecto will be limited. There will only ever be so many coins.

This is illustrated in the following figure. On the left, the reward \(R\) per page is halved after every \(N\) pages; on the right, the total number of coins issued so far approaches the limit \(2RN\) without ever exceeding it.

Left the reward per page, halved every N pages from R to R/2, R/4, …; right the total number of coins, approaching the limit 2RN

This procedure also solves the initial issuance of the coins, as the coins come naturally into existence page by page. However, when there is an ever decreasing reward for the merchants who extend the ledger, eventually they will lose the incentive to continue their work, right?

In order to counter that, there is also the option of a fee for each transaction, which can likewise be collected by the creator of that page. This ensures a long-term incentive for maintaining the ledger and putting in the effort to create valid pages. This fee is not mandatory, and its amount is determined by how many new transactions there are and how urgently a person wants a transaction to happen.

Moreover, the merchants hope that the decreasing issuance will be offset by a rising value of the coins: with a hard cap on the total supply, many people may decide to hold on to their coins, and some may lose the information needed to prove ownership of their coins — making it impossible to spend them in a transaction ever again. Whether the value actually rises in this way, however, is ultimately decided by the market.

But speaking of the ownership of coins, how is this ownership actually proven? Can an ordinary peasant just walk up to a merchant and convince them that they have been granted the right to spend the whole treasury of the Holy Roman Empire?

Ownership of Transaction Entries — Public and Private Keys

The basic idea of proving ownership is to have a pair consisting of a public thing and a corresponding secret. You cannot derive the secret from the public thing alone, but you can produce the public thing from the secret. In particular, with the secret you can produce something that proves you possess the secret belonging to this public thing.

A realization of these abstract requirements could be a seal that is stamped by a certain stamp. The exact shape of this stamp is the secret, and the public thing is the seal. However, this is of course not an ideal realization, because with enough time and carefulness one might be able to reproduce the exact shape of the stamp from a seal.

That is also why the merchants decide against this simple stamp and seal and instead, once again, come up with a clever mathematical idea that exactly fulfills those requirements.

The scheme rests on a simple asymmetry from number theory: multiplying two large primes is easy, but factoring their product is extraordinarily hard. Each participant proceeds as follows:

1. Choose two large primes \(p\) and \(q\) and compute \(n = p \cdot q\) as well as \(\varphi = (p-1)(q-1)\).
2. Choose a number \(e\) that is coprime to \(\varphi\), and find \(d\) such that \(e \cdot d \equiv 1 \pmod{\varphi}\).
3. Publish \((n, e)\) — this is the public key, and coins are sent to it. Keep \(d\) (and \(p\), \(q\)) secret — this is the private key.

To spend coins, the owner first performs the calculation ritual on the transaction text — the very same ritual that seals the pages. Its result is the fingerprint \(m\) of the transaction, a number of fixed length that is smaller than \(n\). From it, the owner computes the signature \(s = m^d \bmod n\), which is written next to the transaction. Any merchant can verify it with the public key alone: he performs the ritual on the transaction himself and checks that \(s^e \bmod n\) equals the fingerprint he obtained. This works because \(m^{e \cdot d} \equiv m \pmod{n}\). Whoever does not know \(d\) has no known way of producing a valid \(s\), and computing \(d\) from the public key is as hard as factoring \(n\) into \(p\) and \(q\). Moreover, as \(s\) depends on the fingerprint, and the fingerprint on every single letter of the transaction, a signature cannot be reused for a different amount or receiver.

There are two reasons why a fingerprint of the transaction is computed once again and only this fingerprint is signed. Without going into further detail: first, the number to be signed then always has a fixed length, since the result of the ritual was designed exactly that way, and thus stays smaller than \(n\), as the scheme requires. Second, signing transactions directly opens the door to forgeries, since the product of two signatures is a valid signature for the product of the two signed numbers, so a forger could combine existing signatures into new ones. With fingerprints, this trick comes to nothing, because the ritual cannot be run backwards and the combined product is practically never the valid fingerprint of a transaction.

A toy example: \(p = 61\), \(q = 53\), hence \(n = 3233\) and \(\varphi = 3120\). With \(e = 17\) one finds \(d = 2753\). A transaction with the fingerprint \(m = 65\) is signed as \(s = 65^{2753} \bmod 3233 = 588\), and indeed \(588^{17} \bmod 3233 = 65\).

The following figure shows this toy example once more: the fingerprint is signed with the secret \(d\), and anyone can check the signature with the public key \((n, e)\) alone.

RSA toy example: the fingerprint m = 65 is signed with the secret d = 2753 to s = 588, and the public key (3233, 17) turns s back into 65

So the peasant claiming the treasury of the Holy Roman Empire has no chance: he would need the emperor's \(d\), and all he can see is \(n\). This is, at its core, the RSA scheme; real-world implementations add a few further safeguards. Bitcoin itself uses a different mathematical lock (elliptic curves) built on the same principle — easy in one direction, practically impossible in the other — but for our historical setting, the primes will do.

Signatures prove that a transaction entry has been spent by its owner. Speaking of the owner of a transaction may sound a bit odd at first, but this is exactly how spending coins works: you need a transaction entry whose receiver is your public key. If you have not yet passed on the coins you received (or at least not all of them), you can spend them. There is nothing but this transaction history, and ownership of coins follows from it alone.

What signatures cannot prevent, however, is the owner signing two transactions that spend the very same coins — say, to pay one person in Seville and another one in Antwerp. This is the so-called double-spending problem, and it is exactly what the shared book is there for: before a merchant includes a transaction in a new page, he checks in his copy of the book that the coins were received earlier and have not been spent since. Should both end up on a valid page, each with a different keeper of the transaction history, one simply waits to see which version of the book prevails. In this way, coins can indeed only ever be spent exactly once.

Also note that if someone somehow gets hold of the emperor's \(d\), the coins are fully theirs. They can walk up to any merchant who maintains a ledger and present a valid transaction. In practice, if they do this in the emperor's capital, the merchant will probably reject them — a merchant can always do that — but remember: one can go to any merchant one wants, and additionally offer a very high fee, making the economic incentive for including the transaction in a new page candidate extremely high.

The Communication Network — Average Block Time and Consensus

We have now outlined the main components of the dinero perfecto's protocol. Let us now see how they all work together in the network thus established. In doing so, we will also see where the limits of this historical implementation lie and why the probability of something like this actually having happened is extremely low.

Recall that a newly found page is only of use once the other participants know about it. In our historical setting, this knowledge travels by messenger on horseback. From Lisbon to Moscow, or from Naples to Stockholm, such a messenger needs several weeks — if the roads are passable at all. This single fact dictates the rhythm of the entire network. Suppose the merchants set the threshold of the ritual such that a new page is found somewhere in Europe every few days. Then the Spanish merchants would find a page, the Tsar's clerks would find a different one before the Spanish messenger has even crossed the Pyrenees, and both sides would continue extending their own version of the book. By the time the two versions meet, each side has added a dozen pages, and half of all the work done since the split is discarded when the shorter book is abandoned. Worse, no participant can ever be sure which book is currently the longest, because the information they hold is always weeks out of date.

The following map shows the situation: a new page has been found in Spain and, in the meantime, two in Moscow — and between them lies the journey of a messenger that takes several weeks.

Map of Europe: one new page found in Spain, two in Moscow, separated by a messenger's journey of several weeks

The merchants therefore have no choice but to make finding a page far slower than spreading it. A new page must appear rarely enough that, with high probability, the whole of Europe has heard of the previous one before the next is found. With messengers needing weeks, this means a page every three months at the very least — and more realistically, to be safe against bad weather, wars and lost riders, every half year. This is the average time for a new page to appear for the dinero perfecto — or, in Bitcoin terms, the block time.

But also: how can such a rate be fixed when nobody controls how many clerks are searching? If a wealthy guild joins the effort, pages will be found faster; if a plague thins out the ranks of the clerks, they will be found more slowly. The merchants solve this by writing a rule into the protocol: every fixed number of pages — say, every three — the dates recorded on those pages are compared. If the three pages took less than the intended one and a half years, the threshold is lowered in proportion: if they took only one year, for instance, the threshold is multiplied by two thirds, so that valid pages become correspondingly rarer. If the pages took longer, the threshold is raised again in the same way. This difficulty adjustment keeps the rhythm of the book stable no matter how much calculating power is thrown at it. Note that this is also what makes the coin issuance predictable in time: the halving of the reward happens after a fixed number of pages, and only because pages arrive at a roughly constant rate does this translate into a fixed number of years.

Even with a half-year block time, agreement is not immediate. When a page is found in Spain and, by bad luck, another one in Russia shortly after, the two versions of the book coexist for a while. Only when the next page is found on top of one of them does that version take the lead, and only after a few more pages does the other one die out for good. A transaction written on a page is therefore not settled when the page is found, but only once it is buried under several further pages, so that reversing it would require redoing all of that work. With one page per half year, a merchant would be wise to wait for at least four or five pages on top — a confirmation time of two years or more.

What does this mean in practice? The dinero perfecto is utterly useless for everyday trade. Nobody will wait two years to find out whether the payment for a barrel of wine has gone through. At most, the system could serve as a bookkeeping layer between the treasuries of great nations, trading companies and banking houses — a way of settling large balances a few times a year instead of shipping chests of silver and gold across the continent. Everything below that scale would remain a matter of coins, bills of exchange and trust in the local merchant. This is the fundamental limit of the historical implementation, and the reason why it is extremely unlikely that something like this ever actually happened: the idea requires messages to travel in seconds rather than weeks. Once they do, every part of the machinery described above can be kept exactly as it is — only the network starts to actually function well and becomes very useful. So once the speed of communication reaches a certain level, the probability of this machinery actually being constructed, implemented and also used increases drastically. And with the telegraph and especially with the internet, the required speed of communication was definitely there — although some of the mathematical ingredients, such as public-key cryptography, and the necessary computing power only arrived in the 20th century.

The Bitcoin Protocol

And that is what brings us to the 31st of October 2008, when an anonymous entity named Satoshi Nakamoto published exactly the kind of protocol we have just discussed above. As history has shown so far, the network has grown substantially and the value of the coins has increased ever since — albeit with a lot of volatility, but that is also what one should expect from something as new and ground-breaking as the Bitcoin protocol. Anyway, the significant impact that Bitcoin has made so far can no longer be denied, and we are now seeing big institutions and even nation states start to show serious interest in holding those coins.

But in order not to blow up this story too much, let us leave those repercussions on society and similar topics on the side for now and stick to the protocol itself and to how it implements the various parts of our historical dinero perfecto.

From Pages to Blocks

A page of our ledger is called a block, and the book itself is the blockchain. The role of our calculation ritual is taken over by a hash function, in Bitcoin's case SHA-256. Such a function takes an input of any length — a list of transactions, say — and returns a number of fixed size, 256 bits, in a way that is quick to compute but practically impossible to invert or steer: change a single letter in a single transaction, and the resulting number is completely different. This is precisely the abstract role our ritual had to fulfill; SHA-256 is, in essence, such a ritual, designed by cryptographers and carried out by machines. Unlike our ritual, however, Bitcoin applies SHA-256 twice in a row: the result of the first pass is fed through the same function once more — an extra precaution.

The condition, too, is the very one our merchants imposed: the hash of the block, read as a number, must be smaller than a given target \(T\), that is \(\mathrm{SHA256}(\mathrm{SHA256}(\text{block header})) < T\). The target is nothing but the threshold of our ritual — the smaller \(T\), the fewer of all possible outputs qualify, and the harder the search. And the search itself works exactly as with our trial digits: the block header contains a freely choosable number, the nonce, which the miner (the modern counterpart of our merchants and their clerks) increments over and over until the condition happens to hold. Since the nonce has only 32 bits, modern mining hardware runs through its roughly four billion values in a fraction of a second; miners then additionally vary another field, for instance in the block's first transaction, and start over. The header also contains the hash of the previous block — the fingerprint of the preceding page that our merchants wrote at the top of every new one — which is what chains the blocks together and makes it impossible to rearrange, remove or duplicate them without redoing all the work that came after. The transactions themselves are not written into the header; instead, they are hashed pairwise, level by level, into a single fingerprint, the Merkle root, which is part of the header. Change a single transaction, and the Merkle root and with it the hash of the header change as well.

Coins and Keys

The issuance works exactly as our merchants designed it. Every block may contain one special transaction without a sender, called the coinbase transaction, whose output the miner directs to an address of his choice. The reward started at 50 coins and is cut in half every 210,000 blocks, which corresponds to roughly four years; today it stands at 3.125 coins. Summing this geometric series gives a total supply of 21 million bitcoin, and the same reasoning applies as in our story: as the subsidy fades, the transaction fees that users attach voluntarily to their transactions take over as the incentive to keep mining, with their level set by competition for the limited space in the next block.

Ownership is proven just as described, only with a different mathematical lock. Instead of RSA, Bitcoin uses elliptic curve cryptography: the private key is a number \(d\), and the public key is the point \(P = d \cdot G\) on a fixed curve, where \(G\) is a publicly known starting point. Multiplying \(G\) by \(d\) is easy, recovering \(d\) from \(P\) is practically impossible — the same one-way asymmetry that the factoring of \(n = p \cdot q\) gave us. A signature is again computed from the fingerprint of the transaction, its hash, together with \(d\), and it can be checked by anyone using \(P\) alone. For many address types, the address one sends coins to is not even \(P\) itself but a hash of it, which keeps the public key hidden until the coins are first spent, adding an additional layer of safety (the newer Taproot addresses, however, contain the public key directly).

The Network at the Speed of Light

What truly separates Bitcoin from the dinero perfecto is not a single component of the machinery but the messenger. A new block reaches the whole planet in a few seconds, so the rhythm of the book can be set accordingly: Bitcoin targets one block every ten minutes, which leaves a comfortable margin between blocks being found and blocks being known everywhere. The difficulty adjustment that our merchants needed is there as well and works just like theirs — every 2016 blocks, the time those blocks actually took is compared to the two weeks they were supposed to take, and \(T\) is scaled by the same ratio. A transaction is considered settled not after two years but after a handful of blocks on top of it, customarily six, which is about an hour.

One small correction to our story belongs here. We said that the longest book wins, but that is only true for a constant difficulty. Strictly speaking, we have to define the length of a book not by the number of pages but by the amount of work that went into it. The Bitcoin protocol takes care of this nuance: the valid chain is the one with the greatest accumulated proof of work, not the one with the most blocks. Everything else about the reconciliation is as we described it — two miners occasionally find a block at nearly the same moment, the network is briefly split, and the fork is resolved as soon as the next block lands on one of the two branches.

Closing Thoughts

Looking back at what we have built, there is nothing in Bitcoin that could not have been written down with quill and paper. A book of transactions, a costly condition for adding a page, a fingerprint linking each page to the one before, a reward that halves on a fixed schedule, and a secret that proves ownership without ever being revealed — every single one of these parts is an idea a group of sixteenth-century merchants could have conceived, and we have seen concrete, if clumsy, realizations for all of them. What they could not have built is the messenger. Without communication that is faster than the production of pages, the whole construction collapses into a slow and useless tangle of competing books, which is the main reason why no such system appeared until proper ways of communication were developed.

This story was meant to give the whole picture at once, and for that it had to stay on the surface in many places. Each of the components we passed through deserves a story of its own, and that is exactly what I intend to write. How SHA-256 actually turns a block into a number, and what it means for a hash function to be secure. How elliptic curves work, why Bitcoin uses them instead of RSA, and how a private key becomes an address. What really happens when two miners find a block at the same second, and what an attacker with half the world's hash power could and could not do. How the fee market behaves when blocks fill up, and what the Lightning Network adds on top. We will explore all of these individually, in the same spirit as here — taking one component at a time, asking what abstract role it has to fulfill, and only then looking at how Bitcoin fulfills it.

And with that we come to the end. What I hope this story conveys is that Bitcoin is not some mysterious magic internet money, and not a clever trick that only works because computers are involved. It is an old and rather mechanical idea — a shared book that nobody owns and everybody checks — that, above all, had to wait for messages to travel at the speed of light before it could be put to work.

Did you enjoy reading this story?