Smart contract risk: the failure classes
Where contracts actually fail — and why “audited” is a statement about a point in time, not a property.
This lesson has had no expert review. It was written for this platform and against the evidence it cites; nobody has gone through it independently.
Learning objectives
- You can name and distinguish the principal failure classes.
- You can say what an audit report evidences and what it does not.
Check your prior knowledge
Answer these for yourself before reading on. Wherever you hesitate is where this lesson pays off.
- What does a code audit review, and against what?
- Can a contract be bug-free and still lose money?
- Who decides which code runs after an upgrade?
Core concept
Four classes, only one of them a coding bug
First, implementation bugs: the code does not do what it should. Second, access failures: it does what it should, but for the wrong party. Third, economic failures: every function works correctly, yet their interaction yields a sequence profitable to an attacker. Fourth, dependency failures: your own code is sound, but something it relies on supplies wrong values. An audit chiefly addresses the first two.
An audit is a snapshot with a scope
An audit report refers to a named code version, a named scope and a point in time. After an upgrade, different code runs. Whatever lay outside the scope — often the economic design and the dependencies — was not reviewed. The useful question is therefore not “is there an audit” but: which version, which scope, which findings, and what has changed since?
Assurance itself is an object of research
The market for smart contract assurance is young, and its emergence is now being studied empirically. It does not follow that audits are worthless — they are demonstrably useful. It follows that their evidential weight is itself a fair question: by whom, with what method, under what incentive.
Definitions
- Access control
- The rules for which address may call which function.
- Economic exploit
- An attack using only intended functions, in a profitable sequence.
- Smart contract risk in the glossary
- The risk that the contract or its environment behaves differently than assumed.
Model
Implementation bugs — within an audit's scope
Access failures — within an audit's scope
Economic design — only with an explicit mandate
Dependencies (oracle, other contracts) — usually outside
Later upgrades — outside by definition
Worked example
Two protocols, both “audited”
- Protocol A
- audit of the current version, scope: core contracts and economics
- Protocol B
- audit from two upgrades ago, scope: core contracts only
- Public claim
- both: “audited”
The same claim, two very different facts: in B the audited code is not the running code, and the economic design was never in scope.
“Audited” separates nothing here.
Reading: The claim becomes information only with version, scope and date. Without those three it is marketing.
Retrieval
Exercise on real data
Read the smart contract questions and record which are answerable from an audit report — and which must come from chain state.
Dimension 4 of the analysis framework →Application
You receive an audit report for a protocol your organization wants to invest in. Which four checks do you run on it?
Related case studies
- CASE-12 — What an audit study establishes
- CASE-09 — Audit present, question open
- CASE-03 — Governance changes a risk parameter
Institutional reading
- Bank
- Does the report meet internal requirements for an external review?
- Insurance
- Which of the four failure classes could be formulated in an insurable way?
Key takeaways
- Only one of the four failure classes is a coding bug.
- “Audited” without version, scope and date is not information.
- An existing audit is a finding, not proof of safety.
Evidence
- EVD-2026-0004
Annual Review of Financial Economics — Smart Contracts and Decentralized Finance
- EVD-2026-0005
Review of Accounting Studies (Springer) — Decentralized Finance (DeFi) assurance: early evidence