Original author: Wang Chao, co-founder of Metropolis DAO
In the early morning, in the foggy San Francisco Bay Area, the blue light of the screen in the office illuminates the tired face of the developer. His eyes are bloodshot, and his fingers slide quickly on the keyboard. This is the final check before the contract is deployed. Every semicolon and every boundary condition may be a life-or-death detail.
The Telegram channel suddenly became abuzz. Someone discovered that the project had violated the token unlocking promise in the white paper.
Across the ocean, on the monitor of a meme player, countless transaction data weaves into a web, outlining the whereabouts of the whales. DeFi miners are checking the time lock of the new mine: 72 hours, they nod, safe.
In Discord, a DAO registration debate is going on. Outside of this dispute, an AI Agent is silently writing every step of its reasoning process into the blockchain.
It 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 the law, the belief, and the final arbitrator. This rule, like an invisible chain, tightly links 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 really mean? How did this phrase evolve from a warning to a belief? To answer this question, we have to go back to that autumn 25 years ago, 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 being a neutral legal expert in the Microsoft antitrust case, and in a dozen days, his new book Code: and Other Laws of Cyberspace would be published.
The Internet boom swept across the United States in the 1990s. 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 by threatening punishment, but directly determines what is possible and what is impossible. In a Unix system, if you dont have permission, you cant 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 were 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 titled Code is Law, but this sentence is not a compliment, 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 an era of cyberspace that also has a regulator, and this regulator also threatens our freedom. This regulator is the code. It determines how easy it is to protect privacy and how easy it is to censor speech. It affects whether access to information is universal or hierarchical, and determines who can see what, or what content is monitored. In many ways, we can only gradually realize the regulation of cyberspace when we begin to understand the nature of code.”
Two months later, the New York Times published a review of the book, which read:
“These discussions are thoughtful, but the premises that underlie them are shaky; Lessig offers little evidence that a loss of privacy and freedom is occurring on the internet.”
hehe.
In a sense, Lessig foresaw the future. But he did not foresee that his warning would soon be transformed into a banner. In the garages of Silicon Valley, in the study of cryptographers, and in front of computers around the world, a group of people were brewing a revolution. They would not be enslaved by code, but would use code to rebuild freedom.
Smart Contract
In 1994, in Washington, D.C., Nick Szabo, a member of the Cypherpunk movement, was writing in his humble apartment. On the screen was a paper on smart contracts. Szabos apartment was filled with books on law and computer science. As a researcher who was interested in both fields, he had been thinking about how to combine the certainty of law with the precision of computer programs. Imagine a vending machine, Szabo wrote, thats the simplest smart contract. It doesnt need a judge to enforce the contract, it doesnt need a policeman to maintain order, the rules are written in the machines program.
There are too many problems with traditional contracts, he told reporters who came to interview him. Contract performance relies 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 people should trust the code. Szabo smiled mysteriously: Because the code doesnt lie. It cant be bribed, threatened, or change its mind at will. 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 satisfy common contract conditions, minimize malicious and accidental exceptions, and minimize the need for trusted intermediaries. I believe the potential to significantly reduce the transaction costs of enforcing certain contracts and to create new types of businesses and social institutions based on smart contracts is enormous but has not been well explored.”
However, the technological basis for realizing this vision has not yet emerged. Szabo and other cypherpunks will have to wait for many years.
Bitcoin
On October 31, 2008, a quiet Halloween evening, Satoshi@gmx.com sent an email that changed history. The subject line was simple: Bitcoin P2P e-cash paper.
I have been working on a new electronic cash system that is completely peer-to-peer and does not require a trusted third party, the email, sent to the cryptography mailing list, said.
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 evolved from Professor Lessigs 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 diagrams in his notebook. As the editor of Bitcoin Magazine, he had studied every line of Bitcoin code in depth. But he believed that Bitcoins design was 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 soon developed into the white paper of Ethereum. Vitalik envisioned a world computer: anyone can deploy smart contracts on it and create various applications.
A lot of people thought it was crazy at the time, recalled an early contributor. We were going to build a platform governed entirely by code, and anyone could run programs on it. The risk was too great. But this is exactly where the Code is Law concept comes in: not only is the platform itself governed by code, but every application running on the platform also follows the same principles.
The smart contracts that Nick Szabo envisioned more than a decade ago have finally found a way to be realized. A decentralized application ecosystem has begun to take shape. From simple token issuance to complex financial protocols to decentralized autonomous organizations (DAOs), unchangeable codes are beginning to take over more and more 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 without a board of directors and without a CEO,” explains founder Christoph Jentzsch. “All decisions are made by token holders through smart contract voting. This is the ultimate practice of ‘Code is Law’.”
The DAO crowdfunding opened. In just 28 days, it raised $150 million in ETH, setting a record for the largest crowdfunding at the time. People believe in the code, said an early participant. Smart contracts are public and can be checked by everyone. It does not rely on peoples 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 sub-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 group insisted, We cant change the rules just because we dont like the result. This goes against the fundamental principle of decentralization. But code is for people, another group countered, If the code leads to an obviously unfair result, we have a responsibility to correct it. The heated 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, forming Ethereum Classic (ETC). This is not only a fork of the chain, but also a split in ideas. For many people, the pure ideal of Code is Law has been shattered, lamented an early Ethereum developer, We realize that 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: Aaves flash loans, Curves stablecoin trading, Yearns 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, as the concept of Web3 became popular, DAOs experienced explosive growth, each exploring new possibilities for decentralized collaboration and governance.
Initially we thought that DAO was to use code to govern the organization 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 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 in conjunction with other parts - community discussion, expert opinions, real-world constraints, etc.
Just one month ago, NounsDAOs Proposal 662 triggered deeper thinking. While most DAOs rely mainly on human coordination rather than code to operate, NounsDAO has achieved almost only operating by smart contract code. However, Proposal 662 proposed to register the DUNA entity in Wyoming and embrace the off-chain legal system.
This sparked a heated debate in the community. We participated in NounsDAO because it proved that an organization governed entirely by code is feasible! said one member angrily. Now you want to replace the code with the legal system. Isnt this surrendering to the traditional system?
We cant pretend that the real world doesnt exist, said one proposal supporter. DAOs will eventually operate in the real world. The appropriate compromise is not to betray the ideal, but to make the ideal sustainable.
The votes of support slowly but surely grew, and the proposal passed.
Almost at the same time, a new player joined the crypto world: AI Agent.
In the world of Code is Law, AI has found its 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 autonomously, provide services, and participate in governance. All decisions and actions can be completed in code.
In the crypto world where code is law and algorithms dominate value, AI Agent has for the first time transformed from a piece of code into a being. 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 12 days, it will be the 25th anniversary of the publication of Code and Other Laws of Cyberspace.
In the span of 25 years, Code is Law has gone through an unexpected path. It has transformed from a warning against digital centralization to a 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 for controlling cyberspace. This concern still seems profound today - technology companies influence users through algorithms, and in the era of AI, an unsafe model can bring devastating results.
Then, the cypherpunks turned this warning into action. Bitcoin demonstrated another possibility: that code can not only restrict freedom, but also protect it.
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 the pursuit of 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 opens up new possibilities. When AI begins to operate autonomously on the chain, Code is Law may acquire new dimensions.
Outside the window, the morning fog in San Francisco gradually dissipates. A new day begins. In every corner of the world, blockchain networks composed of countless nodes are 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 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 or her own way to push this promise into reality step by step.
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.