Blog

Article series5 parts41 min read

DCoin: from a ledger to a blockchain

Design a small cryptocurrency, then follow Bitcoin from signed transactions to the bytes stored on disk and exchanged between peers.

What would it take to build a currency whose ledger nobody owns?

DCoin is a thought experiment for answering that question one decision at a time. We start with a shared record of payments, introduce the cryptography that makes those payments verifiable, and work through the harder problem of choosing a history when participants disagree. Then we leave the toy design behind and read actual Bitcoin block and network data.

The five parts connect the model to the implementation: peer-to-peer networks and signatures; transactions and hash-linked blocks; consensus and incentives; a block decoded byte by byte; and the messages that carry it across a network. The illustrations combine TikZ with SVG artwork; the practical chapters include real terminal and Wireshark captures. The binary examples include small Python programs you can run without a Bitcoin node.

No trading, price predictions or token launch. Just the engineering of a ledger that has to survive disagreement.

Start reading

Chapters