Chapter 7: A History of Smart Contracts — From Vending Machines to the World Computer
The history of smart contracts: Nick Szabo's 1994 idea, Ethereum's world computer, The DAO hack, ERC-20 and ERC-721 standards, oracles, DeFi, and account abstraction.
Introduction
Every time someone swaps tokens on a decentralized exchange, borrows against crypto collateral, or mints an NFT, a smart contract does the work: a program stored on a blockchain that runs exactly as written, with no intermediary able to stop it, censor it, or quietly change its terms. The word is older than blockchain itself. "Smart contract" was coined in 1994 by the computer scientist and legal scholar Nick Szabo — roughly two decades before a network existed that could actually run one. This chapter tells the history of smart contracts: the idea in its pre-blockchain form, Ethereum's realization of it as a "world computer," the crisis that tested what "code is law" really means, the standards that made contracts composable, and the security, oracle, and scaling developments that carried the concept from a thought experiment to infrastructure moving billions of dollars a day.
7.1 Before Blockchain: Nick Szabo and the Vending Machine (1994–2008)
The story begins not on a blockchain but in the intersection of law and computer science. In 1994, Nick Szabo defined a smart contract as "a set of promises, specified in digital form, including the protocols within which the parties perform on these promises." His insight was that many contractual clauses — payment, collateral, forfeiture, enforcement — could be embedded in hardware and software itself, making breach expensive or impossible rather than merely punishable after the fact in court.
In his 1996 essay "Smart Contracts: Building Blocks for Digital Markets," Szabo offered the analogy that still explains the concept better than any definition: the vending machine. A vending machine is a box that holds money, a locked compartment of products, and a simple rule — insert the exact change, receive the soda. No cashier enforces the sale; the machine's design enforces it. Szabo argued that digital securities, derivatives, and payment systems could be engineered the same way, with the "lockbox" logic written into the instrument itself.
Szabo was not entirely alone. Around the same period, Ian Grigg developed the "Ricardian contract," an attempt to bind human-readable legal prose to machine-readable value in digital instruments. But Szabo pushed furthest toward the idea of automated performance, and in 1998 he designed bit gold — a scheme using proof-of-work chains to timestamp and assign digital tokens without a central issuer. Bit gold was never built; the computers and networks of the day were not ready, and Szabo himself had no way to stop a single node from rewriting history. What his work demonstrated, though, was that the missing piece was not the idea of a smart contract. It was a machine that could run the code without anyone being able to tamper with it. When that machine arrived, it came with a name borrowed from Szabo's own writing: the world computer.
7.2 From Idea to World Computer: Ethereum (2013–2015)
Bitcoin, launched in 2009, did contain a primitive contract language: Script. But Script was deliberately limited — not Turing-complete, with no loops and only a handful of operations. Projects like colored coins and Counterparty tried to layer contracts onto Bitcoin, but they were working against the grain of a protocol designed for one job: moving bitcoins.
The synthesis came in late 2013, when Vitalik Buterin, then 19 years old, circulated the Ethereum whitepaper, "A Next-Generation Smart Contract and Decentralized Application Platform." Buterin's proposal was radical in retrospect only: instead of bolting applications onto a currency, build a blockchain whose native purpose is running arbitrary programs. Ethereum would be Turing-complete — able to express any computation — and would function as a single shared computer maintained by thousands of nodes. The comparison the community reached for was that Bitcoin was a calculator while Ethereum aimed to be a smartphone.
The project moved with remarkable speed. In July and August 2014, the Ethereum Foundation's crowdsale raised about 31,500 BTC — roughly $18.3 million at the time, the largest crowdfunding ever conducted. Gavin Wood's technical "Yellow Paper" specified the Ethereum Virtual Machine (EVM), and Solidity, a JavaScript-like contract language, gave developers a practical way to write contracts for it. On July 30, 2015, the network's first production release, Frontier, went live. For the first time, anyone could deploy a Szabo-style contract to a global, censorship-resistant computer — no permission, no hosting provider, no administrator. (The full story of Ethereum's birth is told in Ethereum's birth and rise.)
7.3 The First Stress Test: The DAO and the Limits of "Code Is Law" (2016)
Ethereum's first year was a proof of concept. Its second year delivered the stress test. In April 2016, a project called The DAO launched: a decentralized venture fund, written entirely as a smart contract, in which holders of DAO tokens voted on which projects would receive capital. It raised about $150 million worth of ETH from more than 11,000 participants — at that point the largest crowdfunding in history.
On June 17, 2016, an attacker found the flaw that would define an era. The DAO's withdrawal function sent ether before updating the caller's internal balance, and because external calls hand control to another contract, the attacker was able to re-enter the function recursively and drain roughly 3.6 million ETH — about $50–60 million — into a "child DAO." The exploit, now known as a reentrancy attack, exploited no flaw in Ethereum itself, only in the contract's code. That was precisely the problem: on a platform where code is law, a bug is law too.
After frantic debate, the Ethereum community voted to intervene. On July 20, 2016, at block 1,920,000, a hard fork rewound the stolen funds to a rescue address. A minority refused the intervention on the principle that the chain should be immutable, and kept running the unforked chain as Ethereum Classic. The episode settled, uneasily, a question every smart-contract platform still negotiates: "code is law" governs the machine, but humans decide when to touch the machine. It also birthed smart-contract security as a profession. (For a step-by-step walkthrough, see The DAO hack, explained.)
7.4 The Standardization Era: ERC-20, ERC-721, and Money Legos (2015–2018)
Contracts became an ecosystem when they became standardized. In November 2015, Fabian Vogelsteller and Vitalik Buterin proposed ERC-20, a common interface for fungible tokens: a short list of functions any token contract should implement. Once wallets, exchanges, and explorers spoke that interface, a new token could be created in minutes and work everywhere immediately. Finalized in 2017, ERC-20 became the engine of the ICO boom, in which token sales raised roughly $5.6 billion that year (the mania and its aftermath are covered in the ICO boom).
In January 2018 — building on the popularity of CryptoKitties, whose virtual cats had congested the Ethereum network in late 2017 — ERC-721 arrived to standardize the opposite case: tokens that are unique and non-fungible. ERC-721 is the technical foundation of every NFT.
The deeper product of this era was composability. Because every contract is public and permissionless to call, developers began snapping protocols together like "money legos": a lending protocol inside a wallet inside an aggregator, each an independent contract reading and writing to the same shared state. This was the real fulfillment of Szabo's "building blocks for digital markets" — a market where the blocks are executable.
7.5 The Oracle Problem: Wiring Contracts to the Real World (2019)
There was a structural gap in the world computer: a smart contract cannot, by itself, know anything about the world outside its blockchain. A contract can verify a signature and move ether, but it cannot look up an exchange rate, a stock price, or whether a flight landed. Deliberately so — if one node could feed the chain outside facts, it could feed it false ones.
The workaround — a centralized data feed — reintroduced the trusted intermediary smart contracts were meant to remove, the so-called oracle problem. The landmark response was Chainlink, whose whitepaper appeared in 2017 and whose mainnet launched in May 2019: a network of independent oracle nodes that fetch, aggregate, and sign off-chain data on-chain, with staking and reputation making dishonesty expensive. Decentralized oracles turned price feeds, weather data, and settlement information into usable contract inputs and became the plumbing on which the next wave — DeFi — would be built.
7.6 Application Waves and the Security Arms Race (2017–2022)
The standards and plumbing of 2015–2019 matured into two waves of applications that took smart contracts mainstream.
DeFi Summer (2020). In June 2020, the lending protocol Compound began awarding its COMP governance token to users, igniting "liquidity mining." Yield-seeking capital flooded into permissionless protocols — Uniswap's automated market makers, Aave's money markets, MakerDAO's DAI — and total value locked in DeFi surged from under $1 billion to roughly $15 billion within months. Every one of those protocols is, at bottom, a bundle of smart contracts. (The full arc continues in the DeFi revolution.)
The NFT boom (2021). ERC-721 contracts scaled from CryptoKitties to a global market for digital art and collectibles, culminating in Beeple's "Everydays: The First 5000 Days" selling for $69.3 million at Christie's in March 2021. (Deep dive in the NFT boom.)
Each wave carried security lessons of its own. The Parity multisig wallet — a single contract securing hundreds of millions in user funds — lost about $30 million to an exploit in July 2017, then accidentally self-destructed that November, permanently freezing around 513,000 ETH (roughly $150 million at the time). Reentrancy, the original sin of The DAO, resurfaced against DeFi protocols as recently as 2020. In response, a full industry formed: audit firms (OpenZeppelin, Trail of Bits, ConsenSys Diligence and others), bug bounty platforms, battle-tested open-source contract libraries, and formal verification tools that mathematically prove properties of contract code. Security matured from an afterthought into a prerequisite for raising money.
7.7 The Present and Future: Rollups, Account Abstraction, and Real-World Assets
The smart contract of the 2020s is a different creature from the 2015 original — same idea, very different habitat.
Scaling. As Ethereum's popularity priced out ordinary users, execution migrated to Layer 2 rollups such as Arbitrum, Optimism, and Base, which run EVM-compatible contracts off-chain and post compressed data back to Ethereum. Since the network's switch to proof of stake in The Merge on September 15, 2022 — which cut Ethereum's energy use by roughly 99.95% — most new contracts deploy to rollups first.
Account abstraction. The ERC-4337 standard, rolled out on mainnet in March 2023, turned user accounts themselves into smart contracts: wallets with social recovery, session keys, sponsored gas, and passkey login. It is the quiet answer to smart contracts' oldest UX problem — that ordinary people should not need to manage raw private keys to use a blockchain.
Real-world assets. The frontier now is contracts that represent assets outside crypto entirely: tokenized treasury bills and money-market funds, with BlackRock's BUIDL fund launching on Ethereum in March 2024 and reaching hundreds of millions of dollars within months. Szabo's vending machine, thirty years on, is dispensing Wall Street instruments.
Summary
The history of smart contracts is the story of an idea that waited two decades for its machine. Nick Szabo defined the concept in 1994 and designed bit gold in 1998; Ethereum turned both into a Turing-complete world computer in 2015; The DAO crisis of 2016 established the social limits of "code is law"; ERC-20 and ERC-721 made contracts composable building blocks; decentralized oracles wired the chain to the real world; and DeFi, NFTs, rollups, account abstraction, and tokenized assets turned Szabo's thought experiment into infrastructure securing on the order of $40 billion in DeFi alone. The definition has barely changed since 1994 — a set of promises, specified in digital form. What changed is that the promises now hold real money, real art, and increasingly, real-world assets, and execute every second of every day.
Further reading: the full blockchain history book, the surrounding chapters on Ethereum and the ICO boom, and the illustrated Bitcoin whitepaper, explained.