Shipping Safe Smart Contracts: A Solidity Security Checklist for Founders
A smart contract is software you can never patch. Once it holds value on mainnet, every bug is permanent and every attacker is a shareholder in your mistakes. This is the checklist we run before anything we build touches mainnet — written for founders who need to supervise the process without writing Solidity themselves.
1. The classic exploits, closed by construction
- Reentrancy. The attack that drained The DAO still tops the charts. Defence: checks-effects-interactions ordering plus reentrancy guards on every external call path. Ask your team to point to both.
- Access control. Every privileged function — mint, pause, upgrade, withdraw — needs explicit role checks, and roles need a multisig, not one founder's laptop key.
- Integer & rounding errors. Solidity ≥0.8 checks overflow, but rounding direction in fee math still leaks value. Insist on tests that prove where every wei goes.
- Oracle manipulation. Any price your contract reads can be pushed within one transaction. Time-weighted feeds (e.g., Chainlink) and sanity bounds are non-negotiable for anything DeFi-shaped.
2. Testing that goes beyond "it works"
Unit tests prove the happy path. Production confidence comes from adversarial testing:
- Fuzzing (Foundry) — thousands of random inputs hunting for the state nobody imagined.
- Invariant tests — properties that must always hold ("total shares equal total deposits"), checked across random action sequences.
- Fork tests — your contract exercised against real mainnet state, real tokens, real oracles.
- Static analysis (Slither) in CI, so known bug patterns can't be committed quietly.
Coverage percent is vanity. The question is: what did you try to break, and how hard?
3. The audit, used correctly
An external audit is a second set of adversarial eyes — valuable, but only on finished code. Auditing a moving target wastes the engagement. Freeze scope, deliver documentation and a threat model, triage every finding (fix or justify in writing), and publish the report. Serious users will ask for it; serious projects link it.
4. Launch like you expect trouble
- Deploy behind caps. Deposit limits for the first weeks turn a worst-case exploit into a bounded loss.
- Monitor on-chain. Alerts on abnormal flows, large withdrawals and privileged calls — you want to know before Twitter does.
- Have a pause plan. If the contract is pausable, rehearse who can trigger it and how fast. If it isn't, document why immutability was worth it.
- Run a bug bounty. Paying a researcher 50k beats losing 5M. Platforms like Immunefi make this routine.
The founder's summary
You don't need to read Solidity to hold a high bar. Ask five questions: Where are the reentrancy guards? Who holds the admin keys? What did fuzzing find? Where's the audit report? What's the incident plan? A team with crisp answers is a team you can ship with.
Launching on-chain?
We build audited, tested smart contracts — and the dApps around them.
Explore Web3 Services →