Grimmelmann-Illustration.jpg

Elizabeth Nelson
Elizabeth Nelson

Coding Justice—Law in the Digital Age

by J. Edward Anthony

Legal writing has a reputation, and not for easy reading. A century ago, writer Franz Kafka imagined “the Law” as part nightmare, part cultural unconscious: irrational, enigmatic, and stubbornly invulnerable to critique. Anyone who watches the Sunday news shows or listens to AM talk radio knows that something has changed. Constitutional law in the United States today is hotly debated—a juridical wrestling match complete with opposing, media-branded schools of interpretation. Meanwhile, the budget of the United States Supreme Court alone exceeds $84 million annually. As a nation, we invest a lot of money and expertise to clear up legal ambiguities and to decide how laws—written months, decades, or centuries ago—should be applied to present-day situations.

Can we avoid all that? According to James Grimmelmann, Law, computer programmers and legal thinkers have occasionally shared a common dream: What if laws employed the hard-and-fast logic of C++? Imagine courts that run with the accuracy and efficiency of a supercomputer. One circuit court judge, commenting on the Supreme Court’s 2020 Bostock decision, voiced his ideal of jurisprudence like this: “A computer programmer may write faulty code, but the code will perform precisely as written regardless of what the programmer anticipated. Courts, no less than computers, are bound by what was typed, and also what was mistyped.”

“That’s a reasonably common view about legal language and programming that you find among some people in law,” Grimmelmann says. “There’s this idea of a computer that is rigid and literal—and perhaps the law could be more like that.”

Code Fix

Grimmelmann, working in collaboration with John Nathan Foster, Computer Science, and Shrutarshi Basu PhD ’19 (now a postdoctoral fellow at Harvard University), developed a model language to impart something of a computer’s clean, mechanical rigidity to a particularly knotty area of real estate law—property conveyances. Leases and deed transfers are simple, street-level conveyances. More complex conveyances divide various aspects of a single property among multiple parties according to a web of contingencies.

“We took a fragment of law and formalized it the way that computer scientists would formalize a programming language,” Grimmelmann says. “The project uses tools from a technical discipline and applies them to a legal problem. It’s the kind of collaboration where you have to have colleagues who are really deep on the tech side, but also broad-minded about applications that are outside of the traditional ones that people would work on just inside a computer.”

Property conveyances are complex but formulaic. They lend themselves to the formal logic that governs computer programming. Tax code does too. But formal syntax can never eliminate the need for legal interpretation according to Grimmelmann. Of the collaboration with Foster and Basu, he says, “We are providing a grammar that can help people to reduce the ambiguity and vagueness that we see in legal documents. But the last five percent of that ambiguity—it’s never going away.”

“There’s this idea of a computer that is rigid and literal—and perhaps the law could be more like that.”

Bridging Two Worlds

Grimmelmann began his career at Microsoft as a programmer, and he brings to his legal scholarship an insider’s knowledge of what computers can and cannot do. He has written extensively on search neutrality, privacy and social networks, platform moderation, digital copyright, and smart contracts. “I try to help people in the legal world and in the technical world understand each other and collaborate,” he says.

As a member of the Cornell Law faculty based at the Cornell Tech campus in New York City, Grimmelmann is in a unique position. “I'm surrounded by people who are not legally trained. My colleagues at Cornell Tech are people primarily from technical disciplines who have chosen to be at a place that’s all about application,” he says. “They have an interest in the legal issues that their work raises. They want to have impact, and some are doing work that has serious legal implications. It’s exactly the kind of audience that I can learn from and who I want to speak to.”

Law and Software—More Alike Than They Seem

Grimmelmann’s current book project, CPU, Esq.: How Lawyers and Coders Do Things with Words, explores questions of when and how the law might operate more like software. “It’s a fair set of arguments to be having,” Grimmelmann says, “but we should take off the table the idea that laws ever could be completely mechanized in this particular way. You can’t mechanize laws in that way because not even computers are mechanized in that way.”

The DAO is a case in point. In 2016, programmers built an investment platform on the Ethereum blockchain. They called their venture capital fund The DAO, an acronym for decentralized autonomous organization. The goal was to operate without a board of directors and outside standard bureaucratic and regulatory apparatuses. Investors would vote on proposed investments, and the smart contract encoded on the blockchain would regulate all transactions. In order to isolate the project even further from the legal system, The DAO’s creators provided off-chain documentation that explicitly stated that the only terms governing The DAO were the terms of the smart contract as encoded on the blockchain. Nothing more, nothing less. Investors were enthusiastic. Weeks into a crowdfunding campaign, The DAO was valued at more than $150 million. Before The DAO decided upon its first investment, however, a hacker exploited a vulnerability in the code and instructed the smart contract to dump one-third of the fund’s value into the hacker’s own bank account.

“A lot of disputes turn on whether software can effectively create the rules of the game,” says Grimmelmann. “Where's the boundary around what you are and aren't allowed to do?”

A portion of The DAO’s investors held tight to the notion that code is law and would have allowed the hacker to keep the spoils of the hack. But a majority of the Ethereum community, which controlled the blockchain on which The DOA’s smart contract was built, voted to intervene. They reversed the hack, returned all the funds to investors, and dissolved The DAO. In an article on the incident, Grimmelmann writes, “We could call this justice: giving defrauded investors back what they invested. Or we could call this theft: Someone who followed the rules and used the software as written had $50 million worth of assets taken away in an instant.”

“The argument of CPU, Esq. is in essence that software isn’t as mechanical as you think it is,” Grimmelmann says. “Blockchains don't give you something perfect and untouchable. Software involves conflicts and social processes that will lead us to converge on how programs and computers work. And those aren’t so different from the processes and debates we are having in law.”

Rendering justice may never be so easy as running code. But Grimmelmann is committed to evaluating, on a case-by-case basis, how and when computer technology can serve ideals of democracy and justice. “Laws exist because societies have a need for well-understood standards that help people get along together,” Grimmelmann says. “The same is true of computer science. It’s not as if God created the integers and everything unfolds automatically from there. We create programs, we create abstractions in order to accomplish things. And those things have to reflect the structure of how people think and relate to each other. On both sides, law and technology, there are communities that are making things happen through words, and the things that they are making have to answer to human values and human goals.”