Blockchain

Smart Contract Audit Preparation: A Checklist Before You Book Auditors

5 min read

Sheet
01
Section
Smart Contract Audit Preparation: A Checklist Before You Book Auditors
Smart Contract Audit Preparation: A Checklist Before You Book Auditors
Fig. 01. Smart Contract Audit Preparation: A Checklist Before You Book Auditors
Sheet
02
Section
Blockchain

A smart contract audit is expensive, booked weeks ahead, and time-boxed. If the auditors spend the first days working out how to build your repo and what the code is meant to do, you have paid for setup, not review.

Audit preparation is the work that makes the review time count. None of it is glamorous. Most of it is writing things down and making sure the tests actually run. This is the smart contract audit preparation checklist we use at Big Immersive, built from the published readiness guides of audit firms (linked at the end) and from how we design contracts for audit from the start.

One honest limit first: we prepare code for an independent audit. We don't certify our own work, and you shouldn't accept a team marking its own homework on a high-value contract.

1. Freeze the scope and the commit

Pick the exact commit the auditors will review and tag it. List every file in scope. Development can continue on another branch, but anything merged into the audited scope after kickoff has to be agreed with the auditors, because a report only means something for the code it names.

Then trim:

  • Remove dead code, experiments and unused helpers from the scope.
  • Leave tests and mocks out of scope, but in the repo.
  • Put deployment scripts in scope. They set parameters and wire contracts together, and they can be wrong.
  • Decide about off-chain components. If the safety of funds depends on a relayer, keeper, indexer or oracle feed, either include it or document why it is trusted.

2. Write down what the code is supposed to do

The worst bugs live in the gap between what the code does and what the team meant. If intent isn't written down, auditors have to infer it from the code, which is the one source guaranteed to contain the bug.

Four short documents cover most of it:

  • Architecture overview. The contracts, how they call each other, where value enters and leaves, and which parts are upgradeable.
  • Roles and permissions. Every privileged role, what it can call, who holds it at launch (a single key, a multisig, a timelock, governance), and how it is transferred or revoked.
  • Trust assumptions. What you rely on and don't defend against: an honest oracle, a working bridge, a keeper that runs on time.
  • Invariants. Properties that must always hold, written as plain sentences a reviewer can try to break. "Total shares issued never exceeds total deposits." "Only the timelock can change the fee."

We settle this on paper before anything is deployed, during architecture, where it's cheap to change. Writing it after the fact for the audit is harder and less honest.

3. Make the test suite prove intent

Auditors read tests to understand what you believe the code does, and they use your setup to write proof-of-concept exploits quickly. So:

  • One command from a clean clone. Install, build and test, documented in the README. If it needs a fork URL or env vars, say so.
  • Every test passes. No skipped tests, no "known flaky".
  • Negative tests. Every privileged function should have a test proving an unprivileged caller is rejected. Attackers call your code in ways you didn't intend; your tests should too.
  • Edge cases. Zero amounts, maximum values, rounding, reentrancy paths, tokens with odd decimals or fee-on-transfer behaviour if you accept arbitrary tokens.
  • Integration and fork tests if you call other protocols, so assumptions about their behaviour are checked against the real thing.
  • Fuzz and invariant tests for the invariants you wrote down in step 2.

Coverage is a useful signal, not a goal. Sherlock's audit requirements, for example, ask for more than 80 percent test coverage and 100 percent passing tests. High coverage of the wrong things still misses bugs, which is why the invariants and negative tests matter more than the number.

4. Run the cheap tools yourself

Don't pay auditors to find unchecked return values and missing zero-address checks. Run static analysis and a linter before the audit, then fix every finding or write down why it's acceptable. Hand the auditors the triaged output, so they can skip what you've already looked at.

Also check:

  • Compiler version pinned, and the same across contracts.
  • Dependencies pinned to exact versions, ideally well-known libraries rather than copied code.
  • No leftover console logs, TODOs or commented-out logic in scope.

5. Document deployment and upgrades

Many incidents happen at deployment, not in contract logic. Write a deployment manifest:

  • Every contract, its constructor or initializer arguments, and the order of deployment.
  • Proxies and implementations, and who can upgrade them.
  • Owners, admins, timelock delays and initial parameters.
  • What happens if a step fails halfway.

Uninitialised proxies and admin roles that can't be transferred are classic findings. Most of them are found by reading the manifest, if one exists.

6. List known issues

Write down accepted risks and known bugs. Otherwise auditors spend time re-reporting what you already know, and the report fills up with findings you planned to accept anyway.

7. Book the fix window, not just the audit

An audit produces findings. Someone has to fix them, and the auditors have to check the fixes. Keep the engineers who wrote the code available during the review to answer questions, and reserve time after it for remediation and verification. Fixes rushed into a launch without re-review are how a clean audit report ends up describing code that never shipped.

8. Hand over one package

At kickoff, the auditors should get everything in one place:

  • Repo link and the frozen commit hash.
  • Scope list.
  • Build and test instructions.
  • Architecture, roles, trust assumptions, invariants.
  • Static analysis output, triaged.
  • Deployment manifest.
  • Known issues.
  • Who to ask, and how fast they'll answer.

Designing for audit from day one

Most of this checklist is easier if you plan for it from the start. When we build smart contracts, in Solidity or in Rust where the chain calls for it, the contract architecture and security model are settled on paper first. Then we work in short sprints, each ending on a testnet you can use, with tests that cover the failure cases an attacker would look for. Audit preparation and a supported mainnet launch follow.

The other half is building only what needs to be on-chain. Tokenization is worth doing when the asset does something inside a product. In Virtua Land, part of a product we built for ourselves, land plots and the robots that work them are on-chain assets. Every contract you don't write is one fewer contract to audit.

Sources

Working with us

Big Immersive is a product team in Lahore, Pakistan: development and product management, with expertise in Blockchain and AR/VR. Our services practice is new. If you're planning contracts and the product around them, see our blockchain development work, what we built, or book a 30-minute call.


Follow Big Immersive

LinkedIn · GitHub

Section
The fastest way to start

Book a 30-minute project call.

We'll show how we'd build your idea and what the first milestone looks like.

Choose a time