Library · Crypto, word by word · Ideas and debates

What does "code is law" mean?

"Code is law" is the view that a smart contract's code is the final word on what happens to the funds it controls: whatever the code allows stands, even if the result was unintended. No outside authority, developer group or vote steps in to undo it.

Where people disagree

The case for

Supporters say predictable, unchangeable rules are the point of a blockchain: if outcomes can be reversed whenever enough people dislike them, users must rely on whoever decides, and no contract is truly final. The Ethereum Classic community holds that applications must run exactly as programmed, without third-party interference.

The case against

Critics say code is written by people and contains mistakes, and that a community can legitimately correct obvious theft. Vitalik Buterin argues that coins are ultimately held through a social contract rather than by keys alone, and in 2016 Ethereum's community voted for a fork that moved the drained funds to a contract their owners could withdraw from.

What it means for you

If a contract you use has a bug or is exploited, the code-is-law view says the outcome stands and there are no refunds unless the code itself provides one. Whether a loss is ever reversed in practice depends on whether a network's community chooses to change the rules, as Ethereum's did in 2016, splitting the network in two.

How it works

In the Ethereum Classic community's wording, a smart contract's code is 'the ultimate arbiter' of an on-chain interaction, with 'no do-overs, bailouts or refunds, unless pre-programmed'. The defining test came in 2016, when a contract called The DAO was drained of over 3.6 million ETH. At block 1,920,000 on 20 July 2016, Ethereum hard-forked to move those funds to a new contract whose only function was withdrawal. Some miners refused, holding that the incident was not a defect in the protocol, and kept the original chain running as Ethereum Classic.

Sources: Ethereum Classic: Code is Law, ethereum.org: History of Ethereum (DAO fork), Vitalik Buterin, The Most Important Scarce Resource is Legitimacy (2021) · checked 4 October 2026

Often confused with

Code is law vs Social consensus

Related words

Smart contractHard forkDAOForkReentrancy attack

Educational content, not financial advice. Written by hand and checked against the source named above. Something wrong? Tell us and we reply within two business days.