Author: Wang Chao, founding member of Metropolis DAO Source: X, @cwweb3
In the early morning, in the foggy San Francisco Bay Area, in the office, the blue light of the screen reflected the tired face of the developer. His eyes were bloodshot, and his fingers slid quickly on the keyboard. This is the last check before the contract is deployed. Every semicolon and every boundary condition may be a life-or-death detail.
The Telegram channel suddenly boiled. Someone found that the project party violated the token unlocking promise in the white paper.
On the other side of the ocean, on the monitor of a meme player, countless transaction data weaved into a web, outlining the whereabouts of the giant whales. DeFi miners were checking the time lock of the new mine: "72 hours," they nodded, "safe."
In Discord, a registration debate for a DAO was in full swing. Outside of this dispute, an AI Agent is silently writing every step of its reasoning process into the blockchain.
This is an ordinary morning in the crypto world in 2024. On the surface, these scenes are unrelated, but beneath the complex appearance, there is an invisible bond that connects them tightly. That is the belief in "Code is Law".
In this world built by code, code is law, faith, and the final arbitrator. This rule, like an invisible chain, tightly connects this circle full of speculation, ideals, innovation and chaos. It is the cornerstone of the crypto world and the soil that breeds countless stories.
But what does 'Code is Law' mean? How did this sentence evolve from a warning to a belief? To answer this question, we have to go back to the autumn 25 years ago, back to an office at Harvard Law School...
Code is law
In November 1999, the Harvard campus was in the thick of autumn. Professor Lawrence Lessig sat in his office. He became famous for serving as a neutral legal expert in the Microsoft antitrust case. In a dozen days, his new book "Code: and Other Laws of Cyberspace" will be published.
The Internet boom swept across the United States in the 1990s. As early as a few years ago, Lessig was thinking about a seemingly simple question: In traditional society, behavior is constrained by laws, morals, markets, and physical laws. But in cyberspace, these constraints seem to have become blurred, but there is another constraint that seems to be more direct. System administrators control user behavior by setting permissions. This control is not achieved through threats of punishment, but directly determines what is possible and what is impossible. "In a Unix system, if you don't have permission, you just can't open the file," he wrote in his notebook. "This is not a legal constraint, but something more fundamental."
On the notebook in front of him, there is a simple diagram: the layered structure of the TCP/IP protocol. The manuscript says that this is a revolutionary design. The protocol does not care about the content of the data packet, nor does it ask who you are. It only cares about one thing: transmitting data according to the protocol rules. This "no permission" feature makes the Internet a free land. "
But Lessig also keenly noticed that new walls are growing on the free land of TCP/IP. Amazon can close your account, AOL can block your login, and Google can decide what content should be seen. Commercial platforms built on open protocols are creating new ways of control.
The first chapter of the new book is named Code is Law, but this sentence is not a praise, but a warning. Lessig is worried that if business giants and governments control the right to write code, they can control the entire cyberspace.
"Every era has its potential regulators that threaten freedom. We are living in the era of cyberspace, which also has a regulator, and this regulator also threatens our freedom. This regulator is code. It determines the difficulty of protecting privacy and the difficulty of censoring speech. It affects whether access to information is universal or hierarchical, and determines who can see what, or what content will be monitored. In many ways, the regulation of cyberspace is only becoming more apparent as we begin to understand the nature of code.”
Two months later, the New York Times published a review of the book, which wrote:
“These discussions are thoughtful, but the premises that underlie them are shaky; Lessig does not provide much evidence that a loss of privacy and freedom is occurring on the internet.” "
Haha.
In a sense, Lessig foresaw the future. But he did not foresee that his warning would soon be transformed into a flag. In the garages of Silicon Valley, in the study of cryptographers, and in front of computers all over the world, a group of people are brewing a revolution. They will not be enslaved by code, but will use code to rebuild freedom.
Smart Contract
Washington, 1994. Nick Szabo, a member of the cypherpunk, is writing in his simple apartment. On the screen is a paper on "smart contracts." Szabo's apartment is full of books on law and computer science. As a researcher who is fond of both fields, he has been thinking about how to combine the certainty of law with the precision of computer programs. "Imagine a vending machine," Szabo wrote, "that's the simplest smart contract. It does not need judges to enforce contracts, nor does it need police to maintain order, because the rules are written in the machine's program. ""There are too many problems with traditional contracts," he told reporters who came to interview him, "Contract performance depends on human will, and dispute resolution requires lengthy litigation. But if we can encode the contract into a program, it will run strictly according to the preset rules. No judges or lawyers are needed, only code is needed. ""The reporter questioned, why do people believe in the code? Szabo smiled mysteriously: "Because the code doesn't lie. It can't be bribed, threatened, or change its mind at will. It just faithfully executes the established rules. "
In a subsequent paper, Szabo elaborated on the idea 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 satisfy common contract conditions, minimize malicious and accidental exceptions, and minimize the need for trusted intermediaries. I believe that the potential for greatly reducing the transaction costs of executing certain contracts and creating new types of businesses and social institutions based on smart contracts is enormous but has not been thoroughly studied.
However, the technological foundation for realizing this vision has not yet appeared. Szabo and other cypherpunks will have to wait for many years.
Bitcoin
October 31, 2008, a quiet Halloween evening.
On January 3, 2009, the Bitcoin Genesis block was mined. In this system, no one can violate the rules of the code. "Code is Law" has transformed from Professor Lessig's warning to the ideal of the cryptographic community, and finally found its first complete practice in Bitcoin.
Ethereum
In the fall of 2013, in a cafe at the University of Toronto. Vitalik Buterin was drawing schematics in his notebook. As the editor of Bitcoin Magazine, he has studied every line of Bitcoin code in depth. But he believes that Bitcoin's design is too conservative. "Bitcoin proves that code-based governance is possible," he said to his companions, "but why limit it to the scenario of currency transfer? If we can create a Turing-complete system..." This idea quickly developed into the white paper of Ethereum. Vitalik envisioned a "world computer": anyone can deploy smart contracts on it and create various applications.
"At the time, many people thought it was crazy," recalled an early contributor, "We want to build a platform that is completely governed by code, so that anyone can run programs on it. The risk is too great. " But this is exactly the upgrade of the "Code is Law" concept: not only is the platform itself governed by code, but every application running on the platform also follows the same principles.
The smart contract envisioned by Nick Szabo more than ten years ago has finally found the soil for realization. A decentralized application ecosystem has begun to take shape. From simple token issuance, to complex financial agreements, to decentralized autonomous organizations (DAOs), unchangeable code has begun to take over more and more scenarios in this world.
The DAO
In April 2016, in Switzerland,
the Slock.it
team is introducing their ambitious plan to everyone: The DAO, a decentralized investment fund governed entirely by code.
"Imagine a fund without a board of directors and without a CEO," said founder Christoph Jentzsch explained, "All decisions are made by token holders voting through smart contracts. This is the ultimate practice of 'Code is Law'."
The DAO's crowdfunding opened. In just 28 days, it raised $150 million in ETH, setting the largest crowdfunding record at the time. "People believe in the code," said an early participant, "smart contracts are public and everyone can check. This does not rely on people's promises, but on unchangeable code."
However, this seemingly perfect code hides a fatal vulnerability. In the early morning of June 17, 2016. An anonymous hacker discovered a recursive call vulnerability in The DAO contract. Through carefully designed transactions, he began to transfer ETH from The DAO to a child DAO. "In theory, this is completely in line with the rules of the contract," explained a security researcher, "the hacker did not 'break' the code, he just took advantage of the operations allowed by the code. From the perspective of 'Code is Law', this is completely 'legal'. " However, when more than 3.64 million ETH were transferred, the entire Ethereum community fell into an unprecedented crisis.
"If 'Code is Law', then this attack is legal," one faction insisted, "We can't change the rules just because we don't like the result. This goes against the fundamental principle of decentralization. " "But code is for people," another faction retorted, "If the code leads to an obviously unfair result, we have the responsibility to correct it. " The fierce debate lasted for weeks. In the end, Vitalik and the Ethereum core team proposed a hard fork plan: roll back the blockchain and return the funds transferred by the hacker to a new contract.
This decision caused even greater controversy. Some community members insisted on the original chain and formed Ethereum Classic (ETC). This is not only a fork of the chain, but also a split in concept. "For many people, the pure ideal of 'Code is Law' is shattered," lamented an early Ethereum developer, "We realize that the code can never be perfect. "
Is Code Law?
In the summer of 2020, the crypto world ushered in a new craze: DeFi Summer. Various innovative projects have sprung up like mushrooms after rain: Aave's flash loan, Curve's stablecoin trading, Yearn's income aggregation... Each project is redefining the possibilities of finance with code.
But in the frenzy, risks are also accumulating. "Remember that YAM?" A DeFi miner recalled, "A small error in the code caused the governance mechanism to completely get out of control. This reminds us that 'Code is Law' is a double-edged sword. The consequences of code errors may be more serious than human errors. "
In early 2022, with the popularization of Web3 concepts, DAOs have experienced explosive growth, each of which is exploring new possibilities for decentralized collaboration and governance.
"At first we thought that DAO was to govern the organization with code through Token voting," a member of a DAO recalled, "but we soon discovered that reality is much more complicated than code. Looking at the governance process of each major DAO, on the surface it is executed through smart contracts, but the real decision-making often occurs in discussions on Discord or forums. These political coordinations that do not rely on code are actually the core of DAO operations. "
"Code is indeed the law, but it is not the only law," said a core member of a DAO, "it is more like a component of the legal system that needs to work with other parts - community discussions, expert opinions, real constraints, etc. "
Just one month ago, NounsDAO's Proposal No. 662 triggered deeper thinking. While most DAOs rely mainly on human coordination rather than code to operate, NounsDAO has achieved almost exclusive operation based on smart contract code. However, Proposal No. 662 proposed to register the DUNA entity in Wyoming and embrace the off-chain legal system.
This sparked heated debate in the community. "We originally participated in NounsDAO because it proved that an organization governed entirely by code is feasible!" a member said angrily, "Now you are going to replace code with a legal system. Isn't this surrendering to the traditional system?"
"We can't pretend that the real world doesn't exist," said a proposal supporter. "DAO must operate in the real world after all. Appropriate compromise is not a betrayal of ideals, but to make ideals sustainable. "
The votes of support increased slowly but firmly, and the proposal was passed.
Almost at the same time, a new participant joined the crypto world: AI Agent.
In the world of 'Code is Law', AI has found the most ideal habitat. The rules here are certain, verifiable, not subject to human interference, and most importantly, do not distinguish between humans and AI. The protocols only care about whether they comply with the preset rules. AI can trade, provide services, and participate in governance independently, and all decisions and actions can be completed with code.
In the crypto world where code is law and algorithms dominate value, AI Agent has for the first time changed from a piece of code to an existence. As more and more AI Agents join, the crypto world will present a new ecology: humans and AI interact under the same set of code rules, creating an unprecedented collaboration model.
Twenty-five years
In another 12 days, the Code and Other Laws of Cyberspace" is published for the 25th anniversary.
In the span of 25 years, "Code is Law" has gone through an unexpected path. It has changed from a warning against digital centralization to the banner of cypherpunk resistance, and has been constantly tested, adjusted and evolved in practice. The evolution of this concept reflects our deepening understanding of the digital world:
Initially, Lessig warned us that code could become a tool to control cyberspace. This concern still seems profound today - technology companies influence users through algorithms, and in the era of AI, an insecure model may bring devastating results.
Then, the cypherpunks turned this warning into action. Bitcoin proves another possibility: code can not only limit freedom, but also protect freedom.
The DAO incident is like a mirror, reflecting the limitations of pure code governance. But this failure is not the end, but a new starting point. It makes us start to think: How should code and human society interact?
The rise of DeFi has brought surprises: in certain scenarios, code can indeed be more effective than traditional rules. Automated market makers, flash loans, and permissionless lending, these innovations show the unique advantages of code governance.
The evolution of DAO is the most inspiring. From the dogmatic "code-only theory" 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 must coexist and complement them.
The addition of AI has opened up new imagination space. When artificial intelligence begins to act autonomously on the chain, "Code is Law" may gain a new dimension.
Outside the window, the morning fog in San Francisco gradually dissipated. A new day has begun. In every corner of the world, a blockchain network composed of countless nodes is running. Smart contracts are like tireless guardians, faithfully carrying out their missions; DAOs are conducting the largest governance experiment in human history; AI Agents are evolving at a speed unimaginable to humans, opening up new forms of existence in the world built by code.
This is a new world created by code. It is imperfect, but full of vitality; it has flaws, but it is constantly evolving; it is still young, but it has shown the potential to change the world. It carries the promise of making the world more open, transparent and fair. Even if this promise has not been fully realized, every participant is using his own way to push this promise step by step into reality.
This may be the most profound revelation of "Code is Law" in the past 25 years: it is not a perfect dogma, but an experiment that continues to evolve and a process of continuous exploration. In this world built by code, people are not only rule followers, but also rule creators. Every line of code written by people is shaping the future world.