“Code Is Law”: A Misleading Myth or a Functional Concept?

Concorpad
5 min readOct 18, 2024

--

The “Code Is Law” principle is often viewed as foundational in the crypto industry. Initially introduced by activist Lawrence Lessig in 1999, this concept, when applied to blockchain, suggests that the autonomously operating code of smart contracts dictates not only the transaction terms but also its rules and the relationship between parties. If the code permits something, it is considered lawful.

That’s why today, we will explore the “Code Is Law” principle, contrasting smart contracts with traditional legal agreements while offering practical insights on effectively applying this concept in real-world scenarios.

The Key Catch

In legal practice, parties’ true intentions and agreements hold significant weight. If a dispute over a smart contract arises, courts focus on the actual agreement and intentions rather than relying solely on the contract’s automated logic.

Courts may intervene if strict code execution leads to unjust outcomes, such as fraud or unforeseen circumstances. In such cases, they may prioritize the parties’ intentions over the smart contract’s logic. While a smart contract focuses on transaction execution, the legal system considers the broader context, including expectations and circumstances.

Smart Contracts vs. Traditional Agreements

Let’s compare smart contracts with traditional contracts to understand better how they fit into classical legal systems.

Key Differences:

In traditional contracts, the parties’ intentions play a central role. Courts often focus on what the parties agreed upon and how they interpret the agreement. They may assess the circumstances under which the contract was made and the intentions and expectations of both parties, interpret unclear terms or modify the contract due to unforeseen events.

However, smart contracts need more flexibility. They are executed automatically based on pre-defined logic, leaving little room for interpretation or alteration. If an error or unexpected event occurs, the smart contract executes strictly according to its original parameters, potentially leading to unfair or unintended outcomes.

Interpretation and Intentions of the Parties:

In practice, parties’ intentions and true agreement carry significant legal weight. If a dispute involving a smart contract ends up in court, the first task will be to determine the parties’ actual agreement and intentions rather than rely solely on the contract’s automated logic.

Courts may intervene if the strict execution of the code results in unjust outcomes, such as cases involving fraud, mistakes, or unforeseen circumstances. If a smart contract leads to an unintended or unfair result, the court may prioritize the parties’ initial intentions, even if that means disregarding the smart contract’s automated logic entirely.

Thus, from a legal perspective, a contract is not just “what’s written” but also includes the parties’ intentions, expectations, circumstances surrounding the agreement, and the broader context of the deal. A smart contract, by contrast, focuses solely on the execution of the transaction without considering these elements.

Why “Code Is Law” Can’t Be Absolute

The “Code Is Law” debate touches on the contrast between legal positivism and natural law. Legal positivism sees laws as human-made rules enforced by institutions, allowing flexibility and interpretation. In contrast, natural law suggests that some rules are innate and universal. “Code Is Law” aligns with natural law, treating code as an unchangeable set of rules that governs transactions autonomously.

However, modern legal systems follow legal positivism, meaning human-made laws precede code. Governments regulate blockchain and cryptocurrencies, ensuring that transactions and individuals are subject to these laws. Without legal recognition, code-based rules hold no binding authority.

If Code Is Law, Why Are Exploits and Hacks Illegal?

A code vulnerability doesn’t give users the legal right to exploit it. Just because the code allows an action doesn’t mean it’s lawful or ethical. In legal terms, code is secondary to both laws and agreements. The principle of “substance over form” prioritises the reality of the accords over their formal presentation. In this context, a smart contract is just a transaction form, while the actual agreement lies in the parties’ intentions.

Exploiting a smart contract’s vulnerability can be seen as unauthorized access or hacking, with any gains considered fraud or theft. Victims can file lawsuits and involve law enforcement. For example, if someone exploits a flaw in your DeFi protocol, they may claim to follow the “Code Is Law” principle. However, legal systems will likely view it as theft, reinforcing the law’s supremacy over code.

The DAO Incident

In 2016, the original decentralized autonomous organization, the DAO, raised over $150 million in Ethereum with the goal of revolutionising venture capital through smart contracts. However, a hacker exploited a vulnerability, siphoning over $60 million from the protocol. This incident presented a dilemma. On one hand, the code allowed the exploit, and technically, the hacker was following the system’s rules.

On the other hand, ethically, it was seen as theft. While some defended the hacker’s actions, claiming the exploit was legitimate since the code permitted it, the broader Ethereum community deemed it a crime. They controversially decided to execute a hard fork, rolling the blockchain back to its state before the attack.

How to Apply “Code Is Law” in Practice

Here are three practical recommendations for crypto businesses and Web3 projects seeking to effectively apply the “Code Is Law” concept.

  1. Use Hybrid Structures: Code alone isn’t enough — smart contracts must fit within existing legal frameworks. A hybrid model, where the smart contract handles transaction execution while legal tools govern the broader context, such as terms and parties’ intentions, can bridge the gap between code and law. For example, smart contracts process transactions during token private sales, while legal agreements define obligations and intentions.
  2. Implement Emergency Mechanisms: The immutability of smart contracts can be a limitation. Emergency mechanisms like kill switches or governance models allow intervention without compromising decentralisation to handle unforeseen issues or errors, providing flexibility in cases of exploits or critical failures.
  3. Ensure Legal Compliance: While the philosophy of “Code Is Law” is appealing, compliance remains crucial. As governments continue regulating space, Web3 projects must prioritise legal strategies and regulatory compliance to ensure long-term success.

Conclusion

“Code is law” is an appealing concept, but in reality, code and smart contracts cannot exist in isolation from legal frameworks. The law will always have precedence over contracts and contracts over code. To navigate this effectively, adopt hybrid structures where legal tools govern the transaction while code executes it. In the end, law complements and strengthens innovation when applied correctly.

About Concorpad

Concorpad stands at the forefront as an innovative launchpad platform operating on the robust Concordium blockchain, poised to revolutionise the IDO landscape for inventive ventures. Our core mission is firmly rooted in bridging the divide between visionary concepts and the market, providing an all-encompassing framework from initiating token launch to its seamless listing. At Concorpad, our unwavering dedication revolves around cultivating growth and propelling innovation within the expansive realm of the blockchain ecosystem.

Website | Twitter | Discord

--

--

Concorpad
Concorpad

Written by Concorpad

Concorpad: Fueling innovation on Concordium. Your launchpad for decentralized projects and token launches.

No responses yet