A deployed smart contract cannot be patched in place. That single property is why contract exploits remain the most expensive bugs in software — reentrancy, access-control mistakes, and oracle manipulation have each produced nine-figure losses — and why an independent smart contract audit before deployment is standard practice for anything that will hold value. This guide covers what an audit actually examines, how the checklist differs between Solidity/EVM and Stellar's Soroban platform, and how to prepare so the engagement finds real bugs instead of typos.
What an Audit Actually Is
An audit is a point-in-time security review of a frozen code snapshot. A serious engagement combines three activities: automated analysis (static analyzers, linters, fuzzers that flag known patterns), manual review (auditors reasoning about business logic, incentives, and trust assumptions no tool can see), and a written report classifying findings by severity with reproduction steps and recommended fixes. It is not a certification and not a guarantee — it is a bounded expert review whose value depends on scope, time, and what the auditors were told.
The EVM / Solidity Checklist
For contracts compiled to EVM bytecode, auditors work through a well-documented catalogue:
- Reentrancy — external calls that let a malicious contract re-enter before state settles; the pattern behind The DAO and countless later exploits. Checks-effects-interactions ordering and reentrancy guards are the standard defenses.
- Access control — missing or mis-scoped
onlyOwner/role checks on minting, pausing, upgrades, and withdrawals; tx.origin misuse; unprotected initializers on proxies. - Arithmetic and precision — rounding direction on share/asset conversions, fixed-point scaling errors, and division-before-multiplication loss of precision (overflow itself is mostly history since Solidity 0.8's checked math).
- Oracle manipulation — spot prices from a single DEX pool, missing staleness checks, and flash-loan-amplified price attacks.
- Front-running and MEV — order-flow-dependent logic exploitable by block builders; commit-reveal or batched-settlement mitigations.
- Upgradeability hazards — storage-layout collisions between proxy and implementation, unguarded upgrade functions, and initialization gaps.
- DoS and gas griefing — unbounded loops over user-controlled arrays, external calls that can revert and block the whole contract, push-style payments that should be pull.
- Signature handling — replay protection (nonces, chain ID in the domain separator), ecrecover malleability, and unchecked return values on token calls.
Auditors verify selectors, calldata handling, and event emission against the declared ABI — our calldata and ABI guide explains the encoding they reason about.
What Changes on Soroban
Soroban contracts are Rust compiled to WebAssembly, running in a metered sandbox on Stellar. The bug catalogue is different — the classic reentrancy pattern is largely absent because cross-contract calls do not hand over a mutable call frame the same way — but the stakes are identical. Soroban-specific review focuses on:
- Authorization coverage — every state-changing path gated by
require_auth/require_auth_for_args; no privileged function reachable without an auth check; no auth delegated to a contract that accepts it too loosely. - Cross-contract trust — calls into token or oracle contracts that assume honest behavior; the SEP-41 token interface is standard, but a contract must not assume every address implementing it is well-behaved.
- Storage and TTL — persistent entries expire; logic that forgets to
extend_ttlloses state, and state that should expire but does not can be abused for cheap storage. Instance vs persistent vs temporary storage choices are reviewed for correctness under eviction. - Arithmetic — fixed-point math on
i128, scaling factor consistency, overflow paths Rust's release build wraps rather than panics on, and rounding that can be gamed for dust extraction. - Resource limits — functions whose ledger I/O or compute grows unbounded and can exceed the per-transaction resource budget, bricking a call path.
- Upgrade and admin patterns — WASM bytecode updates, admin key management, and timelock/multisig protection on administrative functions.
How an Engagement Runs
- Scoping: agree the commit hash, the contracts in scope, the trust model, and out-of-scope components (oracles, frontends, dependencies).
- Analysis: automated tooling first — Slither and fuzzers on Solidity; cargo clippy, the Soroban test framework, and property tests on Stellar — then manual line-by-line review of the high-risk paths.
- Report: findings classified critical/high/medium/low/informational, each with a proof of concept and a concrete recommendation.
- Remediation and fix review: you fix, auditors verify the fixes resolve the issue without introducing new ones. Only the fix-reviewed report is the artifact worth showing.
Preparing Your Codebase
- Write down the invariants — "total shares never exceed deposits", "only the admin can pause" — auditors test code against intent, and undocumented intent is where logic bugs hide.
- Reach meaningful test coverage, including failure cases and fuzz/property tests for the arithmetic.
- Document trust assumptions: which external contracts, oracles, and admin keys the system relies on and why.
- Freeze a commit and keep the audit branch stable — a moving target invalidates reviewed code.
- Keep a known-issues list: saves the auditors time reporting what you already know.
Beyond the Audit
An audit is a snapshot — the contract keeps running after it. The durable control is a vulnerability handling process: a disclosure channel for external reports, triage, remediation, and post-incident review. ISO/IEC 30111 is the international standard for exactly that process, and it matters beyond good practice: under the EU Cyber Resilience Act, a product with digital elements that includes contract code needs documented vulnerability handling, and under DORA a contract exploit is a reportable ICT incident for financial entities. For a lighter-weight pre-deployment check, run our Blockchain Compliance Checker — it flags common compliance and security gaps before you pay for auditor hours.
Frequently Asked Questions
Is an audit a guarantee the contract is safe?
No. An audit reduces risk — it is a bounded review of a specific commit, not a proof of correctness. Contracts have been exploited after multiple audits, usually through economic incentives or integration paths outside the audit scope. Combine audits with a vulnerability disclosure process and monitoring.
Should Soroban contracts be audited like Solidity contracts?
The process is the same — scope, analyze, report, remediate — but the checklist is not. Soroban/WASM contracts need reviewers fluent in Rust, the soroban-sdk authorization model, storage TTL semantics, and Stellar's account model. An EVM-only auditor will miss Soroban-specific classes of bugs.
What tools do auditors use?
On EVM: Slither and Mythril for static analysis, Foundry/Echidna for fuzzing, and symbolic execution for deep paths. On Soroban: cargo clippy, the soroban-sdk test environment, and property-based tests — plus manual review, which still finds most high-severity issues on both platforms.
When should the audit happen in the project timeline?
After feature freeze but before mainnet deployment — and again on the delta after significant changes. Auditing too early wastes the engagement on code that will be rewritten; auditing after launch means the review happened on code already holding funds.




