We manage your security to weather the AI storm →

← Resource Hub

Solidity Security Checklist: 75 Checks Before You Ship

By Daniel GelfandPublished 6 min read

Part of our guide to auditing a smart contract

Solidity Security Checklist: 75 Checks Before You Ship

Quick answer. No list covers every system, but this Solidity security checklist gives a 75-check pre-audit baseline across access control, external calls, math, integrations and upgrades. Each check names a finding category and the evidence to attach before reviewers start.

Watch: Solidity Security Checklist: 75 Checks Before You Ship 1:47
Video transcript

No checklist covers every system. This one gives you a seventy five check pre-audit baseline, and each check is tied to a finding category and the evidence to attach.

Solidity calls its own security recommendations incomplete, and ethereum dot org warns that audits do not catch every bug. That is why every row asks for evidence, not a tick.

The checks follow five attack surfaces: access control, external calls, math and accounting, oracles and integrations, then upgrades and deployment.

Log each check with its evidence and a status. A pass needs a second reviewer. A fail is an issue with an owner. Not tested goes to auditors, and not applicable needs a written reason.

In Guardian's Clanker review, extension authority stayed set during an ETH refund, so a creator-controlled recipient could reenter. That High finding is resolved, and check twenty three is the row that targets it.

In Guardian's Papertrade review, each division rounded down, yet summed reward obligations could exceed the reserve and block a claim. Checks thirty eight and forty two catch this with invariant tests.

Four gaps teams often miss. Check oracle freshness with updatedAt. Safe ERC twenty handles failure signals, not fees or rebases. Lock implementation initializers. And pin a released compiler, since nightly builds have no known bugs record.

Read the full article for all seventy five rows and the evidence each one needs. Then bring rows still marked fail or not tested to Guardian's smart contract audit, with two independent teams and fix review.

How to Use This Audit Checklist

Solidity's own security page calls its recommendations incomplete, and ethereum.org warns that audits do not catch every bug. So each row asks for evidence, not a tick.[1, 2]

Launch has its own pre-mainnet security checklist; logistics are in how to prepare for a smart contract audit.

Copy each check into your tracker under its own ID, with function, property, evidence, reviewer and status. The category is the finding class a failure would fall under.

  • Pass: evidence attached and checked by a second reviewer.
  • Fail: an open issue with an owner.
  • Not tested: flagged to auditors as an open question.
  • N/A: a written reason, such as no signatures in scope.

Access Control and Privileged Functions

Bug patterns behind these rows are in access control vulnerabilities in smart contracts.

In OpenZeppelin's AccessControl, a role's admin can grant and revoke it, so review admins too.[3]

Ownable2Step makes the new owner accept the transfer. Renouncing ownership leaves every onlyOwner function unusable.

ERC-2612 permits need a valid signature, the current nonce, a nonzero owner and an unexpired deadline. Success increments the nonce.[4]

IDCheckCategoryEvidence
01Inventory public, external and inherited entry pointsAccess ControlEntry-point list
02, 03Give each entry point a caller policy; test refusalsAccess ControlPermission matrix; negative tests
04Bind account and position IDs to their callerAccess ControlForeign-ID tests
05, 06Map each role's admin; test grant, revoke and rotationAccess ControlRole-admin map; lifecycle tests
07Check ownership acceptance and what renouncing disablesAccess ControlTransfer and renounce tests
08Review timelock proposers, executors and any bypassAccess ControlTimelock role list
09Bound privileged fee, cap and recipient changesValidationTests at each limit
10Verify pause and unpause permissions separatelyAccess ControlPause role tests
11Bind signatures to every authorized fieldSignature VerificationTyped-data spec
12, 13Consume nonces once; separate domains by contract and chainReplayReplay and cross-chain tests
14Reject expired, invalid and zero-owner authorizationsSignature VerificationNegative signature tests
15Never authorize with tx.originAccess ControlCode search

External Calls, Reentrancy and Callbacks

An external call can hand control away before your function finishes; see external call vulnerabilities in Solidity. Solidity's guidance says a called contract can change the state of other contracts you depend on.[1]

