The pre-mainnet security checklist is 7 days of work that starts once the code is finished: match what you will deploy to what was reviewed, take power away from any single key, rehearse the deployment and get ready to stop the protocol within minutes. These are the smart contract security best practices that decide launch week, when the design is fixed and everything around it can still go wrong.
Your audit report covers a commit. Your launch ships bytecode, keys and a sequence of transactions, and none of those three is in the report.
Between October 2007 and September 2008, eight hospitals in eight cities, from Seattle to Ifakara, brought a 19-item checklist into the operating theatre. It taught nobody to operate. It made the team stop at three pause points: before anaesthesia, before the first incision and before the patient left the room.
The WHO says it can be completed in under 2 minutes. In the study that followed, the death rate went from 1.5% to 0.8% and complications from 11.0% to 7.0%.
Those surgeons already knew how to operate. The checklist was for the team around the skill.
Launch week is that pause. Work through this page from day 7 to launch day. Each day has one job, one owner and a plain test for done, and the week ends in a go/no-go that can hold the date.
Quick Answer
In the last 7 days before mainnet, stop changing code. Diff the deploy candidate against the audited commit, move every privileged role off personal keys, rehearse deployment on a fork, re-check the target chain, test the front end and secrets, time your pause, then hold a written go/no-go.
What should already be true before day 7?
Day 7 assumes the code is finished and reviewed. This list checks a launch, so it cannot stand in for the engineering behind one. If any line below is still open, close it first.
- The rules the protocol must never break are written down and tested with fuzzing.
- Static analysis runs clean, or each remaining warning has a written reason.
- The test suite passes on a machine that has never seen the repo.
- State updates come before external calls, and every state-changing function has a deliberate access rule.
- Forked code is listed, with the upstream version and each local change.
- A manual audit is finished, or booked against a frozen commit.
For line-level Solidity patterns, the Consensys field guide and the ethereum.org security guidelines are the standard references. For the review itself, read how to audit a smart contract, step by step.
Is a week enough if you have no audit yet?
No. A week is enough for this checklist and too short for most audits, because scope decides the timing. Our Adrena assessment took 5 weeks for 33,747 lines of Rust and 125 public instructions, then a separate fix review the following month.
The calendar is usually the real pressure. Teams at this stage ask us “When can we expect the report”, “3 weeks OK?”, and tell us “BD/liquidity efforts are dependent on the audit”. If that is you, there are three honest options:
- Move the date. It is the cheapest option on the list, even when it does not feel that way.
- Launch less. Ship the contracts that have been reviewed and hold the rest for a later release.
- Cap the risk. The Consensys guide’s wording is “Deploy on the mainnet in beta, with limits to the amount at risk”. Low caps limit the damage. They do not remove it, and users should be told what has not been reviewed.
Whichever you choose, put the launch date in the first message to your auditor. Our manual audits start at $5,000, and scope and timing are easier to settle with the real calendar on the table.
What does each of the 7 days cover?
Print this table, give each row to a named person, and tick it off in the launch channel. The sections below cover each row.
| Day | The job | Owner | Done means | Why it is here |
|---|---|---|---|---|
| 7 | Match the deploy candidate to the audited commit | Lead dev | Diff read, every finding has a status | A report can describe code that is not running |
| 6 | Remove single-key power | Founder and signers | Role table signed off, deployer holds nothing | bZx, 2021. Radiant, 2024 |
| 5 | Rehearse the deployment on a fork | Lead dev | Script run twice, every gap between transactions reviewed | Sonne, 2024. Proxy takeovers, 2025 |
| 4 | Re-check the target chain | Lead dev | Addresses, opcodes and gas behaviour confirmed for this chain | Gemholic, 2023 |
| 3 | Test everything around the contracts | Whoever owns DNS, cloud and CI | Secrets scanned, access keys listed, approvals limited | Badger, 2021. Our Yimmit test, 2026 |
| 2 | Time your stop | Founder and on-call dev | Pause rehearsed and timed, alerts firing | Sonne, again: 25 minutes |
| 1 | Hold the go/no-go | Founder | A written decision | The date should have to earn it |
| 0 | Deploy and read it back | Lead dev, signers watching | Chain state matches the role table | An explorer label can be wrong |
Day 7: does the deploy candidate match the audited commit?
You can answer this in a minute. Take the commit hash printed in your audit report and compare it with the branch you plan to deploy.
# The hash in your audit report, against your release branch.
# Use your contracts folder: src/ in Foundry, contracts/ in Hardhat.
git diff --stat <audited-commit> <release-commit>, src/
An empty diff is the best result of the week. Anything else needs sorting. Our co-founder Greg Bock drew the line in when an audit actually expires: UI updates, gas optimisations and non-sensitive refactors usually do not need a fresh look. Changed invariants, role logic, new external calls, new trust dependencies and custody logic do.
If your diff touches that second list, send it to your auditor today. At Fidesium an edit to an in-scope file is a delta review of the diff, quoted small. It is a far easier conversation on day 7 than on day 1.
Then give every finding in the report a status: fixed and verified, or accepted in writing by a named person. From today the only merges are fixes for this list. A report whose hash no longer matches your deployed bytecode describes code that is not running, and almost nobody checks.
Day 6: can any single key still move the protocol?
It must not, and the proof is a table. Write down every privileged role and the address that will hold it on launch day.
| Role | Holder on launch day | Delay |
|---|---|---|
| Upgrades, proxy admin | Multisig, on separate devices | A timelock long enough for users to exit |
| Parameters, fees, oracle settings | Multisig | Timelock |
| Minting and treasury | A separate multisig | Timelock or a spend limit |
| Pause | A small guardian group that can only pause | None |
| Deployer | Nothing | Retired after launch |
The deployer row matters most, because deployers tend to keep their powers by accident.
In November 2021 a bZx developer opened a Word document carrying a malicious macro on his personal computer. On Ethereum the protocol was governed by a DAO and stayed safe. bZx’s own account says the BSC and Polygon administrative keys “have not yet been transferred to the DAO”, so both deployments were drained. The attacker then upgraded the contracts to reach users who had given them unlimited approvals.
A multisig alone does not finish the job.
In October 2024 Radiant Capital lost about $50M with hardware wallets in place. Its post-mortem says malware on at least three developers’ devices made Safe display legitimate data while malicious transactions went to the wallets. Each transaction had been simulated and reviewed. The main warning was a few ordinary-looking errors that prompted signers to try again.
So write these rules down before day 0:
- Signers read the decoded call on the hardware wallet. Blind signing is off for anything privileged.
- Each signer confirms the transaction hash on a second, separate device.
- A failed signature gets investigated, never just retried.
- Nobody opens a meeting link or a file from an unexpected message this week. In July I wrote up a lure aimed at me: a known contact, a low-key Telegram opener and a link dressed as a Microsoft Teams invite.
Day 5: have you rehearsed the deployment, step by step?
Run the full deployment on a mainnet fork, twice, using the exact script, parameters and signers you will use on the day. Then treat the order of operations as code. Ask of every gap between two transactions what a stranger can do in it.
Sonne Finance knew about the donation attack on Compound v2 forks. Its routine was to add a market at a 0% collateral factor, supply collateral, then raise the factor. For its VELO markets in May 2024 it queued the steps behind a 2-day timelock.
Its post-mortem gives the detail that decided it: “Our multisig execution is not permissionless Base, but permissionless on Optimism.” When the timelock ended, the attacker executed the transactions and took about $20M.
The same gap exists inside a proxy deployment. In July 2025 Dedaub reported attackers front-running the initialisation of proxies across 7 chains. They placed a contract of their own in the middle, the owner’s initialisation still succeeded, and the intruder sat quietly for weeks. The fix is to leave no gap, as Nethermind’s write-up spells out: pass the initialiser to the proxy constructor.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import {VaultV1} from "./VaultV1.sol";
contract DeployVault {
event VaultDeployed(address indexed proxy, address indexed implementation);
function deploy(address multisig) external returns (address proxy) {
VaultV1 implementation = new VaultV1();
bytes memory init = abi.encodeCall(VaultV1.initialize, (multisig));
// The proxy constructor runs initialize, so no block ever sees it uninitialised.
proxy = address(new ERC1967Proxy(address(implementation), init));
emit VaultDeployed(proxy, address(implementation));
}
}
VaultV1 stands in for your own upgradeable contract, with an initialize(address) function. Three more checks for today:
- Nothing is typed by hand on the day. Every step lives in the script.
- A second person reads every constructor argument and starting parameter against the values the audit assumed.
- Any market or vault that opens empty gets seeded before anyone else can reach it.
Day 4: is the chain you are deploying to the chain you tested on?
Often it is not, so check each difference on purpose. Tests on one chain carry assumptions that may not hold on another.
In April 2023 a team called Gemholic raised 921 ETH on zkSync Era and could not withdraw it. The Block reported that its contract used .transfer(), which depends on a 2,300 gas stipend, and that zkSync said the team had not tested on a testnet or local node first. zkSync’s team later built a fix, a rescue no launch plan should rely on.
| Check | What goes wrong |
|---|---|
| Every oracle, token, router and bridge address | A correct address on one chain is the wrong contract, or nothing, on another |
block.number | On Arbitrum it returns an approximate parent-chain block, so delays counted in blocks drift |
The evmVersion in your build | A chain behind Ethereum may not support every opcode the build emits |
| Gas and native transfers | Fixed stipends and hardcoded gas amounts can fail on chains that meter gas differently |
| Library and dependency versions | The lockfile has to match what the auditor read |
If you plug into another protocol, that is a list of its own: see our protocol integration security checklist.
Day 3: what can reach your users without touching your contracts?
Your front end, DNS, APIs, CI and secrets can all reach them. In late 2021 an attacker used an unauthorised Cloudflare API key to inject a script into BadgerDAO’s app, on and off for weeks. It asked users to approve a foreign address on their tokens. The first malicious approval came on 20 November and the drain on 2 December.
We see the same shape in our own work. Our test of Yimmit Exchange, a custodial exchange rather than a contract system, raised 95 findings across 3 rounds. The most serious was a public Fireblocks deposit webhook that credited balances straight from the request body. Three of the 6 Critical findings were committed secrets, and the report says it plainly: “None of the three secrets findings was a code defect.”
Today’s list:
- Scan the whole git history for secrets, not only the working tree. Rotate anything you find, because deleting a file leaves it in history.
- List every API key on your DNS, CDN, cloud and CI accounts. Delete any nobody can explain.
- Lock the domain at the registrar and put hardware-key MFA on the account.
- Make the front end ask for exact approvals by default, so a breach has less to drain.
- Pin front-end dependencies and read the lockfile diff. An npm package swap is a realistic launch-week failure.
This is a self-check, not a penetration test. A proper blockchain penetration test takes longer than the days you have left, so book one for the weeks after launch if today’s list turns up anything uncomfortable.
Day 2: how fast can you stop the protocol?
Measure it with a stopwatch, because the number decides how much you lose. Sonne’s post-mortem says the team became aware of its exploit 25 minutes after it happened. By then about $20M was gone.
Seal contributors noticed the issue fast and saved the remaining $6.5M or so by adding about $100 worth of VELO to the markets. That is what minutes are worth.
- Rehearse the pause on a fork. Use the real guardians, in their real time zones, and time it from first alert to confirmed pause.
- Turn alerts on before the first deposit. Cover role changes, upgrades, large outflows and oracle moves. Ours are custom detection bots tuned to the protocol’s logic, and here is a worked example of what that catches.
- Write the plan on one page. Name who calls whom, who decides and who speaks in public. Draft the first incident message now, while you are calm.
- Save the numbers. Your auditor, your bridge and exchange contacts, and SEAL 911, a free, around-the-clock emergency hotline run by the Security Alliance.
- Publish a bug bounty scope. Give finders a paid route that starts on launch day. Bug bounty or audit covers what each one does.
Day 1: is it go or no-go?
Hold a 30-minute call, read each gate aloud, and write down the answer. One no holds the launch, and the founder signs the decision.
| Gate | Go | No-go |
|---|---|---|
| Code | Candidate matches the audited commit, or the delta was reviewed | Any unreviewed change to role logic, invariants or external calls |
| Findings | Every finding has a status | A Critical or High with no fix review and no named owner |
| Keys | Deployer holds nothing after launch, signers have rehearsed | Any one key can upgrade, mint or move funds |
| Deployment | Run twice on a fork, no manual steps | A step nobody has rehearsed |
| Stop | Pause timed, alerts seen firing | Nobody named on call for the first 48 hours |
| Exposure | Deposit caps set, with a plan to raise them | Uncapped on launch day, for no stated reason |
A date that slips costs you a week of business development. Whoever says no on this call should be thanked for it, and that habit has to start with the founder.
Launch day: how do you prove what went live?
Read it back from the chain, not from your script’s log or an explorer label. Dedaub found that the 2025 proxy intruders stored a different address in a slot used by an older OpenZeppelin standard, which fooled Etherscan into showing the expected implementation. So read the EIP-1967 slots yourself. These Foundry commands were checked against the docs in October 2026:
export ETH_RPC_URL=<your-rpc-url>
export ETHERSCAN_API_KEY=<your-key>
PROXY=0xYourProxy
IMPL=0xYourImplementation
DEPLOYER=0xYourDeployer
# Must print $IMPL. This reads the EIP-1967 slot, not a label.
cast implementation $PROXY
# Must print the expected admin. A UUPS proxy shows the zero address.
cast admin $PROXY
# Must print your multisig.
cast call $PROXY "owner()(address)"
# If you use AccessControl, this must print false.
cast call $PROXY "hasRole(bytes32,address)(bool)" \
0x0000000000000000000000000000000000000000000000000000000000000000 $DEPLOYER
# Compares the deployed bytecode with your local build.
forge verify-bytecode $IMPL src/VaultV1.sol:VaultV1
Run this with the signers watching, then walk the day 6 role table line by line against what the chain says. Publish every address next to the audit report, so users can check the same things you did. Keep the caps on until the first alerts have proved themselves.
What happens after launch day?
The report starts to age with your next merge. As Greg put it, “An audit does not fail overnight. It expires quietly.”
That is why this checklist should end in a habit: every later release gets its own day 7 diff, and the same go/no-go gates apply. Our manual audits include a month of continuous scanning for that first stretch. A checklist is a pause. Security is a process.
Frequently asked questions
What are the most important smart contract security best practices before launch?
Keep changes out of the audited code, remove single-key control, rehearse the deployment and be able to pause quickly. Underneath those sit the engineering basics: written invariants, fuzzing, static analysis and a manual review. Launch week checks the things those basics do not cover.
Can I launch on mainnet without an audit?
Nothing stops you, but you are asking users to carry a risk nobody has measured. If the date cannot move, ship less, cap deposits, tell users what is unreviewed and get the review booked. An audit is no guarantee either. It is one independent reading of one commit.
How far ahead should I book a smart contract audit?
Count back from the launch date: this 7-day week, time for your team to fix findings, the fix review, the review itself and a scoping call. Scope sets the length of the review, so ask before the code freeze rather than after it.
Does this checklist work for Solana programs?
The jobs are the same and the commands differ. The upgrade authority replaces the proxy admin, so check it with solana program show and move it to a multisig such as Squads. solana-verify does the job of bytecode verification.
Is this the same as a smart contract audit checklist?
No. An audit checklist asks whether the code is right, and it is what your auditor works through. This one asks whether the launch around that code is safe to run, and your own team works through it. You need both, in that order.
Before you send it to mainnet, send it to someone who will read it
The week comes down to four questions. Is this the code that was reviewed? Can one key move it? Has the deployment been rehearsed? Can you stop it?
If day 7 turned up a diff, or you reached this page with no audit at all, a second reading is the natural next step.
Fidesium’s manual audits start at $5,000 and cover line-by-line review, logic and economic risk, 2 rounds of fix verification, a public report with badge and NFT, and a month of continuous scanning. You get the core team, and you can read 23 of our signed reports before you decide.
Request a quote with your repo and commit, the chain, the launch date and anything you forked.



