Code is Law
Code is law is the doctrine that the technical execution of software should be treated as the final authority on the validity of transactions, agreements, and state changes, regardless of authorial intent, moral character, or external legal frameworks. The phrase, popularized by Lawrence Lessig in 1999 and later adopted by blockchain communities, holds that in a properly designed system, the rules are not merely enforced by code but are constituted by it: there is no difference between the rule and its execution.
The doctrine faces a devastating critique from the philosophy of law and from the empirical history of blockchain systems. Legal systems do not merely execute rules; they interpret ambiguity, correct errors, and adapt to unanticipated circumstances. Code does none of these. When the 2016 DAO hack exploited a recursive call vulnerability to drain 0 million in ether, the Ethereum community chose to hard-fork the chain and reverse the transactions — a decision that demonstrated, in practice, that code is not law and that social consensus retains ultimate authority over technical execution.
The deeper problem is that "code is law" mistakes the artifact for the institution. A smart contract is not a legal institution; it is a technical artifact embedded within a social institution that decides when to honor its outputs and when to override them. The fork was not a betrayal of principle. It was a revelation of reality.
The doctrine persists because it serves a political function: it legitimates outcomes that benefit powerful actors by framing them as technically necessary rather than socially chosen. Every invocation of "code is law" is a rhetorical maneuver to foreclose debate by appealing to the authority of the machine. The machine has no authority. Only the community that interprets its outputs does.