Smart contract audit readiness checklist
A smart contract audit checklist lists what to finish before the auditors start: a pinned commit and scope, docs, tests, written invariants, a map of roles, your external dependencies, upgrade and deployment details, and a plan for after the audit. Tick the 45 checks below as your team works through them, or print the page, and read the one-line reason under each check when you are tempted to skip it.
Scope and docs
- Findings have to point at code that still exists when you fix them.
- Scope sets the price and the schedule, and it tells reviewers where to stop.
- Reviewers judge code against what it is meant to do, so without that a bug can pass as a design choice.
- It points reviewers at what you fear most and stops them reporting what you have already accepted.
- Each comment is a promise the reviewers can test the code against.
- An audit that starts with a broken build loses its first day.
- Every line in scope costs review time, so code you don't ship shouldn't be in it.
Tests and coverage
- One untested branch in a withdrawal path matters more than ten in view functions.
- Bugs hide where the happy-path tests stop.
- An access control test is cheap to write, and the bug it catches is expensive to ship.
- Real tokens, pools and oracles behave in ways a mock was never written to.
- Generated inputs reach the rounding and boundary cases that hand-written tests skip.
- Auditors rerun your tests to confirm each finding and each fix.
Invariants
- An invariant is the protocol's promise, and nobody can test a promise that isn't written down.
- Accounting drift is how a vault or a lending market loses funds without any single call looking wrong.
- A fuzzer then tries call sequences nobody thought to write by hand.
- An invariant that ran once before the audit says nothing about next month's merge.
- Reviewers can then spend their time where your own tests stopped.
Access control and roles
- With that matrix, reviewers can check each modifier against the intended design.
- These are the functions an attacker or a stolen key goes after first.
- Role changes are rare paths, so they get the least testing.
- Users and reviewers need to know what an admin can do on a bad day.
-
tx.originis the wallet that started the transaction, so a malicious contract the owner calls can pass the check.
External dependencies and oracles
- Each external call hands control to code you didn't write.
- Tokens that differ from a plain ERC-20 break accounting, and tokens with hooks can call back into you.
- A stale or wrong price turns borrows and liquidations into losses.
- A flash loan can move a spot price and move it back inside the same transaction.
- Reviewers can diff forked code against its source instead of reading it from scratch.
Upgradeability
- Whoever holds the upgrade key can replace the audited code in one transaction.
- A shifted storage slot corrupts state without raising any error.
- An uninitialized implementation belongs to whoever initializes it first.
- A routine upgrade can turn a safe default into an open door.
- A delay gives users and monitors time to react to a bad upgrade.
Deployment and keys
- A wrong constructor argument is a bug too, and unit tests rarely see it.
- One wrong address or decimal setting can misprice a whole market.
- A single hot key is a single point of failure for the whole protocol.
- An audit covers one commit, so what you deploy has to be that commit.
- Once an exploit starts, minutes matter, and nobody should be looking for the pause key.
After the audit
- A fix can add a new bug, so the fix needs its own review.
- Integrators can then check that the deployed code is the audited code.
- Code merged after an audit was never audited.
- Small changes after launch add external calls and roles that nobody re-reviews.
- The tests that prepared you for the audit are the cheapest guard on what changes next.
- Without a rule, a series of small changes grows into unaudited code.
- An audit covers one commit, and a bounty keeps people looking at the live code.
Copy a link to this checklist with your ticks. Ticks stay in the link only, nothing is stored.
When should you start preparing for a smart contract audit?
Start on the documents while the code is still moving. Quantstamp says scoping can begin when the code is about 85 to 90% complete, and Trail of Bits suggests running its audit prep assistant 1 to 2 weeks before an audit.
Freeze the commit when the audit starts, or keep new work on a separate branch, as Consensys Diligence suggests. Then leave room for fixes: Quantstamp's typical window after preliminary findings is about two weeks.
Give each group of checks an owner. Scope and docs, tests and invariants take the longest, so start with those. The access control group produces the matrix that Hacken's readiness checklist asks for: roles, function-level restrictions, privilege escalation paths and multisig thresholds.
How much test coverage do auditors expect?
The four guides we read put the floor between 80% and 90%. Trail of Bits' audit prep checklist asks for test coverage above 80%, OpenZeppelin for at least 90%, Consensys Diligence for 90 to 100%, and Quantstamp for at least 90% in each coverage category, with 100% as the goal.
Treat the number as a floor, not a finish line. Coverage shows that a line ran, not that a test checked the right result, so a suite at 95% with no failure-path tests can still miss the bug in a withdrawal. That is why the invariants group follows the tests group.
What does a written invariant look like?
An invariant is a rule that must hold after any sequence of calls. Trail of Bits calls documenting these properties "the single most important activity for achieving a good outcome", and the step after that is writing each one as code a fuzzer can run.
A vault and its invariant, written as an Echidna property (illustrative, not audited code) VaultProperties.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
/// A minimal vault that mints one share for each wei deposited.
contract Vault {
mapping(address => uint256) public shares;
uint256 public totalShares;
function deposit() external payable {
shares[msg.sender] += msg.value;
totalShares += msg.value;
}
function withdraw(uint256 amount) external {
shares[msg.sender] -= amount;
totalShares -= amount;
(bool ok, ) = msg.sender.call{value: amount}("");
require(ok, "send failed");
}
}
/// Echidna calls deposit and withdraw with generated inputs and tries
/// to make the property below return false.
contract VaultProperties is Vault {
/// Invariant: the vault always holds at least the ETH it owes in shares.
function echidna_assets_cover_shares() external view returns (bool) {
return address(this).balance >= totalShares;
}
}
Echidna treats a function whose name starts with echidna_, takes no arguments and returns a bool as a property. It calls the contract's other functions with generated inputs, and if it can make the property return false, it prints the call sequence that does so. The same rule can live in a Medusa property test or a Foundry invariant test. What matters is that it runs on every pull request, not once before the audit.
Which incidents show why the later checks matter?
Initializers. Parity multi-sig wallets deployed after 20 July 2017 shared one library contract that still needed initialization. On 6 November 2017 a user initialized it, became its owner and called its self-destruct function, and 587 wallets holding 513,774.16 ETH could no longer move their funds, according to Parity's post-mortem. Our page on access control vulnerabilities covers the pattern.
Configuration. On 15 February 2026 Moonwell executed governance proposal MIP-X43, which enabled Chainlink OEV wrapper contracts across its core markets on Base and Optimism. One configuration priced cbETH from the cbETH/ETH rate alone, about $1.12 instead of about $2,200. Liquidators seized 1,096.317 cbETH and Moonwell was left with about $1.78M of bad debt, as The Block and Decrypt reported from Moonwell's post-mortem.
Changes after the audit. Euler Finance added donateToReserves in a later improvement proposal, eIP-14, and the function did not check the health of the account making the donation. On 13 March 2023 an attacker used it to drain about $197M, according to Omniscia's post-mortem and Bloomberg. Our guide to reviewing changes since your last audit covers this kind of change.
How does audit readiness affect the cost of an audit?
Most manual audits of a DeFi protocol cost $25,000 to $100,000 in 2026, inside a wider range of about $5,000 to $250,000, according to Sherlock. Sherlock adds that a re-audit after fixes typically costs another $5,000 to $20,000 per round.
Readiness works on both numbers. A clear scope and a clean build leave more of the paid days for review, and every bug you find first is one fewer finding to fix and send back for another round. How much does a smart contract audit cost in 2026? has the full breakdown, and the audit cost calculator prices a QuillShield full audit from your line count.
Where does QuillShield fit before and after an audit?
Before the audit, run a QuillShield full audit on the frozen commit. It builds a security graph of the code and lists the invariants the code must keep, which you can hold up against your own list from the invariants group. A separate reviewer agent tries to disprove every finding before you see it, and each finding that holds up comes with the exact lines, the impact, a recommended fix and, on full audits, a proof of concept. Fix those first, and the auditors spend their time on harder problems. Run your first audit walks through the steps.
After the audit, turn on pull request checks. Each check compares a change with the audit's security graph, and on GitHub, with branch protection or rulesets, a required QuillShield check blocks a merge while the pull request has a High or Critical finding, or one at the threshold you set. Add the check to a GitHub repository.
QuillShield supports Solidity in Foundry projects today, and it does not replace a manual audit. Full audits start at $49, and 1,000 lines of Solidity cost $379, as of November 2026 on the pricing page. Sign-up is free, and new accounts get $50 in credit, good for up to half of an order. Run a full audit, request a manual audit from QuillAudits or talk to an auditor.
FAQ
What should a smart contract audit checklist include?
Scope and docs, tests and coverage, written invariants, access control and roles, external dependencies and oracles, upgradeability, deployment and keys, and a plan for after the audit. The checklist on this page has 45 checks across those 8 groups.
How long before an audit should you start preparing?
Start the documents as soon as the design settles: Quantstamp says scoping can begin when the code is about 85 to 90% complete. Trail of Bits suggests running its audit prep assistant 1 to 2 weeks before the audit.
Do I need a code freeze for an audit?
Yes. Pin the commit the auditors review and keep new work on a separate branch, as Consensys Diligence suggests, so every finding points at code that still exists.
What test coverage do I need before an audit?
The guides we read ask for more than 80% (Trail of Bits) to at least 90% (OpenZeppelin). Treat that as a floor: coverage shows a line ran, not that a test checked the right result.
Should I run an AI audit before a manual audit?
Yes, on the frozen commit. A QuillShield full audit finds issues you can fix before the auditors start, so they spend their time on harder problems. It does not replace the manual audit, and you can request one from QuillAudits.
Sources
- Audit prep assistant, Trail of Bits checked 3 December 2026
- Smart contract security checklist (secure development workflow), Trail of Bits on ethereum.org checked 3 December 2026
- Smart contract audit readiness guide, OpenZeppelin checked 3 December 2026
- How to prepare for a smart contract audit with Consensys Diligence, Consensys Diligence checked 3 December 2026
- Audit readiness guide, Quantstamp checked 3 December 2026
- Smart contract audit readiness checklist (PDF), Hacken checked 3 December 2026
- Echidna on GitHub, Trail of Bits checked 3 December 2026
- A Postmortem on the Parity Multi-Sig Library Self-Destruct, Parity Technologies checked 24 November 2026
- DeFi lending protocol Moonwell hit with $1.8 million bad debt after oracle misconfiguration, The Block checked 24 November 2026
- Oracle error leaves DeFi lender Moonwell with $1.8 million in bad debt, Decrypt checked 24 November 2026
- Euler Finance Incident Post-Mortem, Omniscia checked 20 November 2026
- DeFi Lender Euler Finance Hit By $197 Million Hack, Bloomberg checked 20 November 2026
- Smart contract audit pricing: a market reference for 2026, Sherlock checked 23 November 2026