Smart contract audit services are security reviews of one fixed version of your code by independent specialists, with a fixed time limit. The review ends in a report that ranks each vulnerability by severity. An audit lowers risk, but it does not certify that the code is safe.
An audit finds more when the team brings a frozen commit, a written specification and a test suite that already catches the easy bugs. This guide covers what auditors do, how the process runs, what drives the cost, and how to choose a smart contract audit firm.
What a smart contract audit includes
Most findings come from experienced people who read the code against a clear model of how it should behave. Tools support that reading:
- Manual review: auditors read every line and model each actor that can touch the system, including users, admins, other contracts and MEV bots. Every external call and every assumption gets checked.
- Static analysis: Slither, Aderyn and similar tools flag known patterns such as reentrancy, shadowed variables and unchecked return values. The output contains many false alarms, so an auditor sorts it by hand.
- Fuzzing and invariant testing: Foundry invariant tests, Echidna and Medusa send random sequences of calls to the system, and each run checks that a property still holds, such as "a user can always withdraw their deposit."
- Formal verification: the Certora Prover, Halmos and the Solidity SMTChecker try to prove a property for every possible input, not just sampled inputs. Formal verification suits core accounting logic, but setup is expensive and the proof covers only the properties someone wrote down.
- Economic review: for DeFi, auditors model flash-loan attacks, oracle manipulation and broken incentives, which can exploit code that runs exactly as written.
Several firms and platforms now add AI-assisted review to this list. Sherlock, for example, sells an AI audit engine alongside human review. These tools add coverage, but they do not replace the manual review.
Vulnerability classes auditors look for
The 2025 edition of the OWASP Smart Contract Top 10 ranks access control first and price oracle manipulation second. The table lists the classes auditors check on most EVM projects.
| Class | What goes wrong |
|---|---|
| Access control | Admin or initializer functions have no permission check, or roles are granted too broadly. |
| Oracle and price manipulation | A contract reads the spot price from one pool, and a flash loan moves that price within one transaction. |
| Reentrancy, including cross-function and read-only | A contract makes an external call before it updates its state. The called contract re-enters and acts on the old state. |
| Accounting and rounding | Precision is lost, rounding favors the user, or the first depositor inflates an ERC-4626 vault's share price. |
| Signature handling | A signature is replayed on another chain or contract, or nonces, deadlines and signer checks are missing. |
| Upgradeability | Storage collides between versions, an implementation is left uninitialized, or upgrade rights are unsafe. |
| Token integration | Fee-on-transfer, rebasing or non-standard ERC-20 tokens break the contract's assumptions. |
| Denial of service | Loops without a limit or deliberate blocking stop withdrawals or liquidations. |
| MEV exposure | Swaps without slippage limits or deadlines let bots trade just before and just after a user's swap (a "sandwich" attack). |
The ethereum.org security guide is a short primer for your own team to read before the audit starts.
The audit process step by step
- Scoping. Share the repository, the in-scope files, the line count and any outside integrations. The firm estimates the effort in auditor-weeks and books a slot, often several weeks ahead.
- Preparation. Freeze a commit hash and provide a specification, an architecture diagram, known risks, invariants and a test suite that runs with one command. Every hour that auditors spend guessing what the code should do is an hour less for finding bugs.
- Review. Two or more auditors usually work in parallel and keep a chat channel open with your team. They will ask what the code should do, and fast answers keep the review on schedule.
- Report. The report ranks findings as critical, high, medium, low or informational. Each finding states the impact, the likelihood, a proof of concept and a recommended fix.
- Fix and re-review. Your team fixes the issues on a new commit, and the auditors check each fix and confirm that the fixes added no new bugs. The final report names the commit that was reviewed.
- Publish. Publish the report and confirm that the deployed bytecode matches the audited commit, because any change after the audit is unaudited code.
Smart contract audit cost
Firms price an audit by auditor-weeks, and the number of auditor-weeks depends on these factors:
- lines of in-scope code
- complexity, such as custom math, upgrade logic or cross-chain messages
- how new the design is, compared with known patterns such as standard tokens
- the language and chain, because fewer auditors work on Rust, Move or ZK circuits than on Solidity
- the quality of the specification and tests the team provides
- whether the fix review is included in the quote
A small token contract built on OpenZeppelin may need a few auditor-days, while a large DeFi protocol can keep several auditors busy for many weeks. Most private firms do not publish rates, so get quotes from several firms on the same frozen scope.
Audit contests publish their prize pools, which gives a public reference point. Recent Code4rena contests offered pools between $22,000 and $135,000. A Cantina contest live in October 2026 offered $50,000.
Audit firms, contests and bounties
| Model | How it works | Best use |
|---|---|---|
| Private audit firm | A named team reviews the code on a fixed schedule. | The main review before launch, and follow-up reviews of upgrades |
| Audit contest | Many independent researchers review the code for a fixed period. A prize pool pays for valid findings. | Wide coverage, often after a private audit |
| Bug bounty | Researchers report bugs in live code and receive a payment sized to the severity. | Ongoing review for the life of the protocol |
Contest platforms include Sherlock, Cantina and Immunefi. Code4rena, one of the first contest platforms, states on its site that it is shutting down and finishing its active competitions.
Immunefi hosts many bug bounties and reports more than $140 million paid in bounties. A bounty that is large compared with the funds at risk gives a researcher a reason to report a bug instead of exploiting it.
How to choose a smart contract audit firm
- Read the firm's past public reports. Check whether the findings are specific and well explained or filled with style notes.
- Check experience with your stack, since a firm with strong EVM lending work may have little Solana or ZK experience.
- Ask which named auditors will review your code, and for how many days.
- Reject offers to audit complex code in a couple of days, and "audit badges" sold as part of a token launch package.
- Use more than one independent review for systems that will hold large value.
After the audit
Deploy with ownership on a multisig and set up monitoring for unusual events and balance changes. Decide who can pause which contract, and rehearse the incident response.
The smart contract development guide covers the full lifecycle around the audit. The Solidity development page covers the language, and the article on smart contract security covers past exploits, while the guide to DeFi development covers protocol-level risk.
Frequently asked questions
How much does a smart contract audit cost?
The cost follows the number of auditor-weeks, which depends on code size, complexity and how new the design is. A small token contract may need a few auditor-days, and a large DeFi protocol can need several auditors for many weeks. Compare quotes from several firms on the same frozen scope.
How long does an audit take?
The review itself takes from a few days to several weeks, plus the lead time to book a slot and the time for fixes and re-review. Put the audit into the launch plan from the start.
Does an audit guarantee my contract is safe?
No. Attackers have exploited audited protocols, often through code changed after the audit, integrations outside the audit scope or economic attacks. Testing, formal methods, bounties and monitoring add protection beyond the audit.
When is formal verification worth the cost?
Formal verification fits a small core of logic that protects large value, such as vault accounting, lending health checks or bridge verification. The tool proves only the properties the team specifies, so writing the right properties is the key skill.
What is the difference between an audit and an audit contest?
A private audit gives one named team, a fixed schedule and a single report. A contest opens the code to many researchers at once and pays only for valid findings. Many teams run a private audit first and a contest after it.