# Smart contract audit readiness checklist

URL: https://shield.quillaudits.com/tools/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.

Last updated 3 December 2026. 5 minute read. By the QuillAudits Team.

## Scope and docs

- Pin the branch and the commit hash the auditors will review. · Findings have to point at code that still exists when you fix them.
- List the files in scope and out of scope, with their line counts. · Scope sets the price and the schedule, and it tells reviewers where to stop.
- Describe in plain English what the protocol does, who uses it and how value moves. · Reviewers judge code against what it is meant to do, so without that a bug can pass as a design choice.
- Write down your trust assumptions and the risks you already accept. · It points reviewers at what you fear most and stops them reporting what you have already accepted.
- Add NatSpec comments to every external and public function. · Each comment is a promise the reviewers can test the code against.
- Make `forge build` and `forge test` pass from a fresh clone, and put the commands in the README. · An audit that starts with a broken build loses its first day.
- Remove dead code, unused imports, TODOs and `console.log` calls. · Every line in scope costs review time, so code you don't ship shouldn't be in it.

## Tests and coverage

- Run `forge coverage` and read the uncovered branches as well as the total. · One untested branch in a withdrawal path matters more than ten in view functions.
- Test the failure paths: reverts, zero amounts, maximum values and unauthorized callers. · Bugs hide where the happy-path tests stop.
- Call every privileged function from the right role and from the wrong one. · An access control test is cheap to write, and the bug it catches is expensive to ship.
- Test each external integration on a mainnet fork, against the real contracts instead of mocks. · Real tokens, pools and oracles behave in ways a mock was never written to.
- Fuzz every function that takes an amount, a price, a share count or a timestamp. · Generated inputs reach the rounding and boundary cases that hand-written tests skip.
- Make the whole suite run with one command, and note how long it takes. · Auditors rerun your tests to confirm each finding and each fix.

## Invariants

- Write down, in plain English, the rules that must always hold. · An invariant is the protocol's promise, and nobody can test a promise that isn't written down.
- Cover the accounting: total shares against total assets, and the sum of balances against total supply. · Accounting drift is how a vault or a lending market loses funds without any single call looking wrong.
- Turn each rule into code a fuzzer runs: an Echidna property, a Medusa test or a Foundry invariant test. · A fuzzer then tries call sequences nobody thought to write by hand.
- Run the invariant suite in CI on every pull request. · An invariant that ran once before the audit says nothing about next month's merge.
- List the invariants you could not test, and why. · Reviewers can then spend their time where your own tests stopped.

## Access control and roles

- List every role, the functions it can call and who holds it: an EOA, a multisig or a contract. · With that matrix, reviewers can check each modifier against the intended design.
- Mark each function that can move funds, pause, upgrade or change a parameter. · These are the functions an attacker or a stolen key goes after first.
- Document how roles are granted, revoked and handed over, and test each path. · Role changes are rare paths, so they get the least testing.
- State the limits on admin power: timelock delays, caps and what a pause stops. · Users and reviewers need to know what an admin can do on a bad day.
- Check that no function uses `tx.origin` for authorization. · `tx.origin` is the wallet that started the transaction, so a malicious contract the owner calls can pass the check.

## External dependencies and oracles

- List every external contract you call: tokens, oracles, pools, bridges and other protocols. · Each external call hands control to code you didn't write.
- List the tokens you accept, and say whether fee-on-transfer, rebasing or hook tokens such as ERC-777 are supported. · Tokens that differ from a plain ERC-20 break accounting, and tokens with hooks can call back into you.
- For each price feed, write down its source, its staleness limit and what happens when it fails. · A stale or wrong price turns borrows and liquidations into losses.
- Say where any price comes from a pool's spot balance, and why it can't be moved within one transaction. · A flash loan can move a spot price and move it back inside the same transaction.
- Pin dependency versions, and mark which code is forked or copied, and from which commit. · Reviewers can diff forked code against its source instead of reading it from scratch.

## Upgradeability

