The Journal of Things We Like (Lots)
Select Page
Gregory Klass, How to Interpret a Vending Machine: Smart Contracts and Contract Law, 7 Geo. L. Tech. Rev. __ (forthcoming, 2022), available at SSRN.

Gregory Klass’s How to Interpret a Vending Machine: Smart Contracts and Contract Law is an extraordinarily incisive legal analysis of smart contracts. While others have written insightfully about the relationship of smart contracts and legal contracts, Klass utterly nails a central conceptual point: When smart contracts are embedded in legal relationships, they stand in need of interpretation.

Nick Szabo introduced smart contracts in the 1990s as contracts “embedded in the world” such that breach is expensive or impossible. Whereas traditional contracts rely on the legal system (backed by threat of force) to enforce their terms, smart contracts use hardware and software to automatically enforce their terms. Szabo gives the example of a “humble vending machine” that takes in coins and dispenses products, and then argues that software and cryptography make it possible to craft much more sophisticated agreements than simple cash sales.

Seen this way, smart contracts are not contracts but mechanisms, and hence the vending-machine analogy is apt. What is important is not what they mean but what they do. Klass shows that even mechanisms need interpretation. Through a sequence of entertaining hypos, he demonstrates that courts confronting cases involving mechanisms embedded in contracts must use the methods of legal interpretation to reason about what those mechanisms are understood to do, just as they reason about what contractual text is understood to do.

His examples, cleverly, also involve the humble vending machine. He starts with a “standard,” “black-box” vending machine: Charles Kingsfield, Jr. inserts two quarters into an Acme Vending Company machine, and a hidden mechanism dispenses a sugary snack. If the machine jams and the snack fails to fall, this is a breach of a contract of sale and Kingsfield is entitled to a refund. How do we know it’s a contract of sale governed by the UCC? From the “shared cultural understanding of what vending machines do.” That shared cultural understanding doesn’t depend on the specifics of the gears and cams in the guts of Acme’s machine; instead, it has to do with how the form of the vending machine itself communicates an offer to engage in cash transactions for the sale of snacks.

Next, Klass invites the reader to consider a “glass-box” vending machine: mutually designed and constructed by two contracting parties to implement their exchange. Orville inserts chocolate truffles into the machine, and Wilbur inserts cash, and the machine duly delivers truffles to Wilbur and cash to Orville in corresponding quantities. Klass persuasively argues that now, the internal workings of the vending machine (and not just its appearance as a vending machine) are relevant. As he puts it, “the design of Orville and Wilbur’s mutually constructed vending machine belongs to the interpretive evidence of their agreement.” If the workings of the machine reveal that it was constructed to dispense thirteen truffles every time Wilbur inserts enough money for twelve, a court could reasonably conclude that Orville and Wilbur’s contract was for baker’s dozens.

This point leads Klass to a well-taken distinction between the design and the operation of the machine. If the bill scanner occasionally reads $20 bills as $10 bills and dispenses only half as many truffles as a result, Orville must deliver the balance of truffles or give Wilbur a refund for the extra $10. But if the machine itself is deliberately constructed to occasionally deliver only half as many truffles as paid for, then this behavior was contemplated by the parties and forms part of their agreement. As a programmer would say, the contractual meaning of a glass-box mutually constructed mechanism is determined by its features, not by its bugs.

Klass’s third example, and the most vexed, involves glass-box vending machines that are unilaterally constructed. We are back to Acme again, except that now there is a large glass panel on the side of the machine that allows users to inspect the details before they insert their coins. Most of the time, this makes no difference. Professor Kingsfield can’t even remember the names of his students; he can hardly be expected to inspect the inner workings of every glass-sided vending machine he encounters. If the machine eats his quarters, Acme owes him a refund regardless of whether the quarter-eating is a deliberate feature or an unintentional bug.

This said, Klass argues that there might be a few circumstances under which a purchaser should be held to have agreed to non-standard vending-machine behavior. Perhaps, for example, the machine is installed in the lounge of the mechanical engineering department and comes with a prominent disclaimer warning users to inspect the mechanism closely to understand what it does. But these cases will be rare. Under most circumstances, the mechanism is not relevant evidence as to the understanding of parties who have not participated in its design.

The genius of the article is that the argument goes through almost perfectly unchanged when the implementation moves from vending machines to blockchains. Interwoven with its discussion of hardware-based vending machines is an equally sophisticated analysis of software-based smart contracts. There are circumstances under which a smart contract’s code —its text and not just its effects — is necessary to understand the terms of a contract involving it. But these circumstances are neither “never” nor “always,” so even the question of whether to interpret the code is context-dependent.

Klass’s thought experiments show that what matters is the relationship a mechanism and its users: not the technical details themselves but how users understand or should be expected to understand them. This viewpoint, which is characteristic of legal institutions in general and of contract law in particular, connects to Karen Levy’s important work on “book-smart” contracts, in which she shows that smart contracts fail to capture the ways in which “people use contracts as social resources to manage their relations.” Klass’s reflections about “what legal contracts do” built on Levy’s insights to argue that the “techno-utopian dream of governance by code rests on an anemic view of human sociability.”

This perceptive article is of obvious interest to scholars working on blockchain- and Internet-related issues. But its creative application of contract doctrine should also be of interest to contract theorists and legal philosophers. Klass offers important insights about the nature of bargained-for exchange in a world of mechanisms, and about the nature of legal interpretation when the texts to be interpreted are written in a programming language rather than in a natural language. This is the smartest analysis of smart contracts I have read.

Download PDF
Cite as: James Grimmelmann, The Humble Vending Machine, JOTWELL (July 13, 2022) (reviewing Gregory Klass, How to Interpret a Vending Machine: Smart Contracts and Contract Law, 7 Geo. L. Tech. Rev. __ (forthcoming, 2022), available at SSRN),