Code is Not Law
On this page
Code governs the possible; law governs the permissible.1
When Lawrence Lessig observed that “code is law,” he meant that software constrains what people can do, much as physical architecture does; he did not mean that code generates legally enforceable rights. His insight was descriptive.2 Following the rise of blockchain networks, cryptocurrencies, and smart contracts, however, many embraced the far stronger proposition that whatever code makes possible, the law must recognize as binding.3
That proposition is a category error. It has propagated far more widely than its fringe origins would suggest, reaching legislators, regulators, courts, and private parties alike.4 The corrective is straightforward, for code acquires legal force only to the extent that positive law confers it.5
What Lawrence Lessig Actually Meant
Lessig’s maxim was one strand of a larger argument. On that argument, behavior in cyberspace is constrained by four modalities, namely law, the market, social norms, and architecture. Code is the architecture of digital space.6 Code regulates by defining the realm of the possible, not by creating rights, so the maxim advances a claim about regulation rather than about legal validity.
Lessig’s catchy three-word pronouncement should not be read as “code is [positive] law,” but rather as “code is [soft] law.”7
Soft law shapes conduct, and it may do so with great force; yet of itself it generates none of the rights and duties that the legal system will recognize and enforce.
How the Insight Was Distorted
Two intellectual currents eroded the distinction between code and law. The cyber-separatists denied that the law of nation states had any purchase online, taking as their manifesto John Perry Barlow’s 1996 Declaration of the Independence of Cyberspace. The cypherpunks went further, treating cryptography and code as the instruments of a self-governing order beyond the reach of positive law.8 As these ideologies converged with blockchain technology, scholars began to argue that smart contracts create “de facto property rights” or operate “alegally,” beyond traditional legal frameworks.9 Even when carefully hedged, claims of this kind “risk fostering the misguided conviction that what code makes possible, law must accept as enforceable.”10 The conviction is a proposition about legal validity, and it must be assessed as one.
What Does It Mean to Call Something “Law”?
Asking whether code is law requires first answering what law is. On that central question, “[l]egal philosophy has offered competing accounts of law’s nature, including natural law theory, legal realism, and Dworkinian interpretivism, among others.”11 Each delivers a different test for what makes a rule binding, and therefore a different answer to whether code can ever count as law.
Natural law theory holds that legal validity depends on the conformity of a rule with moral principles, so that a deeply unjust rule forfeits its claim to legal validity on the strongest versions of the theory. Legal realism locates law in the observable behavior of officials, above all judges, treating a rule as law to the extent it predicts how courts will dispose of disputes. Dworkinian interpretivism understands law as the set of principles that best justifies a community’s settled legal practice in its most attractive moral light. By contrast, legal positivism treats law as a system of rules that exists because a society’s recognized institutions accept it as law, irrespective of moral content.
Why the Positivist Lens?
Of these competing accounts, legal positivism supplies the premises best fitted to the “code is law” question. Two propositions sit at its core. The social thesis holds that the existence of law depends on identifiable social facts such as legislative enactment, judicial decision, or customary acceptance, not on moral merit. The separability thesis holds that law and morality are not necessarily connected, so that a rule may be legally valid even when morally unattractive. Together the two theses define what a positivist means when calling something law.
Positivism serves here as a methodological lens, not as the one true theory of law; three converging reasons support it.12
First, positivism is the descriptive account of legal authority that lawmakers, regulators, courts, and practitioners employ in daily practice. Its descriptive reach is so wide that even the leading contemporary natural law theorist John Finnis concedes that positivist theories offer a completely adequate account of “what any competent lawyer . . . would say are (or are not) intrasystematically valid laws.”13 Whatever its limits as moral theory, positivism describes the legal system in which the “code is law” debate is actually being conducted.
Second, positivism is uniquely suited to the question the debate poses. At its core, the “code is law” thesis is a claim about legal validity, asserting that code alone can generate the kind of rule that courts will recognize and enforce. That is precisely the question positivism is built to address. Natural law theory asks whether a rule is just; legal realism asks what courts will do with it; Dworkinian interpretivism asks how it fits a community’s principled practice. None of these is purpose-built for the question of what counts as a valid source of legal rules; positivism is.
Third, and most decisively, the strongest version of the “code is law” thesis fails on its own terms. Its proponents contend that blockchain networks create “nascent legal orders” and ground that contention in social facts such as technical function and community acceptance rather than in moral principles, judicial behavior, or interpretive coherence with existing doctrine; the position is sometimes branded lex cryptographia. Grounding a claim to legal validity in social facts is the positivist move by definition, so the thesis must be tested on the criteria that positivism itself supplies, and if “code cannot qualify as law even under the jurisprudential theory that its own proponents implicitly adopt, then the ‘code is law’ thesis fails definitively.”14
Hart’s Framework of Primary and Secondary Rules
The decisive modern positivist account is H. L. A. Hart’s, a sophisticated evolution from the earlier conceptualizations of John Austin and Hans Kelsen. Austin had characterized law as orders backed by threats issued by a sovereign whom subjects habitually obeyed; Kelsen had grounded legal validity in a hierarchy of coercive norms deriving from a basic norm, the Grundnorm. Hart analyzed law instead as the union of two kinds of rules.15
Primary rules impose duties on people, from the prohibition of theft to the duty to pay taxes. A society could exist on primary rules alone, but it would suffer from three structural defects: uncertainty about which rules are in force, inability to make new rules or repeal old ones, and inefficiency in deciding when a rule has been broken.
Secondary rules solve those defects by operating at a higher level, and they are of three kinds. The rule of recognition supplies the master test for what counts as a valid rule of the system, the criterion to which officials and citizens implicitly defer when they identify the law. In the United States, that criterion points roughly to the Constitution, valid statutes, agency regulations within delegated authority, and judicial precedent. Rules of change empower designated actors to introduce, modify, or extinguish primary rules; publicly, they give legislatures the authority to legislate, and privately, they enable individuals to bind themselves through contracts, wills, trusts, and corporate charters. Rules of adjudication empower courts and other designated actors to determine authoritatively whether a primary rule has been broken and what should follow.
Within Hart’s framework, the “code is law” thesis fails at the most basic stage, because the fact that code regulates behavior effectively “does not make it law any more than the fact that gravity pulls objects downward toward the earth makes it a legal prohibition against flying.”16
There is “an ontological gap that separates architectural constraints from legal rules.”17 Architecture compels through possibility and impossibility, and code is architecture. Law, by contrast, obligates through normative prescription. In an account drawn from the jurisprudence of Joseph Raz, law “claims authority: it presents itself as creating reasons for action that preempt and exclude contrary considerations.”18 A complementary distinction drawn from the naturalized jurisprudence of Brian Leiter holds that “while law operates in the space of reasons and justifications, code operates in the causal realm of physical constraints.”19 A locked door announces no prohibition on entry; it simply prevents it.
On Hart’s account, legal validity “derives from ‘pedigree,’ not performance,”20 meaning a rule counts as law because it can be traced to a recognized source within the legal system, not because it is effective at making people behave.
Is Code Law?
Standing alone, code is not law. It is a uniquely powerful form of soft law that shapes conduct, often with remarkable finality, yet generates no rights and imposes no duties. The regulatory force of code is causal, not normative. Code governs what can happen rather than what ought to happen, and the difference is jurisprudential.
The legal system can nonetheless bridge the gap between architecture and law through the exercise of its own secondary rules, chiefly Hart’s rules of change. The bridging process is best described as investiture. The law selects a verifiable technical fact and clothes it with legal consequences, so that what was previously a mere architectural state becomes a state to which rights and duties attach. Investiture proceeds along two pathways, public empowerment through legislation and private empowerment through the recognized instruments of private ordering.
Outside these two pathways, code remains soft law, however effective, a constraint on conduct rather than a source of rights and duties. “[C]ode's road to legal status is narrow and precisely delimited”; neither its effectiveness nor the convictions of its users can supply what is missing, for “it is only an act of positive law that can give code legal force.”21 The governing proposition is that “code is not law, unless and until law makes it so.”22
Code Mistaken for a Source of Rights and Duties
The category error that code can itself generate rights and duties has migrated from theory to practice. Three recurring patterns illustrate what is at stake when participants, drafters, and even lawmakers treat technical capability as legal authority. The first is the assumption that ownership of a non-fungible token (NFT) carries property rights in what it represents; the second, that a smart contract is itself an enforceable contract; the third, that the architectural arrangement of a decentralized autonomous organization (DAO) supplies the legal shield of a limited liability entity. The NFT market illustrates the first pattern.
The first pattern is written into the licenses themselves. The Bored Ape Yacht Club license states that “[o]wnership of the NFT is mediated entirely by the Smart Contract and the Ethereum Network.”23 The license misstates the law, for ownership “is a legal concept determined by applicable property law. It is not ‘mediated,’ or otherwise structurally modified by blockchain technology, smart contracts or any technological system.”24 If the owner of an NFT dies, title passes to the heirs under the law of succession, whatever the ledger records. The 2022 theft of actor Seth Green’s Bored Ape sharpened the stakes. When the token left his control, the smart contract alone could answer neither who owned the underlying art, nor whether the associated license traveled, nor whether a good faith purchaser could take clean title.25 These are property questions with determinate legal answers, because digital-asset transactions ultimately “rest on an unresolved premise: that digital assets can be owned and are governed by established property rules.”26 Nor can private drafting fill the void, for the principle of numerus clausus confines the forms of property to those the law recognizes, so that “[a] person claiming that an NFT represents ownership of a painting has no more legal authority to do so than someone asserting that possession of a particular pebble confers title to the Brooklyn Bridge.”27 Under the 2022 amendments to the Uniform Commercial Code (UCC), the token itself may qualify as a controllable electronic record if it satisfies the statutory requirements for control. Article 12 provides, however, that rights in property merely evidenced by such a record are governed by law other than Article 12, so transferring the token does not by itself transfer the copyright or other rights in the artwork.28
The second pattern has reached the statute books, where some legislatures declare that a smart contract “shall be considered a commercial contract” or that smart contracts “govern” the rights and duties of an organization’s members.29 An enforceable agreement is a creature of contract law; a smart contract is “a computer program deployed on a blockchain that executes predetermined operations upon receiving specified data inputs,” and the two must be kept apart, for “[t]he former is a creature of law; the latter is an artifact of code.”30 A smart contract may be the vehicle through which parties form or perform an agreement, but it does not become one by executing, for “[s]mart contracts are only legal contracts when the law recognizes them as having legal effect; otherwise they are simply code used to automate technical acts to be conducted on computer systems.”31 The same confusion surfaced in Van Loon v. Department of the Treasury, a challenge to the decision of the Office of Foreign Assets Control to place the Tornado Cash crypto mixer on the Specially Designated Nationals sanctions list. The U.S. District Court for the Western District of Texas held that the immutable smart contracts comprising the mixer were sanctionable “property” on the theory that smart contracts are “a code-enabled species of unilateral contracts,” moving from a technically accurate description of smart contracts to treating them as legally enforceable contracts; the Court of Appeals for the Fifth Circuit reversed.32
The third pattern appears among founders of venture DAOs, who frequently assume that technical control over digital assets supplies the asset-shielding function of a limited liability entity; the case law holds otherwise. In Samuels v. Lido DAO, an investor who had bought and lost money on LDO governance tokens sued the Lido DAO and four of its institutional backers, namely Paradigm Operations, Andreessen Horowitz, Dragonfly Digital Management, and Robot Ventures, alleging that LDO tokens were unregistered securities and that each backer was jointly and severally liable as a general partner in the DAO. The court denied the motion to dismiss, holding that operating an Ethereum staking service that retained a share of validator revenue was sufficient to plead a general partnership. Houghton v. Leshner applied the same partnership theory to the Compound DAO. In Sarcuni v. bZx DAO, nineteen plaintiffs sued the bZx DAO on a negligence theory after a developer was deceived by a phishing email on his personal computer and the resulting security breach allowed attackers to drain roughly $55 million from bZx protocol users. In each case, federal courts allowed claims to proceed on the theory that DAO participants had formed general partnerships by default and stood exposed to joint and several liability, sophisticated institutional investors included.33 “[L]imited liability . . . is a normative creation available only through the legal system's secondary rules of change, when parties comply with applicable entity formation statutes.”34 The lesson recurs across a crypto economy where “code is supposed to be king” until “faced with financial ruin, even the most ardent crypto enthusiasts discover that traditional legal systems offer a vital safety net.”35
Code Invested with Legal Authority by Positive Law
Where the secondary rules of a legal system do invest code with authority, the result is not “code is law” but its opposite, since authority “flows from the law to the code, never the reverse.”36 The law identifies a discrete technical fact and attaches legal consequences to it, while reserving validity, change, and adjudication to itself. Both the public and the private pathway of investiture are visible in current practice.
Public empowerment occurs when a legislature or other recognized public authority identifies a verifiable technical fact and attaches legal consequences to it, so that “the law deliberately envelops a technical system, imbuing the states or outcomes that code produces with juridical effect.”37 The clearest example of legislative investiture is Article 12 of the UCC, adopted in the 2022 Amendments. Article 12 does not declare that code is law; it “carefully defines which technological facts will be granted legal significance and precisely what their juridical status will be.”38 The verifiable technical fact selected is control over a controllable electronic record; to that fact the statute attaches three specific legal consequences. First, a take-free rule provides that a purchaser who obtains control for value, in good faith, and without notice of competing claims acquires its rights free of those claims; the rule “cloaks [controllable electronic records] in the mantle of negotiability” and is “a deliberate act of legal investiture,”39 the archetypal exercise of public empowerment. Second, a choice-of-law waterfall resolves the jurisdictional question for distributed-ledger transactions. Third, the new categories of controllable accounts and controllable payment intangibles allow a payment right to be evidenced by a controllable electronic record, so that the right travels with the token to whoever has control of the record; if structured as a controllable account, the redemption right of a stablecoin would be the paradigmatic example, though the GENIUS Act leaves that construction unresolved.40 Those payment-rights categories are the doctrinal foundation for tokenizing financial claims; the early promise that “blockchain operates as a law unto itself” collapsed once insolvent crypto platforms reached bankruptcy court, and genuine tokenization instead depends on the statutory framework Article 12 supplies.41 The law remains the source of the rule; the code supplies only the triggering fact. The doctrinal mechanics of Article 12 are the subject of UCC Article 12 and Controllable Electronic Records.
Private empowerment operates through the same logic. Parties may incorporate code into contracts, trusts, wills, and corporate charters, instruments the law already recognizes as creating binding commitments, and in every such arrangement “legal force derives from the parties’ valid exercise of their delegated authority, not from the particular technical mechanisms they employ, regardless of their sophistication or effectiveness as architectural constraints.”42 A smart contract operating within a properly formed contractual relationship is legally binding because contract law makes it so; a venture organized as a limited liability entity under state law obtains its asset-shielding function from the entity statute, not from the smart contract that records its governance. In each case the role of the code is confined to executing what the law has already empowered the parties to do.
Could Code Ever Become an Autonomous Source of Law?
Beyond legislation and private ordering lies a third and more theoretical pathway, recognition of code as an autonomous source of law through Hart’s rule of recognition. A rule of recognition identifies sources that produce interpretable, prescriptive norms, whereas code records factual states and executes deterministically. Code can express that if a condition occurs an operation will run, but not that if a condition occurs a person ought to act. Recognizing code as a freestanding source of law is therefore “more of a theoretical possibility than a present reality.”43 No present legal system has taken that step.
The stakes are not confined to blockchain. The framework extends to every wave of new technology, “from large language models to autonomous robots.”44 “Each generation of technological innovation tempts lawmakers, courts, and market participants to mistake architectural power for normative authority”; the enduring response is that “code governs the possible; only law determines the permissible.”45 What changes with each new technology is the technical fact that positive law selects for investiture, not the source of the legal consequences that attach to it.
Notes
- Carla L. Reyes, Andrea Tosato & Andrew Hinkes, Code is Not Law, 54 Fla. St. U. L. Rev. (forthcoming 2026) (manuscript at 19). ↩
- Id. (manuscript at 3–5). ↩
- Id. (manuscript at 5); see also id. (manuscript at 13) (cataloguing the scholarly claims that advanced the view). ↩
- Id. (manuscript at 2). ↩
- Id. (manuscript at 5–6). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 7–8). ↩
- Id. (manuscript at 8). ↩
- Id. (manuscript at 9–11). ↩
- Id. (manuscript at 4, 13). ↩
- Id. (manuscript at 4). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 13–15) (canvassing competing accounts of law’s nature and expounding modern positivism’s two foundational propositions, the social thesis and the separability thesis). ↩
- Id. (manuscript at 13–15) (setting out three reasons for adopting a legal positivist analytical framework: positivism’s descriptive accuracy and dominance in contemporary legal thought and practice, its unique suitability to questions of legal validity, and the structurally positivist character of the claims advanced by proponents of lex cryptographia). ↩
- Id. (manuscript at 13) (quoting John Finnis, On the Incoherence of Legal Positivism, 75 Notre Dame L. Rev. 1597, 1611 (2000)). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 13–15). ↩
- Id. (manuscript at 14–19) (applying H. L. A. Hart, The Concept of Law (3d ed. 2012)). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 17). ↩
- Id. (manuscript at 17). ↩
- Id. (manuscript at 17) (citing Joseph Raz, The Authority of Law: Essays on Law and Morality 30 (1979)). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 17) (citing Brian Leiter, Legal Realism and Legal Positivism Reconsidered, 111 Ethics 278, 285–87 (2001)). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 19). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 19). ↩
- Id. (manuscript at 20). ↩
- Yuga Labs LLC, Bored Ape Yacht Club License Terms, quoted in Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 31). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 31). ↩
- Id. (manuscript at 32). ↩
- Andrea Tosato & Christopher K. Odinet, Digital Assets and the Property Question, 78 Fla. L. Rev. 257, 257 (2026). ↩
- Christopher K. Odinet & Andrea Tosato, Digital Commercial Law: Private Law in the Age of Tokens, Platforms, and Automation ch. 3, at 85 (2026). ↩
- U.C.C. §§ 12-102(a)(1), 12-104(c), (f), 12-105 (Am. L. Inst. & Unif. L. Comm’n 2022); see Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 43–44). ↩
- Ark. Code Ann. § 25-32-122 (2023); Tenn. Code Ann. § 48-250-105(b)(3), (5) (2022); discussed in Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 21–23). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 22). ↩
- Id. (manuscript at 34). ↩
- Van Loon v. Dep’t of the Treasury, 122 F.4th 549 (5th Cir. 2024), rev’g 688 F. Supp. 3d 454 (W.D. Tex. 2023); discussed in Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 26–27). ↩
- Samuels v. Lido DAO, 767 F. Supp. 3d 951 (N.D. Cal. 2024); Houghton v. Leshner, No. 22-cv-00781-WHO, 2023 WL 6826814 (N.D. Cal. Sept. 20, 2023); Sarcuni v. bZx DAO, 664 F. Supp. 3d 1100 (S.D. Cal. 2023); discussed in Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 37–39). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 40). ↩
- Kara Bruce, Christopher K. Odinet & Andrea Tosato, Bankrupt Crypto Organizations, 104 N.C. L. Rev. 657, 658–59 (2026). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 41). ↩
- Id. (manuscript at 41). ↩
- Id. (manuscript at 42). ↩
- Id. (manuscript at 41–44). ↩
- U.C.C. §§ 12-104, 12-105, 12-107 (Am. L. Inst. & Unif. L. Comm’n 2022); see Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 41–44). ↩
- Andrea Tosato, Diane Lourdes Dick & Christopher K. Odinet, Debt Tokens, 173 U. Pa. L. Rev. 1103, 1103, 1157–59 (2025). ↩
- Reyes, Tosato & Hinkes, Code is Not Law (manuscript at 44–48). ↩
- Id. (manuscript at 20); see also id. (manuscript at 49–51). ↩
- Id. (manuscript at 6). ↩
- Id. (manuscript at 51–52). ↩