Guardian's Clanker review shows why check 23 matters (Main Review H-06, High, resolved). Extension authority stayed set during an ETH refund, so a creator-controlled recipient could reenter and drain protocol fees the core held.[5]

OpenZeppelin's transient guard needs EIP-1153 support. Solidity advises clearing transient locks when each call ends.[6, 7]

IDCheckCategoryEvidence
16List every external call, including token hooksReentrancyCall inventory
17Update state before handing over controlReentrancyCall-order review
18, 19Protect same-function, inherited and alternate entry pointsReentrancyReentry tests
20, 21Review shared state and views read mid-callReentrancyCross-contract state map
22Authenticate callback senders and expected contextAccess ControlDirect-call tests
23Clear temporary authority before refunds and failure callbacksReentrancyExceptional-path review
24Keep guards from blocking legitimate compositionReentrancyIntegration tests
25Confirm transient-storage support and lock cleanupConfigurationChain list; same-transaction tests
26Restrict delegated execution targetsAccess ControlAllowed-target list
27, 28Handle low-level call failure; validate and bound return dataValidationFailure and large-return tests
29Bound loops and batch workDoSMaximum-size gas tests
30Stop one recipient's failure blocking unrelated payoutsDoSReverting-recipient test

Math, Rounding and Accounting

Solidity integer division truncates toward zero. Division by zero still reverts inside unchecked blocks.[8]

Shifts are not overflow-checked, and checked arithmetic does not make narrowing conversions safe.

ERC-4626 requires its conversion functions to round down. Each preview must be no more favorable to the user than the matching operation in the same transaction.[9]

Guardian's Papertrade review shows what checks 38 and 42 catch. Each division rounded down, yet summed reward obligations could exceed the reserve and block a claim (M-03, Medium, resolved).[10]

Foundry invariant tests with ghost variables suit checks 38 to 45.[11]

IDCheckCategoryEvidence
31Document units and decimal scalesValidationUnits table
32Set a rounding direction for every operationRoundingRounding spec
33Handle every zero denominatorArithmeticZero-input tests
34Bound intermediate results, not only outputsArithmeticMaximum-value tests
35Justify every unchecked blockArithmeticComment per block
36, 39Check narrowing casts, shifts, signed boundaries and truncationArithmeticBoundary tests
37Set minimum amounts; handle zero-result conversionsRoundingDust-amount tests
38Compare split operations with one aggregate operationRoundingSplit-versus-whole fuzz test
40Reconcile assets, liabilities and reserved fundsAccountingSolvency invariant
41, 42Charge each fee once; keep reward obligations within fundingAccountingFee and reward invariants
43Keep parallel records consistentLogical ErrorSync invariant
44, 45Cover empty supply, first and last users, donations, deficits and final exitsAccounting, DoSEdge-state tests

Oracles, Tokens and Integrations

Chainlink documents updatedAt for freshness and marks answeredInRound deprecated. Heartbeat updates can lag, so set limits per application.[12, 13]

Chainlink's sequencer uptime example checks availability and a grace period but is not production code as supplied.[14]

ERC-20 callers must handle a false return, and decimals is optional. SafeERC20 handles failure signals, not fees or rebases.[15, 16]

Uniswap's v3 docs say fee-on-transfer tokens do not work with its routers. Other quirks are in our weird ERC-20 tokens checklist.[17]

OpenZeppelin warns against safeIncreaseAllowance and safeDecreaseAllowance while an ERC-7674 temporary allowance is nonzero.

ERC-4626 warns that vault previews may not suit price oracles.[9]

IDCheckCategoryEvidence
46Verify dependency addresses on every networkConfigurationAddress table per chain
47Verify price denomination and decimal normalizationValidationNormalization tests
48, 49Enforce freshness and acceptable answer ranges per feedOracleStale-price tests
50Define behavior when price data is unavailableDoSFailure-mode spec
51Handle sequencer outages and recovery where applicableOracleOutage tests
52Check whether a price input can move without a real change in valueOracleManipulation cost note
53Handle false and missing token return valuesIntegrationMock-token tests
54Support or exclude transfer-fee and rebasing tokens explicitlyAccountingToken allowlist or tests
55, 56Model callback tokens; document dependency pause and upgrade powersReentrancy, IntegrationDependency register
57, 58Review both allowance types; let permit fail, then check the real allowanceAccess Control, IntegrationAllowance and permit tests
59Distinguish vault conversions, previews and limitsIntegrationVault integration tests
60Enforce intended amounts, recipients and deadlinesValidationSlippage and deadline tests