- Name every upgradeable contract, its proxy pattern and who can upgrade it. · Whoever holds the upgrade key can replace the audited code in one transaction.
- Compare the storage layout with the previous version before every upgrade. · A shifted storage slot corrupts state without raising any error.
- Disable initializers on implementation contracts, and protect every initializer. · An uninitialized implementation belongs to whoever initializes it first.
- Review the values an upgrade sets as closely as the code it changes. · A routine upgrade can turn a safe default into an open door.
- Put upgrades behind a timelock or a multisig, and publish the delay. · A delay gives users and monitors time to react to a bad upgrade.

## Deployment and keys

- Write the deployment as a script, and put the script and its parameters in scope. · A wrong constructor argument is a bug too, and unit tests rarely see it.
- List every parameter set at deployment or by governance with its valid range: fees, caps, decimals and oracle addresses. · One wrong address or decimal setting can misprice a whole market.
- Hold admin and upgrade keys in a multisig, and write down the threshold and the signers. · A single hot key is a single point of failure for the whole protocol.
- Check that the deployed bytecode matches the audited commit, and publish the source on the block explorer. · An audit covers one commit, so what you deploy has to be that commit.
- Decide before launch who can pause and how fast, and set up monitoring. · Once an exploit starts, minutes matter, and nobody should be looking for the pause key.

## After the audit

