Lecture 2: Blockchain as a Database
Overview
Robert M. Townsend frames blockchains and financial accounts as databases for recording transactions, arguing that money is better understood by how frequently an object is exchanged than by whether it is called a coin or a liability. He connects Bitcoin, household accounting, distributed-ledger design, central-bank payment systems, and community currencies to show how shared records can reduce reconciliation problems while facing trade-offs in consistency, availability, privacy, and scale.
Key takeaways
- A blockchain is a transaction database, not inherently a form of money; Bitcoin's current state must be reconstructed from its history beginning with the genesis block.
- Money can be identified by high transaction turnover relative to its stock, a definition that accommodates multiple currencies and objects such as grain used to pay labor.
- A shared distributed ledger can expose mismatches between counterparties' records sooner, but it does not eliminate the design trade-offs among consistency, availability, and partition tolerance.
- The store-of-value and medium-of-exchange roles can conflict: babysitting-coupon holders hoarded scarce certificates, and banks delay settlement payments to conserve reserves.
- Reliable financial analysis needs transaction-level data that reconcile cash flows, income, and balance sheets; Townsend reports that major U.S. surveys were not designed to meet that consistency standard.
- Mobile money and community currencies expand exchange beyond conventional bank money, but systems such as Safaricom's Kenyan phone-credit network retain centralized custody and commercial-bank risk.
Chapters
- Townsend defines a database as any data structure used to store information and describes a blockchain as a ledger of transactions.
- Bitcoin blocks contain a timestamp, proof-of-work nonce, previous-block hash, and a bundle of transactions.
- Bitcoin acts like a state machine, but recovering its current state requires replaying transaction history from the genesis block.
- Public and private keys authorize transactions, while the recorded transfers alter account balances.
- Satoshi Nakamoto registered bitcoin.org in August 2008 and published the white paper, “A Peer-to-Peer Electronic Cash System.”
- Open-source code appeared in January 2009; Nakamoto mined the genesis block on January 3, and Hal Finney received the first Bitcoin transfer nine days later.
- A programmer's pizza purchase in May 2009 became known as Bitcoin Pizza Day.
- Arvind Narayanan characterized Bitcoin's novelty as the combination of existing components into a decentralized, Sybil-resistant, Byzantine fault-tolerant digital cash system.
- Paul Krugman's babysitting economy used certificates earned by caring for other couples' children and later spent to obtain babysitting.
- A shortage of coupons made couples reluctant to go out, reducing both demand for babysitting and opportunities to earn certificates, which drove a recession in the network.
- Issuing more coupons addressed scarcity but created an inflation problem.
- Townsend uses the example to question what counts as cash or money, then cites Hyun Song Shin's criticism of cryptocurrency congestion and volatility and notes that about 80% of central banks were exploring digital currencies.
- Townsend presents the household accounts as a cash-flow statement, an income statement, and a balance sheet.
- A wage payment increases household cash on the balance sheet, counts as labor revenue on the income statement, and appears as an inflow in cash flow.
- Paying a telephone bill reduces cash and records consumption, while depositing cash in a production credit group swaps assets without changing income.
- Townsend's household data project classifies reported transactions systematically so that the accounts can be checked for consistency.
- Cash flows are grouped into production, consumption and investment, and financing, including deposits, borrowing, and gifts.
- An account receivable can count as income before cash arrives, so it must be adjusted when calculating cash flow.
- Household-produced food can count as revenue or consumption even when it generates no cash transaction.
- The cash-flow change in holdings should match the change in cash on the balance sheet, a double-entry-style check Townsend used with wage-earning households in Lopburi, Thailand.
- Townsend contrasts money used for payments with a broader, multidimensional blockchain database that can also record contracts and other objects.
- In monetary theory, an object with a high ratio of transaction volume to its stock has high velocity and functions frequently in exchange.
- That turnover-based definition can include multiple monies and avoids making the label “money” depend on one item in a financial-account framework.
- Village India payment data show currency exchanged for goods alongside grain used to compensate labor, creating a dual monetary economy.
- Townsend and the Boston Fed developed U.S. household account-flow measures drawing on the Consumer Payments survey.
- The matrix distinguishes currency, demand deposits, debit accounts, foreign currency, and transfers between these payment types.
- A move from currency to a demand deposit is an account conversion, not new income; households can also move funds between other accounts.
- The data show that households use multiple payment forms, some indirectly backed by Federal Reserve liabilities, but the measured flows do not automatically reconcile with balance sheets.
- Townsend compares Bitcoin's transaction-updated state with private household records of currency and other transactions in Thai villages.
- A common ledger could pool monthly reports, validate transactions, and redistribute a shared record, unlike the individual accounts actually collected.
- In the Thai data, a reported purchase sometimes appears in the buyer's account but not the seller's, exposing a reconciliation problem.
- Financial-market intermediaries also reconcile mismatched transaction records, and Townsend notes that end-of-day processes can take hours and become harder as prices change.
- Townsend defines distributed ledger technology as infrastructure and protocols for simultaneous access, validation, and record-keeping across a networked database.
- Shared visibility into record changes and the nodes that made them can reduce auditing needs and improve reliability.
- Distributed computing across multiple locations predates modern blockchain systems; advances in computing and data science have expanded its capabilities.
- Every blockchain is a distributed ledger, but a distributed ledger need not use blockchain-style validation across linked blocks.
- In real-time gross settlement systems, banks can delay reporting known payment obligations to conserve reserves, contributing to end-of-day payment bunching.
- Townsend links payment fragility to the tension between using scarce reserves as a medium of exchange and holding them as a store of value.
- The babysitting-coupon shortage illustrates the same conflict: holders preserve certificates instead of spending them.
- Luca Pacioli's bookkeeping treated cash entries as associated with a debtor's obligation to the community, challenging the intuitive view of money only as an asset.
- Community inclusion currencies, also called mutual-credit networks, let participants exchange goods and services using interest-free credit within a community.
- Sarafu vouchers in Nairobi are promises against future production, accepted by microbusinesses to keep value circulating locally.
- Participants earn vouchers by selling goods and spend them on other members' production; some incentive structures discourage hoarding.
- Sarafu runs on Ethereum, illustrating how a blockchain can support exchange and commitments beyond conventional cash payments.
- The CAP framework concerns consistency, availability, and partition tolerance in distributed databases.
- Consistency means readers receive the same answer, while availability means the system responds to requests; partition tolerance means it continues operating despite network separation.
- Bitcoin can temporarily have competing proposed blocks, with validation determining which history becomes accepted.
- A system facing network failures must either restrict operation to protect consistency or keep operating and risk inconsistent records.
- Separate Alice and Bob accounts can disagree; an intermediary can provide a consistent representation for transactions routed through it.
- Central securities depositories maintain a unique ownership log, prioritizing consistent records across participants.
- Sharding divides one database into subledgers to improve processing, while layer-2 arrangements execute agreed smart-contract logic off the main ledger and record asset transfers on it.
- The BIS concept of a unified ledger aims to connect existing ledgers, while contract completeness also requires checking that multiple smart contracts work consistently together.
- FedNow enables near-instant U.S. payments, but many depository institutions still need real-time processing and automated connectivity to support it, often relying on concentrated payment aggregators.
- Sweden's Swish instant-payment system reduced the use of cash; the Riksbank considered a central-bank digital currency before deciding against one.
- In Kenya, Safaricom agents convert Kenyan shillings into transferable phone credits and back, creating a dual system of mobile e-money and fiat cash.
- Kenyan phone-credit balances ultimately depend on funds held in commercial banks, while centralized crypto exchanges such as FTX show how customer assets can be diverted outside a blockchain ledger.
- The Hamilton digital-dollar project by MIT's Digital Currency Initiative and the Boston Fed prioritized transaction privacy, but its initial design omitted contract functionality.
- Townsend finds that major U.S. microdata sources, including the Panel Study of Income Dynamics, the Consumer Expenditure Survey, and the Survey of Consumer Finances, often do not reconcile cash flows with balance-sheet changes.
- A West Virginia project is developing templates that combine shared electronic bank and credit-card records with enumerated paper-currency transactions.
- Townsend proposes adapting consistent-account methods for Indonesia, where households and businesses use multiple payment accounts and face transaction costs, agent markups, theft, and fraud.
Transcript excerpt
0:00 [SQUEAKING] [RUSTLING] [CLICKING] ROBERT TOWNSEND: So this is the second lecture, although the first full presentation of a body of material rather than just a summary. And in particular, we're going to talk about blockchains as a database. And the underlying themes here are a unified view of distributed ledgers and financial accounts, putting them in one bin, so to speak. Distinct views of money and the larger community perspective. So this is an outline of what we're going to do.
0:48 Talk about blockchain as a database. Talk about the financial accounts. Take a broader view of the blockchain. This tension I mentioned last time between individual and community perspectives. Then some technical limitations of blockchains also reflected in current difficulties and some progress in mapping economies and next steps. So that's the overall outline of the lecture. And then we have the individual sections within. Blockchain is a special form of the database. We'll talk about the creation of Bitcoin, an incorrect association of blockchain with money, peer-to-peer exchange certificates,
1:40 and central bank reactions to money and ledgers. OK, so here's a definition. Any data structure used to store information can be considered a database. A blockchain technology is a ledger to store information about transactions. So those are the objects in the database. And hence a blockchain can be considered to be a database and nothing more or less. Data is stored in signed blocks. The blocks are linked to each other, creating a chain of immutable, interconnected data entries. So that is an important mechanical aspect
2:32 of how the blockchain database works. In particular for Bitcoin, for example, each node is trying out a bundle of the set of incoming transactions since the last committed block in order to form a new block. And these blocks consist of a time stamp
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, MIT OpenCourseWare.