Just out of curiosity - Rewriting Bitcoin [ burnsteem100]

Claude's Take

Me: How long would it take for a Claude agent with an unlimited token budget to write the bitcoin code today, if it didn't exist already?


Claude: Fun question. Let me break down what "writing Bitcoin" actually involves versus what an agent could bang out quickly.

What's actually hard about it

The original Bitcoin codebase (Satoshi's 2009 release) was maybe 10-15k lines of C++. Writing code of that size is not the bottleneck for a modern agent - that's an afternoon of generation, even accounting for iteration.

The bottleneck is the design, not the typing:

  • Novel cryptographic/economic invention: proof-of-work as Sybil resistance, the longest-chain rule, UTXO model, difficulty retargeting, the halving schedule, script system. This wasn't "known" in 2008 - it required synthesizing ideas from hashcash, b-money, and prior digital cash failures into something that actually solved double-spending without a trusted third party. An LLM in 2026 has all of this in its training data, so it's not inventing anything - it's reproducing a known solution. That's the key asymmetry.
  • Getting the incentive design right without being able to simulate it: things like the 10-minute block target, difficulty adjustment period, and fee market weren't obviously correct in advance - they were judgment calls that turned out to work, refined through years of real-world stress testing (block size debates, selfish mining concerns, etc.)
  • Networking/consensus edge cases: handling chain reorgs, orphan blocks, timestamp manipulation resistance, malleability - a lot of this got hardened over the following years through actual attacks and bugs found in production, not in the initial design.

So, timeline estimate

If the goal is "produce code functionally equivalent to the 2009 release, knowing what we now know" — a Claude agent could plausibly do this in hours to a couple of days of wall-clock time (mostly bounded by tool-call round trips, compiling, testing edge cases), because it's reconstructing a known, well-documented design rather than inventing one.

If the goal is "invent Bitcoin from a blank slate, the way Satoshi did, without benefit of already knowing the answer" — that's a different question entirely, and not really one where "unlimited tokens" helps much. It's not a compute-bound problem, it's an insight-bound one. Satoshi's contribution wasn't lines of code, it was the specific synthesis of ideas that made the whole system self-consistent. An agent with unlimited tokens but no access to "the answer already exists" would face the same uncertainty any human researcher did — you can't brute-force your way to the right incentive design by generating more tokens, you need something like the multi-year process of proposing, testing, and revising against adversarial conditions.

The honest short answer: code generation, hours; the actual intellectual contribution, not really a "how long" question at all - unlimited tokens mostly just lets you explore a design space faster, it doesn't guarantee you land on a good one.

Gemini's Take

Me: How long would it take for a Gemini agent with an unlimited token budget to write the bitcoin code today, if it didn't exist already?


Gemini: If an advanced autonomous AI agent (such as a Gemini agent) with an unlimited token budget were tasked with writing the original version of Bitcoin (v0.1) from scratch today, the entire process would take between 1 to 3 hours of active execution time.

When looking at the problem through the lens of pure software engineering and agentic throughput, the timeline breaks down across a few distinct phases:

1. The Scope of the Original Codebase

Satoshi Nakamoto’s initial release of Bitcoin v0.1 in 2009 consisted of roughly 26,000 lines of C++ code. While modern Bitcoin Core has expanded to over 750,000 lines with decades of optimizations, security hardening, and protocol upgrades, the foundational version included:

  • A peer-to-peer networking layer (node discovery and message propagation).
  • A Proof-of-Work consensus engine (SHA-256 mining loop).
  • The basic transaction ledger and UTXO (Unspent Transaction Output) tracking.
  • A rudimentary graphical user interface (GUI) using wxWidgets.
  • A local wallet file management system.

2. Time Breakdown for an Unlimited-Token Agent

Even with an unlimited token budget, an agent's speed is bound by computational generation limits, architecture planning, and logical validation steps rather than just raw typing speed.

  • Architecture & Planning (10–15 minutes):
    An agent would instantly synthesize the whitepaper, map out the class structures, define the block and transaction byte layouts, and establish the networking protocols. Because it has access to modern libraries and complete knowledge of cryptography standards, this design phase is practically instantaneous.
  • Core Code Generation (30–45 minutes):
    Generating 26,000 lines of structured C++ across dozens of files would take a high-throughput LLM backend roughly half an hour. With an unlimited token budget, the agent wouldn't suffer from context-window bottlenecks or truncation errors; it could spin up modular sub-agents to write the crypto primitives, database handlers, and networking sockets simultaneously.
  • Compilation, Testing, & Self-Debugging (30–60 minutes):
    This is where the bulk of the time goes. Even brilliant code requires iterative compilation. The agent would write unit tests, run a simulated local network of virtual nodes in a sandbox, catch segmentation faults, fix memory leaks inherent to C++, and resolve consensus edge cases (like double-spend race conditions).

The Ultimate Bottleneck: Physics vs. Logic

While an agent could theoretically draft the logic in minutes, building a bulletproof distributed consensus system requires rigorous integration testing. Factoring in automated test-net simulation, block-generation stress tests, and cryptographic verification loops, a fully functional, genesis-ready Bitcoin v0.1 clone would go from prompt to compiled binary in under two hours.

Sort:  

Surprisingly honest answer from Claude. I like it.

I agree. I wasn't really expecting it to demonstrate the understanding that Satoshi was creating knowledge and not just writing code.