- Fix findings in separate commits, and send the fix commits back for review. · A fix can add a new bug, so the fix needs its own review.
- Publish the report with the commit hash it covers. · Integrators can then check that the deployed code is the audited code.
- Review every change merged after the audit against the audited code. · Code merged after an audit was never audited.
- Add a required security check to pull requests that touch Solidity. · Small changes after launch add external calls and roles that nobody re-reviews.
- Keep the invariant suite running in CI after launch. · The tests that prepared you for the audit are the cheapest guard on what changes next.
- Decide which changes trigger a new audit: new external calls, new roles, a new chain or a large diff. · Without a rule, a series of small changes grows into unaudited code.
- Run a bug bounty on the deployed 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](https://shield.quillaudits.com/tools/smart-contract-audit-readiness-checklist/#). 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](https://quantstamp.com/audit-readiness-guide) says scoping can begin when the code is about 85 to 90% complete, and [Trail of Bits](https://trailofbits.com/skills/audit-prep-assistant/) 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](https://diligence.consensys.io/blog/2023/04/how-to-prepare-for-a-smart-contract-audit-with-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](https://assets.hacken.io/assets/Smart-Contract-Audit-Readiness-Checklist.pdf) 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](https://trailofbits.com/skills/audit-prep-assistant/)' audit prep checklist asks for test coverage above 80%, [OpenZeppelin](https://learn.openzeppelin.com/security-audits/readiness-guide) for at least 90%, [Consensys Diligence](https://diligence.consensys.io/blog/2023/04/how-to-prepare-for-a-smart-contract-audit-with-consensys-diligence) for 90 to 100%, and [Quantstamp](https://quantstamp.com/audit-readiness-guide) 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"](https://ethereum.org/developers/tutorials/secure-development-workflow.md), and the step after that is writing each one as code a [fuzzer](https://shield.quillaudits.com/learn/glossary/fuzzing/) 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](https://github.com/crytic/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](https://medium.com/paritytech/a-postmortem-on-the-parity-multi-sig-library-self-destruct-63daca3a4cf7). Our page on [access control vulnerabilities](https://shield.quillaudits.com/learn/vulnerabilities/access-control/) 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](https://www.theblock.co/post/390302/defi-lending-protocol-moonwell-hit-with-1-8-million-bad-debt-after-oracle-misconfiguration) and [Decrypt](https://decrypt.co/358374/oracle-error-leaves-defi-lender-moonwell-1-8-million-bad-debt) reported from Moonwell's post-mortem.

**Changes after the audit.** [Euler Finance](https://shield.quillaudits.com/exploits/euler-finance-2023/) 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](https://medium.com/@omniscia.io/euler-finance-incident-post-mortem-1ce077c28454) and [Bloomberg](https://www.bloomberg.com/news/articles/2023-03-13/defi-s-euler-finance-hit-by-197-million-hack-experts-say). Our guide to [reviewing changes since your last audit](https://shield.quillaudits.com/guides/review-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](https://sherlock.xyz/post/smart-contract-audit-pricing-a-market-reference-for-2026). 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?](https://shield.quillaudits.com/learn/smart-contract-audit-cost/) has the full breakdown, and the [audit cost calculator](https://shield.quillaudits.com/tools/smart-contract-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](https://shield.quillaudits.com/guides/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](https://shield.quillaudits.com/guides/check-every-pull-request-on-github/).

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](https://shield.quillaudits.com/pricing/). Sign-up is free, and new accounts get $50 in credit, good for up to half of an order. [Run a full audit](https://shield.quillaudits.com/register), [request a manual audit from QuillAudits](https://www.quillaudits.com/smart-contract-audit) or [talk to an auditor](https://calendly.com/akshadh-a-quillaudits/30min).

## 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](https://quantstamp.com/audit-readiness-guide) says scoping can begin when the code is about 85 to 90% complete. [Trail of Bits](https://trailofbits.com/skills/audit-prep-assistant/) 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](https://diligence.consensys.io/blog/2023/04/how-to-prepare-for-a-smart-contract-audit-with-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](https://trailofbits.com/skills/audit-prep-assistant/)) to at least 90% ([OpenZeppelin](https://learn.openzeppelin.com/security-audits/readiness-guide)). 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](https://trailofbits.com/skills/audit-prep-assistant/) · checked 3 December 2026
- [Smart contract security checklist (secure development workflow), Trail of Bits on ethereum.org](https://ethereum.org/developers/tutorials/secure-development-workflow.md) · checked 3 December 2026
- [Smart contract audit readiness guide, OpenZeppelin](https://learn.openzeppelin.com/security-audits/readiness-guide) · checked 3 December 2026
- [How to prepare for a smart contract audit with Consensys Diligence, Consensys Diligence](https://diligence.consensys.io/blog/2023/04/how-to-prepare-for-a-smart-contract-audit-with-consensys-diligence) · checked 3 December 2026
- [Audit readiness guide, Quantstamp](https://quantstamp.com/audit-readiness-guide) · checked 3 December 2026
- [Smart contract audit readiness checklist (PDF), Hacken](https://assets.hacken.io/assets/Smart-Contract-Audit-Readiness-Checklist.pdf) · checked 3 December 2026
- [Echidna on GitHub, Trail of Bits](https://github.com/crytic/echidna) · checked 3 December 2026
- [A Postmortem on the Parity Multi-Sig Library Self-Destruct, Parity Technologies](https://medium.com/paritytech/a-postmortem-on-the-parity-multi-sig-library-self-destruct-63daca3a4cf7) · checked 24 November 2026
- [DeFi lending protocol Moonwell hit with $1.8 million bad debt after oracle misconfiguration, The Block](https://www.theblock.co/post/390302/defi-lending-protocol-moonwell-hit-with-1-8-million-bad-debt-after-oracle-misconfiguration) · checked 24 November 2026
- [Oracle error leaves DeFi lender Moonwell with $1.8 million in bad debt, Decrypt](https://decrypt.co/358374/oracle-error-leaves-defi-lender-moonwell-1-8-million-bad-debt) · checked 24 November 2026
- [Euler Finance Incident Post-Mortem, Omniscia](https://medium.com/@omniscia.io/euler-finance-incident-post-mortem-1ce077c28454) · checked 20 November 2026
- [DeFi Lender Euler Finance Hit By $197 Million Hack, Bloomberg](https://www.bloomberg.com/news/articles/2023-03-13/defi-s-euler-finance-hit-by-197-million-hack-experts-say) · checked 20 November 2026
- [Smart contract audit pricing: a market reference for 2026, Sherlock](https://sherlock.xyz/post/smart-contract-audit-pricing-a-market-reference-for-2026) · checked 23 November 2026
