TL;DR. In December 2013 a BitcoinTalk user called Cryddit, who is widely identified as Ray Dillinger, posted four source files that Satoshi reportedly sent to a few reviewers in November 2008. I put them next to Bitcoin v0.1.0 and read the money, consensus and network code of both side by side. The 2008 money rules were 100 coins per block, a halving every 100,000 blocks and a block every 15 minutes. That adds up to 19,999,998.8 coins, about 20 million, not 21. Neither version has a 21 million constant: in v0.1.0 the cap is simply what 50 coins times 210,000 blocks times two comes to, which is 20,999,999.9769. A Medium post says the 2008 code "had less bitcoin" and floats 1.99 billion. The direction is right, because the draft schedule issues about a million fewer coins, but the 1.99 billion comes from dividing by CENT and forgetting the second division by 100. Other differences I could verify: no coinbase maturity, a flat 0.01 coin fee taken out of what you send, difficulty set by counting zero bits, network port 2222 with the same magic bytes, and a blockchain that is called the timechain. Nobody has proven the files are Satoshi's. I explain what is and isn't known below.
Read this first. Everything on this page comes from the code itself, not from the Medium post or from my memory. The four 2008 files match what Dillinger pasted into the thread, and the v0.1.0 files are from the original release archive. Both sets are in our research mirror, and I give file names and line numbers so you can check every claim. Where I am inferring something the code doesn't say, I tell you.
What is the November 2008 Bitcoin source code, and where did it come from?
On December 23, 2013, a BitcoinTalk member called Cryddit started a thread titled Bitcoin source from November 2008. His first post says he had the archive in his e-mail, that the sources were from November 16, 2008, and that it was four files: main.h, main.cpp, node.h and node.cpp. The forum only allows about 64K per post, so he split main.cpp in two. The account is widely identified as Ray Dillinger, also known as Bear, and the Medium post and the research I've done before both credit it that way. I can't prove who sits behind a forum name, so that's an identification, not a certainty.
What do we know about the context? The whitepaper went to the cryptography mailing list on October 31, 2008. On November 17, Satoshi wrote on that list to James A. Donald that "the sourcecode is coming soon. I sent you the main files. (available by request at the moment, full release soon)". You can read the message in the mailing list archive. In the BitcoinTalk thread, Dillinger says he was on that list, that Satoshi asked for professional crypto people to review the project, and that Satoshi sent the archive to several of those who answered. He adds that Hal Finney probably has the same archive in his mail. Later in the thread, a user called deepceleron posted what he presented as Dillinger's forwarded copy of the e-mail, in which Satoshi describes the files as the core of the system: main.h and main.cpp are the Bitcoin system, node.h and node.cpp are the peer network communications. I can't verify that forward myself.
The code was never a complete program. Peter Todd asked whether that was all of it, and Dillinger answered that it was the whole source and that there was no script.cpp at that time. Todd then pointed out that the source calls functions that aren't in those files, so it could not have compiled, and Dillinger agreed that it refers to header files that weren't in the archive he received. His guess was that these were the parts Satoshi wanted professionals to review. Sergio Demian Lerner replied in the same thread that he had received the same files from one of the early reviewers.
Can we prove Satoshi wrote the 2008 files?
No, and I'd rather say so plainly than imply otherwise. Nobody has published a signature, a full mail header or an original attachment that I could check. The forum posts are the primary public copy, and the bitcoin_src1.rar named in the forwarded message has been mirrored by third parties since, which tells you where it went, not where it came from. What we have is circumstantial, but it adds up:
- Every file carries the line "Copyright (c) 2008 Satoshi Nakamoto" and the MIT license text.
- Satoshi's own list message of November 17 says he had sent "the main files" to James A. Donald.
- A second person, Lerner, said he had the same files, sent to him by an early reviewer of the code.
- The magic bytes on the network (
f9 be b4 d9), the transaction and block structures, the double SHA-256 mining loop and the coding habits all carry straight into v0.1.0. On the four preview files alone, our style measurement puts them at 0.108 from v0.1.0, which is where one programmer's own earlier draft lands, and nowhere near the 1.02 of the closest suspect. - In my opinion, a forger in 2013 would have had to invent a plausible test genesis block from September 2008, a retarget rule that nobody ever shipped and half a marketplace, and v0.1.0 contains the leftovers of all of it.
None of that is a proof. If you need a certificate, there isn't one. For a research article I treat the files as what Dillinger said they are, and I label that assumption.
I also checked the other direction. I extracted the code blocks from the thread and compared them with the files in our mirror, ignoring whitespace: all four files match character for character. The files are 66,174 bytes for main.cpp, 29,219 for main.h, 28,112 for node.cpp and 18,491 for node.h, 5,005 lines in total. According to my earlier research notes, those sizes match the bitcoin_src1.rar listing that The Chain Bulletin published, though I haven't re-fetched that listing today.
What did the 2008 code say about the block reward and the 21 million cap?
Here is the whole subsidy function from the 2008 preview, in main.cpp lines 652 to 658, next to its v0.1.0 successor in the same file at lines 675 to 682:
// November 2008 preview
int64 GetBlockValue(int64 nFees)
{
int64 nSubsidy = 10000 * CENT;
for (int i = 100000; i <= nBestHeight; i += 100000)
nSubsidy /= 2;
return nSubsidy + nFees;
}
// v0.1.0, January 2009
int64 CBlock::GetBlockValue(int64 nFees) const
{
int64 nSubsidy = 50 * COIN;
// Subsidy is cut in half every 4 years
nSubsidy >>= (nBestHeight / 210000);
return nSubsidy + nFees;
}
Two things to notice before any arithmetic. First, there is no 21 million anywhere in either function, and no cap constant anywhere else either. Second, the 2008 function never mentions COIN. It multiplies by CENT.
How much was one coin in the 2008 code?
The constants sit in main.h, lines 34 and 35 in the 2008 preview and lines 18 and 19 in v0.1.0:
// November 2008 preview
static const int64 COIN = 1000000;
static const int64 CENT = 10000;
// v0.1.0
static const int64 COIN = 100000000;
static const int64 CENT = 1000000;
In both versions a cent is one hundredth of a coin: 10,000 is one hundredth of 1,000,000, and 1,000,000 is one hundredth of 100,000,000. So the 2008 reward of 10000 times CENT is 10,000 cents, which is 100 coins. In v0.1.0 it's 50 times COIN, which is 50 coins. The 2008 unit was a millionth of a coin, six decimal places instead of the eight we know. Lerner said the same in the thread in 2013, listing "two more decimal digits for BTC denomination" among the changes between the two versions.
The honest caveat is that the 2008 files never print a balance. The function that turns units into a displayed number, FormatMoney, lives in util.cpp, and that file wasn't in the archive. So "100 coins" is an inference from the names and the constants, not a line of output. But it is the same inference v0.1.0 supports: there, FormatMoney in util.cpp lines 204 to 207 divides by CENT and then splits the result into whole coins and hundredths:
n /= CENT;
string str = strprintf("%I64d.%02I64d", (n > 0 ? n : -n)/100, (n > 0 ? n : -n)%100);
Divide by CENT, then divide by 100. Hold on to that second division, because it matters in a minute.
How many coins would the 2008 schedule have created?
The loop halves the reward every time the best block height passes another multiple of 100,000, using integer division. I ran that loop exactly as written (the script is in the sources file). The reward starts at 100,000,000 units, and after 27 reward levels it rounds down to zero. Each level lasts 100,000 blocks. Adding it all up gives 19,999,998,800,000 units, or 19,999,998.8 coins. The tidy version of the sum is 100 coins times 100,000 blocks times two, which is 20,000,000, and integer rounding shaves off the last 1.2.
v0.1.0 does the same thing with 50 coins and 210,000 blocks. Its shift runs through 33 reward levels and adds up to 2,099,999,997,690,000 units, or 20,999,999.9769 coins. Again the tidy version is 50 times 210,000 times two, which is 21,000,000, with 0.0231 lost to rounding.
So "21 million" in the first release was not a number Satoshi typed anywhere. It is a product. Pick a round reward, pick a round halving interval, double it because halvings sum to twice the first epoch, and you get your cap. In the draft those picks were 100 and 100,000, and the cap came out at 20 million. In the release they were 50 and 210,000, and it came out at 21 million. I find that more interesting than any conspiracy about the number itself. It means 20 and 21 are the same design with different dials.
When did a 21 million constant first appear in the code?
Not in 2008 and not in v0.1.0. I searched every early version I have. MAX_MONEY shows up for the first time in v0.3.10, the release of August 15, 2010, defined as 21000000 * COIN, as part of the patch that fixed the value overflow bug. It is a sanity limit on how much a transaction output or a sum of outputs may be, not the supply schedule, and it's actually slightly higher than the real total of 20,999,999.9769 coins. Before that patch, CheckTransaction() rejected negative outputs and nothing else, in both the 2008 preview and v0.1.0. I walk through that fix in Bitcoin's Code, Release by Release, so I won't repeat it here.
The number did get said in public early, though. Satoshi's announcement of v0.1 on January 8, 2009 states "Total circulation will be 21,000,000 coins" and lists the first four years as 10,500,000 coins, the next four as 5,250,000, and so on. The whitepaper from October 2008 never gives a figure. It only says that once "a predetermined number of coins have entered circulation" the incentive can move entirely to fees. So between the paper and the release, the number moved from "predetermined" to 21 million, and in November 2008 it was apparently somewhere near 20 million.
When Satoshi was asked about it in May 2009, he didn't claim any mathematical purity. In one of his e-mails to Martti Malmi, answering a reader's question about where 21 million came from, he wrote that his choice for the number of coins and the distribution schedule was "an educated guess" and a difficult one, "because once the network is going it's locked in and we're stuck with it". He wanted prices to end up similar to existing currencies, and "without knowing the future, that's very hard. I ended up picking something in the middle."
I'm a 21 million guy. I'll defend that number against anyone. But the guy who picked it called it a guess.
One more quirk: when does the first halving actually land?
Both functions key off nBestHeight, the height of the current chain tip, not the height of the block being created. When the tip is at 210,000, the next block is number 210,001, and that's the first one where the shift becomes 1. Read literally, v0.1.0 would have paid block 210,000 the full 50 coins, and the 2008 draft would have kept paying full reward through block 100,000. Version 0.3.10, the same release that added MAX_MONEY, changed the function to GetBlockValue(int nHeight, int64 nFees) and passed it the block's own height, so the real chain halved at block 210,000 as everyone expects. The change landed years before it could matter. I mention it because it's the kind of thing you only learn by reading the code, and because it may explain an off-by-one in the Medium post's arithmetic, which I get to now.
Was the Medium post right that Satoshi's 2008 code had less bitcoin?
The post is Satoshi's 2008 Bitcoin Source Code (v0.0) Had Less Bitcoin, the second part of a series. The first part, 1.99 Billion Bitcoin, Not 21 Million, argued from the same constants that the draft supply was 1.99 billion coins with four decimal places. In part two, the author reports that a reader, Lev1tas, had read the COIN constant as pointing to a supply of 20 million units, calls that a leap, and settles on saying the number of bitcoin in the 2008 code is "unknown", though the unit count rose from 19.9 trillion to 2.1 quadrillion. The author did the real work of opening the files, and that deserves credit. Lev1tas, as far as I can tell, was the one who got it right. Here is my checked verdict, claim by claim.
| Claim in the Medium posts | What the code says | Verdict |
|---|---|---|
| The draft is missing the file that defines how bitcoin is displayed | FormatMoney is in util.cpp, which isn't among the four files | Right |
COIN is defined in the 2008 files but never used | COIN appears once, in the definition on main.h line 34. The reward and fee use CENT | Right |
| Raw units rose from 19.9 trillion to 2.1 quadrillion | 19,999,998,800,000 units (nearly 20.0 trillion) versus 2,099,999,997,690,000 | Right in size, slightly low in the first figure |
| Part one's addendum puts the total at 19,999,898,800,000 units | My loop gives 19,999,998,800,000. The post is exactly one full-reward block short, which is what you would get by counting by block height instead of by the chain tip the code uses (my guess at the cause) | Wrong by 100,000,000 units |
| Halving every 100,000 blocks at 15 minutes, about 2.85 years | main.cpp lines 654 to 656 and 663. 100,000 blocks at 15 minutes is 1,041.7 days | Right |
| 27 reward levels in the draft against 33 in v0.1, and the last coin around 2086 | 27 and 33 reproduce. 27 epochs at 15 minutes is 77 years | Right |
| Retarget every month instead of every two weeks | 30 days against 14 days, but the draft's rule is different in kind (more below) | Right in the headline |
| A different genesis block with a different key and no Times headline | main.cpp lines 1022 to 1040: block time 1221069728, nonce 141755. The public key literal begins 0x31D18A, not 0x5F1DF1. The post calls the key a hash, but it is the output's public key | Right |
| The reward was 10,000 bitcoin per block | The constant is 10000 times CENT. That is 10,000 cents, or 100 coins | Wrong |
| The draft had 1.99 billion bitcoin | That figure is the total in units divided by CENT, which gives cents, not coins | Wrong |
| The draft used four decimal places for a satoshi | COIN is 1,000,000, so one coin has six decimal places | Wrong |
n /= CENT converts an amount to bitcoin | In FormatMoney it converts to cents, and the next line divides by 100 again to split coins from hundredths | Wrong |
| The number of bitcoin in the draft is unknown | Under the same naming the code uses in v0.1.0, it is about 20 million | Overstated |
| The draft had "less bitcoin" | 19,999,998.8 coins against 20,999,999.9769, which is 1,000,001.18 fewer | Right, but by about 4.8 percent, not by orders of magnitude |
The mistake that drives the billion figure is the missing second division. Take the 19,999,998,800,000 units and divide by CENT, which is 10,000, and you get 1,999,999,880. That is where "1.99 billion" comes from, and it is what you'd read off if the display code stopped after n /= CENT. But the display code doesn't stop there. Divide by 100 again and you get 19,999,998.8, which is the 20 million I computed from the schedule. The author's final position, that nobody can say how many coins were in the draft, is too cautious: the same convention v0.1.0 uses gives you the answer. What the author is right about is that the display code isn't in the files, so strictly speaking it is an inference. I'd call it a very safe one, because it makes the numbers round.
Think about it this way. Under the 1.99 billion reading, Satoshi would have chosen a reward of 10,000 coins with four decimal places, a unit called CENT that is a ten thousandth, and a halving after 2.85 years. Under the 20 million reading, he chose 100 coins, six decimals, a cent that is a hundredth like every cent in the world, and a total of 20 million. One of those looks like a design. The other looks like a typo that survived review.
What else changed between the 2008 draft and v0.1.0?
A lot. Here is the table I wish I'd had when I started. Each row is something I confirmed in the files, and the line numbers are in the table. Nothing in it is bold, which is how you know it's serious.
| Area | November 2008 preview | v0.1.0, January 2009 |
|---|---|---|
| COIN and CENT | 1,000,000 and 10,000 | 100,000,000 and 1,000,000 |
| Block reward | 10000 times CENT, 100 coins | 50 times COIN, 50 coins |
| Halving | every 100,000 blocks | every 210,000 blocks |
| Block target | 15 minutes | 10 minutes |
| Total supply | 19,999,998.8 coins | 20,999,999.9769 coins |
| Explicit cap constant | none | none (MAX_MONEY added in v0.3.10) |
| Difficulty encoding | nBits is the number of leading zero bits. Minimum 20 | Compact target. Starting value 0x1d00ffff |
| Retarget rule | Looks back 2,880 blocks (30 days). Moves one bit up or down, only if the window ran more than twice too slow or fast | Every 2,016 blocks (14 days). Scales by actual over target time, limited to a factor of 4 |
| Starting difficulty | 20 bits, commented "ridiculously easy for testing" | About 4,096 times harder than the draft's minimum |
| Genesis block | Time 1221069728, September 10, 2008 18:02:08 UTC. Nonce 141755. Output 10000 units, or 0.01 coin. Hash starts 000006b15d | Time 1231006505, January 3, 2009 18:15:05 UTC. Nonce 2083236893. Output 50 coins. Hash starts 000000000019d668. Times headline in the coinbase |
| Block header | The hashed header is 76 bytes, with no version field | 80 bytes, with nVersion set to 1 |
| Block time rules | Later than the previous block | Later than the median of recent blocks, and no more than two hours in the future |
| Coinbase maturity | No such rule in these files | COINBASE_MATURITY is 100, and the wallet counts 120 blocks |
| Coinbase claim | Must equal reward plus fees exactly | May claim less than reward plus fees |
| Fee | TRANSACTIONFEE is 1 times CENT, 0.01 coin, always, taken out of the amount sent | nTransactionFee defaults to 0, can be set by the user, is added on top, and large transactions need a minimum fee |
| Output script | Starts with OP_CODESEPARATOR, then the key, then OP_CHECKSIG | Key and OP_CHECKSIG only. The separator is inserted when scripts are joined for checking |
| Lock time | Compared with the clock | Compared with the block height |
| Sequence number | Stored in each output | Stored in each input |
| Network port | 2222 | 8333 |
| Magic bytes | f9 be b4 d9 | f9 be b4 d9 |
| Messages | getmywtxes and wtx for thin wallets. version carries a version, services and time | review instead, plus publish, pub-cancel and sub-cancel. version also carries the receiver's address |
| Finding peers | No IRC code in the four files | irc.cpp joins the #bitcoin channel to find nodes |
| Name for the chain | Timechain | Block chain |
| Marketplace | Product, review and table message types, with reviews credited for coins mined | Product and review code in market.cpp, the credit step commented out, tables gone |
I'll walk through the ones I find most revealing.
How did the 2008 difficulty and mining work?
In the draft, nBits isn't a compact target at all. It's a count of zero bits. The miner builds its target with ~uint256(0) >> nBits in main.cpp line 2018, and CheckBlock accepts a block when nBits is at least 20 and the hash is under that target. Twenty zero bits means about a million hashes per block on average, and the comment next to it in main.h says "ridiculously easy for testing". An earlier line shows he'd toyed with 40. Lerner noticed that line in 2013 and read it as evidence Satoshi might have been thinking of a much higher starting difficulty before settling on 32. Satoshi's January 2009 announcement uses the same phrase for the release: "I made the proof-of-work difficulty ridiculously easy to start with".
The retarget is stranger. GetNextWorkRequired walks back 2,880 blocks, which is 30 days at 15 minutes, and compares the first and last block of that window. If they have the same nBits and the span was more than double the target, it subtracts one bit. If the span was less than half the target, it adds one bit. That's it. Difficulty can only move by doubling or halving, and only in steps of one, which the comment calls "limit one change per timespan". Version 0.1.0 replaced all of it with the rule we know: every 2,016 blocks, scale by actual time over target time, and cap the change at a factor of four either way. Lerner's list from 2013 says the same thing in one line: "changed nBits from zero bit count to compact target format".
Why did the genesis block change?
Because, as far as I can tell, the draft's genesis block was a test run. The code carries its own debug notes: block time 1221069728, which is September 10, 2008 at 18:02:08 UTC, nonce 141755, and a coinbase that pays 10000 units, or 0.01 coin, to a key. There's no headline, since the Times article wouldn't exist until January. The Medium post and others have pointed out that this makes the file's genesis date a rough marker of when Satoshi had working code, and I agree it's a reasonable reading, but it only tells us when he mined that block, not when anyone wrote a given line. The release genesis block replaced all of it: new key, 50 coins, Times headline, and the timestamp of January 3, 2009.
Why does the 2008 code have no coinbase maturity?
I looked for it everywhere. Nothing in the four files mentions maturity, and ConnectInputs goes from signature check to double-spend check without ever asking whether the output being spent is a fresh coinbase. In v0.1.0, ConnectInputs refuses to spend a coinbase output that is less than 100 blocks deep (main.cpp line 824), and the wallet shows coins as immature for 120 (GetBlocksToMaturity, line 544). Satoshi's announcement says "Generated coins must wait 120 blocks to mature before they can be spent", so the interface number is what users saw, while the consensus check is at 100. In the 2008 draft you could, as far as these files show, spend what you mined at once, which in a chain that can reorganize is a bad idea. The missing files could hold a check I can't see, so read this as "no rule in the four files", not as proof that none existed.
Two other money rules moved in the same direction. In the draft, a block's first transaction must pay exactly the reward plus fees (!= in main.cpp lines 739 and 1229), while v0.1.0 accepts anything not above it (>), which allows a miner to leave coins unclaimed. And the draft's wallet took a hardcoded one cent from every payment: nValueOut = nValue - TRANSACTIONFEE on main.cpp line 2197, so the recipient received 0.01 coin less than you meant to send. In v0.1.0 the fee defaults to zero, you can set it, and it is added on top of the amount. In an October 2009 e-mail to Martti Malmi, in the Sirius e-mail archive, Satoshi said he planned to hide that setting, calling it "completely not needed and only serves to confuse people".
What happened to OP_CODESEPARATOR?
In the draft, every output script starts with OP_CODESEPARATOR. The miner's own coinbase script on line 1887 is OP_CODESEPARATOR, the public key, OP_CHECKSIG, and so is the change output in the wallet. In v0.1.0 the output script is just the key and OP_CHECKSIG, and script.cpp lines 1108 and 1126 glue the two scripts together with the separator in between at verification time. Peter Todd spotted this in the thread the day it was posted and said it would have allowed delegating signing authority. Mike Hearn replied that the separator was in the first release too, as part of what he called a broken method of running scripts by concatenation. Both are right about what they describe: the separator is in both, and the difference is who puts it there. I can't say more about the 2008 script engine, because script.cpp isn't in the archive, and Dillinger said there wasn't one at the time. That means the opcode set can't be compared, and I won't pretend otherwise.
Did the 2008 code really call it the timechain?
It did. In the four files the word appears as hashTimeChainBest, PrintTimechain(), and in comments such as "A transaction with a merkle branch linking it to the timechain". The miner's debug output says "supercoin found" where v0.1.0 says "proof-of-work found". By January 2009 the vocabulary had flipped to "block chain" throughout, with PrintBlockTree() replacing PrintTimechain(). The rename was incomplete: main.cpp line 1560 in v0.1.0 still has the comment "put the main timechain first". I find that charming, and it's not even a hypothesis. It's a leftover in the release file.
Was there a marketplace and a poker table in the 2008 code?
The draft already has the plumbing for a marketplace. Message types for reviews, products and tables are in node.h (lines 274 to 276), the main loop checks mapProducts and mapTables, and when a block is accepted the draft calls a function that adds "atoms to user reviews for coins created". Todd quoted that comment in the thread and found it fascinating. Hearn's answer, which I'm repeating as his account and not as established fact, was that Satoshi originally intended an integrated peer-to-peer eBay style market in which reviews would be weighted by how much mining someone had done, and that it was never finished.
By v0.1.0 that code had been moved into market.cpp, 264 lines with CUser, CReview and CProduct. The call that credits reviews on block acceptance is still there, but commented out (main.cpp lines 1224 to 1231). The table code has gone, leaving only the MSG_TABLE entry and a comment about "CTable". Whether "table" meant a poker table I can't prove from the code. What I can say is that the generated interface code in the v0.1.0 archive still contains CPokerLobbyDialogBase and CPokerDialogBase windows, titled "Poker Lobby" and "Poker", and nothing in the program creates them. A shipped Bitcoin with a poker lobby it can't open is the most Satoshi thing I've read this year.
What changed after v0.1.0?
For money, almost nothing until August 2010, and I checked the releases in between: v0.1.3, v0.1.5, v0.2.0 and v0.3.0 all have the same 50 coins, the same 210,000 and the same shift keyed to the chain tip. Between v0.1.0 and v0.1.3 I found no money change at all. The diff is the protocol version constant (101 to 103), a version log message, a default port on one constructor, a check that keeps local addresses out of the address list, a reconnect delay for the IRC seeding and a shutdown declaration.
The big moves came in v0.3.10 on August 15, 2010: MAX_MONEY as 21000000 * COIN, range checks on every output and on the running total, and GetBlockValue(nHeight, nFees) using the block's own height. The details, with the opcodes that were disabled in the same patch, are in Bitcoin's Code, Release by Release. If you want the v0.1 code itself explained line by line, start with Satoshi's v0.1 code. The style side of the story, including how steady his habits stay from the preview to his last commit, is in Satoshi Against Himself, and the code fingerprint chapter shows what is unique in his habits. Every Satoshi investigation on the site is mapped in the Who Is Satoshi hub.
Why does it matter that 21 million started out as a draft number?
Because a large part of Bitcoin culture treats 21,000,000 as if it was handed down in a stone tablet. People tattoo it. They put it in usernames. They explain it with all kinds of numerology, and in a few corners they build something that looks suspiciously like a religion around it. I've done my share of cheering for the cap, and I still do, because a supply that can't be inflated at will is the entire point. But look at what the code actually shows.
The 2008 draft has 100 coins per block and a roughly 20 million cap. The release has 50 coins per block and a roughly 21 million cap. The cap is the product of a reward and an interval, two knobs that Satoshi turned between November and January, and he told a reader that he picked "something in the middle" with an educated guess. The cap is sacred because the network agreed to enforce it, and that's the only reason that counts. It isn't sacred because of the number. If it had shipped at 20 million, I'd be telling you the same thing, and the tattoos would be different.
That's the part I find reassuring, not deflating. A rule is strong when thousands of nodes enforce it and nobody can change it without everybody noticing, and the first draft shows just how arbitrary the starting dials were. The commitment is the consensus, not the digits. Also, 20,999,999.9769 was never exactly 21 million anyway, so if your faith needs round numbers, I have bad news about integer division.
How can you check this yourself?
You don't need to trust me or the Medium author. Open main.h and main.cpp from the 2008 files and the v0.1.0 files in the research mirror, find GetBlockValue, COIN, CENT and GetNextWorkRequired, and read them side by side. The 2008 text matches the posts in the BitcoinTalk thread, and the original release archive is mirrored too. The short script that sums both schedules is in the sources file published with this article. It is about 40 lines, and it reproduces 19,999,998,800,000 and 2,099,999,997,690,000.
If you find a mistake, e-mail me or find me on X. I'd rather fix it than defend it. And if you're one of the people who owns a "21,000,000" hoodie, please don't take this personally. It's still a good hoodie.
FAQ
Did Satoshi's first Bitcoin code have a 21 million cap?
No. The November 2008 preview has no 21 million constant and its schedule adds up to about 20 million coins: 100 coins per block, halving every 100,000 blocks. Version 0.1.0 has no cap constant either. Its schedule of 50 coins per block and 210,000 blocks per halving adds up to 20,999,999.9769 coins. The explicit MAX_MONEY limit of 21 million was added in v0.3.10 in August 2010.
How many coins would the 2008 schedule have created?
19,999,998.8 coins, if one coin is 1,000,000 units as the file's COIN constant says and a cent is a hundredth of that. In raw units it is 19,999,998,800,000. The figure rests on the display code, which isn't in the four files, so it is an inference from the constants, but it is the same inference that gives 50 coins per block in v0.1.0.
Was the Medium post right that the 2008 code had less bitcoin?
Partly. The draft did issue fewer coins, about a million fewer, or roughly 4.8 percent. But the post's 1.99 billion figure and its 10,000 coin reward come from reading 10000 * CENT as 10,000 coins when it is 10,000 cents, which is 100 coins. The post also has an addendum total that is one block's reward short. Its observations about the halving interval, the block time, the missing display code and the unused COIN constant all check out.
Is the November 2008 code really Satoshi's?
Nobody has proven it, and I can't either. The files carry Satoshi's 2008 copyright header, a second person said he had the same files from another reviewer, Satoshi's public message of November 17, 2008 says he sent main files to a reviewer, and the code lines up with v0.1.0 in structure, network magic bytes and style. There is no signature or original e-mail to check, and the forum account behind the post is identified as Ray Dillinger by reputation, not by proof.
What was the block reward in the 2008 code?
GetBlockValue starts from 10000 times CENT, which is 100,000,000 units. With COIN at 1,000,000, that's 100 coins plus fees. The reward halves by integer division each time the chain tip passes a multiple of 100,000 blocks, and at a 15 minute block target that is about every 2.85 years.
When did Bitcoin's code first contain the number 21 million?
I can't find it in the 2008 preview, nor in v0.1.0, v0.1.3, v0.1.5, v0.2.0 or v0.3.0. It first appears as MAX_MONEY = 21000000 * COIN in v0.3.10 on August 15, 2010. In public, though, Satoshi wrote "Total circulation will be 21,000,000 coins" in the v0.1 announcement of January 8, 2009.
Did the 2008 code include a marketplace or poker?
It had the beginnings of a marketplace: message types for products, reviews and tables, and a step that credits user reviews when a block is accepted. According to Mike Hearn, it was meant to be an integrated peer-to-peer market with reviews weighted by mining. The poker part is thinner. v0.1.0 ships empty poker lobby windows in its generated interface code, and the table code from the draft is gone.
Where can I read both versions of the code?
In the Bitcoin Takeover research mirror: the four November 2008 files and the v0.1.0 source tree are both there, with checksums. The original posts are in the BitcoinTalk thread titled "Bitcoin source from November 2008", and the v0.1 release announcement is in the cryptography mailing list archive.

