Smart Contract Audit
- Category
- Security and Custody
- Level
- Professional
Simple definition
A paid review of a contract's code by security specialists before launch. It finds bugs; it does not promise there are none, and audited projects have still been exploited.
Professional definition
A time-boxed manual and automated review of a specific commit of a contract's source, producing findings ranked by severity and a report. It covers the code as submitted under agreed assumptions — not later upgrades, not the deployment, not the economic design, and not the keys held off-chain.
Technical definition
An audit is evidence, not a guarantee. Its value is bounded by scope, the hours bought, what reviewers were told, and the fact that it is a point-in-time review by humans. Findings may be left unfixed or fixed in a way that introduces new behaviour, and code deployed after the reviewed commit is unreviewed. Formal verification proves the properties specified and is silent on the ones nobody wrote down. Large exploits have occurred in audited code, and international bodies caution against reading an audit as an assurance of safety.
Academic definition
A point-in-time security assessment of a defined contract codebase, bounded in scope and effort, yielding a reduction in residual vulnerability rather than a proof of correctness.
Mechanism
Review effort is finite while the space of reachable states is not, so auditors prioritise known vulnerability classes and the paths they have hours to follow. Novel economic interactions, composability with contracts that do not exist yet, and changes made after the review all lie outside what any report can cover.
In practice
- Who uses it
- Protocol teams before launch, investors doing due diligence, insurers pricing cover, and users judging a protocol's maturity.
- Why it matters
- It removes a large share of known-class bugs and documents what was and was not examined, which is useful precisely because the scope is explicit.
- Limitations
- It is not a guarantee, not an opinion on economic design or solvency, and not valid for code changed since the reviewed commit. Audited protocols have been exploited.
Common mistakes
- Reading the word audited as a safety claim without opening the report.
- Not checking that the deployed address matches the audited commit.
- Ignoring findings the team acknowledged but did not fix.
Examples
A protocol advertises an audit on its front page. The contract that was exploited had been deployed after the reviewed commit, as an upgrade. The report was accurate and irrelevant to the loss.
A report lists 18 findings: 2 critical, 4 high, 12 lower. Fifteen are fixed, three are acknowledged and left open. The residual risk a reader should price is those three, not zero.
- Findings = 18 (2 critical, 4 high, 12 lower)
- Fixed and re-checked = 15
- Acknowledged, not fixed = 3
- Open findings = 18 - 15 = 3
- Scope note: the report covers one commit, so later code adds unmeasured risk
Counts of findings are not a quality score. A report with few findings may mean a small scope or a short engagement, not safe code.
Related terminology
- related
- Smart Contract Bug Bounty Reentrancy Attack Due Diligence Decentralised Finance Honeypot Approval Exploit Rug Pull Oracle Manipulation
Bug Bounty
An audit is a bounded review of one commit at one time. A bounty is a standing offer that pays for findings in live code.
Sources
IOSCO · recommendations addressing smart-contract risk and the limits of code review
https://www.iosco.org/library/pubdocs/pdf/ioscopd754.pdf URL verified
BIS Quarterly Review · 2021-12 · discussion of code risk and of why audits do not remove it
https://www.bis.org/publ/qtrpdf/r_qt2112b.pdf URL verified
Editorial status
Flagged by the editor as uncertain on a linguistic, mathematical or regulatory point.
