Code is Law: A Brief History In the world of blockchain and smart contracts, the phrase "Code is Law" represents the idea that the rules and outcome
This is the new world created by code: it is not perfect, but full of vitality; it is flawed, but constantly evolving; it is still very young, but has already shown the potential to change the world.
Original Article Title: "Code Realm - A Brief History of 'Code is Law'"
Original Article Author: Wang Chao, Metropolis DAO Co-Founder
In the early morning, fog enveloped the San Francisco Bay Area, inside an office, the blue light from the screen reflected the tired faces of developers. His eyes were bloodshot, fingers swiftly gliding across the keyboard. This was the final check before contract deployment, where every semicolon, every boundary condition, could be a matter of life and death.
A sudden uproar in the Telegram channel. Someone discovered that the project team had violated the token unlock commitment in the whitepaper.
Across the ocean, on a meme player's monitor, numerous transaction data intertwined to map out the movements of whales. DeFi miners were checking the new mine's timelock: "72 hours," they nodded, "safe."
In Discord, a heated debate was ongoing within a DAO registration. Beyond this turmoil, an AI Agent silently recorded every step of its reasoning process on the blockchain.
This was just an ordinary morning in the 2024 crypto world. Surface-level, these scenes seemed unrelated, but beneath the intricate facade, an invisible thread tightly connected them. That was the unwavering belief in "Code is Law."
In this world constructed by code, code is law, faith, and the ultimate arbiter. This rule, like an invisible chain, tightly links this circle full of speculation, ideals, innovation, and chaos together. It is the cornerstone of the crypto world and the soil that nurtures countless stories.
But what does 'Code is Law' truly mean? How did this phrase evolve from a warning to a belief? To answer this question, we must go back to that autumn day 25 years ago, back to an office at Harvard Law School...
Code is Law
In November 1999, on the Harvard campus, with autumn in full swing, Professor Lawrence Lessig sat in his office. He had gained fame for his role as a neutral legal expert in the Microsoft antitrust case, and in a few weeks, his new book "Code: and Other Laws of Cyberspace" was set to be published.
The internet wave swept across the United States in the 90s. Several years ago, Lessig had been pondering what seemed like a simple question: in traditional society, behavior is constrained by laws, ethics, the market, and physical laws. But in cyberspace, these constraints seemed to blur. There was, however, another form of constraint that appeared more direct — system administrators controlled user behavior by setting permissions. This control wasn't achieved through threat of punishment but directly determined what was possible and what was not. "In a Unix system, if you don't have permission, you simply cannot open that file," he wrote in his notebook, "This is not a legal constraint but something more fundamental."
On the notebook in front of him was a simple diagram: the layered structure of the TCP/IP protocol. The manuscript stated that this was a revolutionary design, where the protocol didn't care about the contents of the data packets or who you were. It only cared about one thing: transmitting data according to the protocol rules. This 'permissionless' nature made the internet a free land."
However, Lessig also keenly observed that on this free land of TCP/IP, new walls were being erected. Amazon could close your account, AOL could block your login, Google could decide what content should be seen. These commercial platforms built on open protocols were creating new forms of control.
The first chapter of the new book was named Code is Law, but this phrase was not a praise, but a warning. Lessig was worried that if corporate giants and governments controlled the writing of code, they could control the entire cyberspace.
"Every age has its potential regulators that threaten freedom, and we are living in the era of cyberspace, which also has a regulator that threatens our freedom. This regulator is code. It determines the ease of protecting privacy and the ease of censoring speech. It influences whether information access is universal or tiered, decides who can see what, or which content will be monitored. In many ways, only when we begin to understand the nature of code can we gradually realize the regulation of cyberspace."
Two months later, The New York Times published a review of this book, stating:
"These discussions are thoughtful, but the premises underlying them are not solid; Lessig did not provide much evidence to prove that the loss of privacy and freedom is happening on the internet."
Heh.
In a sense, Lessig foresaw the future. But he did not anticipate that his warning would soon turn into a rallying cry. In a garage in Silicon Valley, in the study of a cryptographer, in front of computers around the world, a group of people is brewing a revolution. They will not be enslaved by code but will use code to rebuild freedom.
Smart Contract
In 1994, Washington. A member of the cypherpunks, Nick Szabo, was writing in his humble apartment. On the screen was a paper about "smart contracts." Szabo's apartment was filled with books on law and computer science. As a researcher who was passionate about both fields, he had been thinking about how to combine the certainty of the law with the precision of computer programs. "Imagine a vending machine," Szabo wrote, "that is the simplest form of a smart contract. It doesn't need a judge to enforce the contract, it doesn't need police to maintain order, the rules are written in the machine's program."
"Traditional contracts have too many issues," he told the journalist who came to interview him, "Performance relies on human will, dispute resolution requires lengthy litigation. But if we can code the contract into a program, it will operate strictly according to predefined rules. No need for judges, no need for lawyers, just need code."
The journalist questioned, why should people trust the code? Szabo smiled mysteriously: "Because code doesn't lie. It can't be bribed, it can't be threatened, and it won't change its mind arbitrarily. It just faithfully executes the established rules."
In a subsequent paper, Szabo elaborated on the concept of smart contracts:
“A smart contract is a computerized transaction protocol that executes the terms of a contract. The overall goal of smart contract design is to fulfill common contractual conditions, minimize malicious and unexpected exceptions, and reduce the need for trustful intermediaries. I believe that dramatically reducing the transaction costs of executing certain contracts and the potential to create new types of enterprises and social institutions based on smart contracts is significant but largely unexplored.”
However, the technological foundation to achieve this vision has not yet emerged. Szabo and other cryptopunks will have to wait many more years.
Bitcoin
On October 31, 2008, a quiet Halloween evening. [email protected] sent an email that would change history. The subject was simple: "Bitcoin P2P e-cash paper."
The email sent to the cryptography mailing list stated, "I've been working on a new electronic cash system that's fully peer-to-peer, with no trusted third party."
On January 3, 2009, the Bitcoin genesis block was mined. In this system, no one can violate the code rules. "Code is Law" shifted from a warning by Professor Lessig to an ideal in the crypto community, ultimately finding its first complete implementation in Bitcoin.
Ethereum
Autumn 2013, a café at the University of Toronto. Vitalik Buterin was sketching diagrams on his notebook. As an editor of a Bitcoin magazine, he had delved into every line of Bitcoin's code. However, he felt that Bitcoin's design was too conservative. "Bitcoin has proven that code-based governance is possible," he told his peers, "but why limit it to just the money transfer scenario? If we could create a Turing-complete system..." This idea quickly evolved into the Ethereum whitepaper. Vitalik envisioned a "world computer": where anyone could deploy smart contracts and create various applications on top.
"At the time, many people thought it was crazy," recalled an early contributor, "we were building a platform entirely governed by code, allowing anyone to run programs on it. The risk was too high." But this was precisely an evolution of the "Code is Law" concept: not only was the platform itself governed by code, but every application running on the platform also followed the same principles.
Nick Szabo's vision of smart contracts from over a decade ago had finally found the soil for implementation. A decentralized application ecosystem began to take shape. From simple token issuance to complex financial protocols, and then to decentralized autonomous organizations (DAOs), immutable code began to take over an increasing number of scenarios in this world.
The DAO
In April 2016, in Switzerland, the Slock.it team was introducing their ambitious plan: The DAO, a decentralized investment fund governed entirely by code.
"Imagine a fund with no board, no CEO," founder Christoph Jentzsch explained, "all decisions are made by token holders through smart contract-based voting. This is the ultimate realization of 'Code is Law'."
The DAO's crowdfunding began. In just 28 days, it raised $150 million worth of ETH, setting a then-record for the largest crowdfunding. "People believed in the code," an early participant said, "smart contracts are public, open for everyone to inspect. It doesn't rely on human promises but on immutable code."
However, this seemingly perfect code concealed a fatal flaw. In the early hours of June 17, 2016, an anonymous hacker discovered a recursive call bug in The DAO's contract. Through carefully crafted transactions, they began moving ETH from The DAO to a child DAO. "Theoretically, this fully complied with the contract's rules," explained a security researcher, "the hacker didn't 'break' the code; they just exploited an operation allowed by the code. From the perspective of 'Code is Law,' this was entirely 'legal'." However, after over 3.64 million ETH were transferred, the entire Ethereum community faced an unprecedented crisis.
"If 'Code is Law,' then this attack is legal," one group insisted, "we can't change the rules just because we don't like the outcome. That would violate the fundamental principle of decentralization." "But the code is meant to serve people," another group countered, "if the code leads to a clearly unjust outcome, we have a responsibility to correct it." The intense debate raged on for weeks. Ultimately, Vitalik and the Ethereum core team proposed a hard fork solution: rolling back the blockchain to return the hacked funds to a new contract.
This decision sparked even greater controversy. Some community members insisted on the original chain, giving rise to Ethereum Classic (ETC). This was not just a fork of the chain but a split in ideology. "For many, the pure ideal of 'Code is Law' was shattered," lamented an early Ethereum developer. "We realized that code can never be perfect."
Is Code is Law?
In the summer of 2020, the crypto world witnessed a new wave: DeFi Summer. Various innovative projects emerged like mushrooms after the rain: Aave's flash loans, Curve's stablecoin trading, Yearn's yield farming... Each project was redefining the possibilities of finance through code.
But amidst the frenzy, risks were also accumulating. "Remember that YAM incident?" a DeFi miner recalled. "A small error in the code led to a complete governance breakdown. This reminds us that 'Code is Law' is a double-edged sword. The consequences of a code mistake can be more severe than human error."
At the beginning of 2022, with the popularization of the Web3 concept, DAOs experienced explosive growth, each exploring new possibilities of decentralized collaboration and governance.
"Initially, we thought DAOs were about governance through token voting, implementing organizational governance through code," a member of a DAO reminisced. "But soon we realized that reality is much more complex than code. Look at the governance processes of every major DAO; on the surface, it's executed through smart contracts, but the actual decision-making often happens in discussions on Discord or forums. These politically coordinated actions that don't rely on code are actually the heart of how DAOs operate."
"Code is indeed law, but not the only law," said a core member of a DAO. "It's more like a part of a legal system that needs to work in conjunction with other elements – community discussions, expert opinions, real-world constraints, and so on."
Just a month ago, Proposal 662 of NounsDAO sparked deeper reflection. While most DAOs primarily rely on human coordination rather than code to function, NounsDAO had achieved nearly full operation based on smart contract code alone. However, Proposal 662 suggested registering a legal entity in Wyoming, embracing off-chain legal systems.
This sparked intense community debate. "Our initial involvement in NounsDAO was because it proved that an organization governed solely by code is viable!" exclaimed a member in anger. "Now you want to replace code with a legal system; isn't this surrendering to the traditional system?"
"We cannot pretend the real world does not exist," a proposal supporter said, "DAOs ultimately have to operate in the real world. The right compromise is not a betrayal of ideals, but a way to make ideals sustainable."
Support votes slowly but steadily increased, and the proposal was approved.
Almost simultaneously, a new participant joined the crypto world: an AI Agent.
In a 'Code is Law' world, AI found the most ideal habitat. Here, the rules are set, verifiable, immune to human interference, and most importantly, agnostic to whether they are followed by humans or AI. Protocols only care if actions comply with predefined rules, and AI can autonomously transact, provide services, participate in governance, with all decisions and actions executable through code.
In the crypto world where code is law and algorithms drive value, the AI Agent transforms from a piece of code into a living entity for the first time. With an increasing number of AI Agents joining, the crypto world will evolve into a new ecosystem where humans and AI interact under the same set of code rules, creating unprecedented collaboration.
Twenty-Five Years
In 12 days, it will be the 25th anniversary of the publication of "Code and Other Laws of Cyberspace."
Over the span of 25 years, "Code is Law" has traversed an unexpected path. It has evolved from a warning against digital centralization to a banner of cypherpunk resistance, continually being tested, adjusted, and evolved in practice. The evolution of this concept mirrors our deepening understanding of the digital world:
Initially, Lessig warned us that code could become a tool to control cyberspace. This concern remains profound today - technology companies influence users through algorithms, and in the age of AI, an insecure model could lead to devastating outcomes.
Subsequently, cypherpunks turned this warning into action. Bitcoin proved another possibility: code can not only restrict freedom but also protect it.
The DAO incident acted as a mirror, reflecting the limitations of pure code governance. However, this failure was not the end but a new beginning. It prompted us to contemplate: How should code and human society interact?
The rise of DeFi brought surprises: in specific scenarios, code indeed can be more efficient than traditional rules. Innovations such as automated market makers, flash loans, and permissionless lending showcase the unique advantages of code governance.
The evolution of DAOs is highly inspiring. From the dogmatic "Code is Law" stance to seeking a balance with the real world, this process reflects an important reality: at least for now, code cannot replace all other rules but instead must coexist and complement them.
The inclusion of AI has opened up new realms of imagination. As artificial intelligence begins to autonomously operate on-chain, "Code is Law" may obtain a new dimension.
Outside the window, the morning fog of San Francisco gradually dissipates. A new day begins. In every corner of this world, a blockchain network composed of countless nodes is in operation. Smart contracts act as tireless guardians, faithfully executing their missions; DAOs are conducting the largest governance experiment in human history; AI agents are evolving at a pace unimaginable to humans, carving out new forms of existence in the code-built world.
This is the new world created by code. It is not perfect but full of vitality; it is flawed but continuously evolving; it is still young but has already demonstrated the potential to change the world. It carries the promise of making the world more open, transparent, and fair, and even though this promise has not been fully realized, every participant is pushing this promise closer to reality in their own way.
Perhaps this is the most profound revelation of "Code is Law" in the past twenty-five years: it is not a flawless dogma but a continuously evolving experiment, a process of constant exploration. In this world built by code, people are not only followers of rules but also creators of rules. Every line of code they write is shaping the future world.
Disclaimer: The content of this article solely reflects the author's opinion and does not represent the platform in any capacity. This article is not intended to serve as a reference for making investment decisions.
You may also like
From $15K to $94M: A Miami Truck Driver’s Journey with Solana, with Eyes Now on Altcoin
Cardano’s Hydra Launches Gamified Test Campaign as ADA Price Responds
Shiba Inu’s Potential for Growth: Kusama Highlights Market Position and Future Utility Strategies