Upgrades, Deployment and Configuration

Solidity publishes known bugs per compiler version and warns that an incompatible EVM target can produce incorrect or failing behavior.[18, 19]

OpenZeppelin recommends _disableInitializers in implementation constructors; see initializer vulnerabilities. Its plugins flag missing or repeated parent initializers but do not validate reinitializers by default.[20]

Current ERC1967Proxy rejects empty initialization data unless overridden, and UUPS implementations must restrict _authorizeUpgrade.[21]

IDCheckCategoryEvidence
61Freeze the review commit and a scope manifestConfigurationCommit and file list
62Pin dependencies, optimizer and build settingsConfigurationLockfile and build config
63Check known bugs for your exact compiler versionCompilerKnown-bugs review note
64Match the EVM target to each chainConfigurationPer-chain target table
65Resolve or justify every compiler warningCompilerClean build log
66, 67Guard initializers; run each parent initializer exactly onceAccess Control, Logical ErrorDouble-initialization tests
68Lock implementation initializersAccess ControlConstructor review
69Initialize each proxy in its deployment transactionAccess ControlDeployment script review
70Restrict every upgrade routeAccess ControlUnauthorized-upgrade tests
71, 72Validate storage layout; review reinitializers and migrationsUpgradeabilityLayout diff and migration tests
73, 74Assert script parameters, final roles, artifacts and proxy implementationConfigurationScript assertions; bytecode match
75Rerun all tests after every fixValidationCI run per fix

Take the open rows to an independent review

Guardian's smart contract audit puts two independent teams on one scope, with invariant fuzzing, human-verified findings and fix review. Bring the rows still marked Fail or Not tested.

Frequently Asked Questions

Can we run the compiler checks on a nightly Solidity build?

Not fully. Solidity's known-bugs list does not track unreleased or nightly versions, so check 63 has no record to compare against. Pin a released version for the build you send to review.[18]

Is a Chainlink sequencer uptime feed available on every L2?

No. Existing supported uptime feeds continue, but Chainlink says it has stopped expanding them to additional networks. On other chains, document how the protocol detects an outage, or mark check 51 N/A with a reason.[14]

Are the checks ranked by severity?

No. IDs follow attack surface, not risk. A failed row's rating depends on impact and likelihood in your system, as smart contract audit severity levels explains.

Sources

  1. Solidity: Security Considerations
  2. ethereum.org: Smart Contract Security
  3. OpenZeppelin: Access Control
  4. Ethereum Improvement Proposals: ERC-2612: Permit Extension for EIP-20 Signed Approvals
  5. Guardian: Clanker Protocol Review: H-06
  6. OpenZeppelin: Utils
  7. Solidity: Contracts
  8. Solidity: Types
  9. Ethereum Improvement Proposals: ERC-4626: Tokenized Vaults
  10. Guardian: Papertrade Protocol: M-03
  11. Foundry: Invariant Testing
  12. Chainlink: Data Feeds API Reference
  13. Chainlink: What are Chainlink Data Feeds?
  14. Chainlink: L2 Sequencer Uptime Feeds
  15. Ethereum Improvement Proposals: ERC-20: Token Standard
  16. OpenZeppelin: ERC20
  17. Uniswap: Token Integration Issues: official documentation source
  18. Solidity: List of Known Bugs
  19. Solidity: Using the Compiler
  20. OpenZeppelin: Writing Upgradeable Contracts
  21. OpenZeppelin: Proxy
  22. OpenZeppelin: ERC-4626
  23. Guardian: LayerZero Console EVM Updates: I-02
  24. Guardian: Smart Contract Audit Services