A checklist does not replace judgment, but it stops the common audit failure, which is forgetting a whole category because one dramatic bug ate the day. This sub-skill belongs to smart-contract-audit, which owns the overall audit method, and it supplies the repeatable per-category checks, the evidence to record for each one, and the retest step that confirms a fix. Work only on contracts you are authorized to review, on testnets or local forks, never against live contracts you do not own.
Quick Workflow
- Freeze the scope: commit hash, contract list, deployment scripts, and the threat model, then record them in the report header.
- Run the automated pass first: compile cleanly, run Slither, and list every high and medium finding before reading code line by line.
- Work the checklist category by category: access control, reentrancy, arithmetic and rounding, oracle and price use, token standards, upgradeability, and denial of service.
- For each checklist item, record the verdict (pass, fail, or not applicable) plus the file, function, and line that proves it.
- Turn every fail into a finding with severity, a concrete exploit path, and a fix, not a vague warning.
- Write a proof of concept on a local fork for every high finding, and for any medium finding whose impact is disputed.
- Check the fix against the same checklist item that failed, and re-run the automated pass to catch regressions.
- Sign off only when every applicable item has a verdict and every high finding is fixed or formally accepted in writing.
1. Automated pass and triage
# Compile first, because a project that does not compile cleanly hides findings
cd /tmp/audit/target-project
forge build
slither . --exclude-dependencies > /tmp/audit/slither.txt 2>&1
grep -i "HIGH\|MEDIUM" /tmp/audit/slither.txt | head -40
# List every state changing function so the manual pass cannot skip one
grep -rn "function " contracts/ --include="*.sol" \
| grep -v "view\|pure" | head -60
# For each function, ask who can call it, what state it changes,
# and what happens if it is called twice or out of order
2. Access control checklist
// Check every privileged function for a modifier, and check the
// modifier itself, not just its presence. Ask three questions.
// 1. Who holds the role today, and can that holder change?
// 2. Is there a timelock or multisig between the role and the action?
// 3. Can the role be renounced, transferred, or bricked by accident?
function setFee(uint256 newFee) external onlyOwner {
fee = newFee;
}
// A finding here is not "onlyOwner exists". It is the answer to
// what an owner compromise costs, and whether one key can drain funds.
# Find roles and their holders in code and on chain (fill addresses)
grep -rn "onlyOwner\|onlyRole\|hasRole\|msg.sender" contracts/ --include="*.sol" | head -40
cast call $TOKEN "owner()" --rpc-url $RPC_URL
cast call $VAULT "getRoleMemberCount(bytes32)" 0x0000000000000000000000000000000000000000000000000000000000000000 --rpc-url $RPC_URL
3. Reentrancy and checks-effects-interactions
// FAIL pattern: external call before state update lets the caller
// re-enter and withdraw twice. The fix is state first, call last,
// plus a reentrancy guard on every function that moves funds.
function withdraw(uint256 amount) external {
require(balances[msg.sender] >= amount, "insufficient");
balances[msg.sender] -= amount;
(bool ok, ) = msg.sender.call{value: amount}("");
require(ok, "transfer failed");
}
# Foundry proof of concept shape for a suspected reentrancy bug
# Write a test contract whose receive function calls withdraw again,
# assert the vault balance after the attack, and run it on a fork
forge test --match-test testReentrancyDrainsVault -vvv
4. Arithmetic, rounding, and token standards
#!/usr/bin/env python3
"""Rounding checklist for share and price math, worked in plain Python."""
# For a vault, check these cases by hand before trusting the code.
# 1. First depositor with a tiny deposit (share inflation attack).
# 2. A deposit of 1 wei and a withdrawal of 1 wei.
# 3. Division before multiplication, which truncates toward zero.
# 4. A fee that rounds to zero for small amounts, or to everything.
total_assets, total_shares = 1000, 1000
for deposit in (1, 10, 999):
shares = deposit * total_shares // total_assets if total_assets else deposit
print(f"deposit {deposit} mints {shares} shares")
print("flag it if the first deposit can mint shares for almost nothing")
# Token standard checks: return values, decimals, and approval races
grep -rn "transfer(\|transferFrom(\|approve(" contracts/ --include="*.sol" | head -40
# Confirm each ERC20 call handles tokens that return no boolean,
# each amount uses the token decimals, and allowances are not
# blindly set to the maximum without a documented reason
5. Upgradeability and admin key retest
# Proxy checklist: implementation, admin, and timelock, read on chain
cast call $PROXY "implementation()" --rpc-url $RPC_URL
cast call $PROXY "admin()" --rpc-url $RPC_URL
cast call $TIMELOCK "getMinDelay()" --rpc-url $RPC_URL
# A proxy whose admin is a single key with no timelock is a finding
# even if the implementation code is clean, because the code can change
Edge cases
- A checklist item marked not applicable needs a one line reason, or the next auditor will assume it was skipped.
- Slither false positives are normal; confirm each one by reading the code, and record the confirmation, do not just delete the line.
- Upgradeable contracts need the checklist re-run after every upgrade, because a clean implementation behind a weak proxy is still weak.
- Contracts that compose with other protocols inherit those protocols' risks; check the external calls, not just the local code.
- A fix that adds a guard in one function can break an invariant in another; re-run the full automated pass after every fix.
- Time-dependent logic (deadlines, vesting, voting periods) needs boundary tests at exactly the deadline, one second before, and one second after.
Key references
1---2name: smart-contract-audit-checklists3description: Use when auditing a Solidity contract and you need a repeatable checklist that covers access control, reentrancy, arithmetic, oracle use, upgradeability, and token standards before sign-off. Use when triaging Slither output, preparing an audit report, or checking a fix against the original finding so nothing regresses.4version: "1.0.0"5domain: blockchain6lifecycle: stable7last_verified: "2026-10-27"8parent: smart-contract-audit9requires: [smart-contract-audit]10extends: []11relates: [defi-threats, bridge-attacks, dao-governance-risks]12tools:13 - name: Python14 version: "3.12"15 - name: Slither16 version: "0.11.0"17 - name: Foundry18 version: "1.0.0"19 - name: Solidity compiler20 version: "0.8.28"21metadata:22 source: https://skillmd.com/skills/mizazhaider-ceh/smart-contract-audit-checklists23---2425A checklist does not replace judgment, but it stops the common audit failure, which is forgetting a whole category because one dramatic bug ate the day. This sub-skill belongs to smart-contract-audit, which owns the overall audit method, and it supplies the repeatable per-category checks, the evidence to record for each one, and the retest step that confirms a fix. Work only on contracts you are authorized to review, on testnets or local forks, never against live contracts you do not own.2627## Quick Workflow28291. Freeze the scope: commit hash, contract list, deployment scripts, and the threat model, then record them in the report header.302. Run the automated pass first: compile cleanly, run Slither, and list every high and medium finding before reading code line by line.313. Work the checklist category by category: access control, reentrancy, arithmetic and rounding, oracle and price use, token standards, upgradeability, and denial of service.324. For each checklist item, record the verdict (pass, fail, or not applicable) plus the file, function, and line that proves it.335. Turn every fail into a finding with severity, a concrete exploit path, and a fix, not a vague warning.346. Write a proof of concept on a local fork for every high finding, and for any medium finding whose impact is disputed.357. Check the fix against the same checklist item that failed, and re-run the automated pass to catch regressions.368. Sign off only when every applicable item has a verdict and every high finding is fixed or formally accepted in writing.3738## 1. Automated pass and triage3940```bash41# Compile first, because a project that does not compile cleanly hides findings42cd /tmp/audit/target-project43forge build44slither . --exclude-dependencies > /tmp/audit/slither.txt 2>&145grep -i "HIGH\|MEDIUM" /tmp/audit/slither.txt | head -4046```4748```bash49# List every state changing function so the manual pass cannot skip one50grep -rn "function " contracts/ --include="*.sol" \51 | grep -v "view\|pure" | head -6052# For each function, ask who can call it, what state it changes,53# and what happens if it is called twice or out of order54```5556## 2. Access control checklist5758```solidity59// Check every privileged function for a modifier, and check the60// modifier itself, not just its presence. Ask three questions.61// 1. Who holds the role today, and can that holder change?62// 2. Is there a timelock or multisig between the role and the action?63// 3. Can the role be renounced, transferred, or bricked by accident?64function setFee(uint256 newFee) external onlyOwner {65 fee = newFee;66}67// A finding here is not "onlyOwner exists". It is the answer to68// what an owner compromise costs, and whether one key can drain funds.69```7071```bash72# Find roles and their holders in code and on chain (fill addresses)73grep -rn "onlyOwner\|onlyRole\|hasRole\|msg.sender" contracts/ --include="*.sol" | head -4074cast call $TOKEN "owner()" --rpc-url $RPC_URL75cast call $VAULT "getRoleMemberCount(bytes32)" 0x0000000000000000000000000000000000000000000000000000000000000000 --rpc-url $RPC_URL76```7778## 3. Reentrancy and checks-effects-interactions7980```solidity81// FAIL pattern: external call before state update lets the caller82// re-enter and withdraw twice. The fix is state first, call last,83// plus a reentrancy guard on every function that moves funds.84function withdraw(uint256 amount) external {85 require(balances[msg.sender] >= amount, "insufficient");86 balances[msg.sender] -= amount;87 (bool ok, ) = msg.sender.call{value: amount}("");88 require(ok, "transfer failed");89}90```9192```bash93# Foundry proof of concept shape for a suspected reentrancy bug94# Write a test contract whose receive function calls withdraw again,95# assert the vault balance after the attack, and run it on a fork96forge test --match-test testReentrancyDrainsVault -vvv97```9899## 4. Arithmetic, rounding, and token standards100101```python102#!/usr/bin/env python3103"""Rounding checklist for share and price math, worked in plain Python."""104# For a vault, check these cases by hand before trusting the code.105# 1. First depositor with a tiny deposit (share inflation attack).106# 2. A deposit of 1 wei and a withdrawal of 1 wei.107# 3. Division before multiplication, which truncates toward zero.108# 4. A fee that rounds to zero for small amounts, or to everything.109total_assets, total_shares = 1000, 1000110for deposit in (1, 10, 999):111 shares = deposit * total_shares // total_assets if total_assets else deposit112 print(f"deposit {deposit} mints {shares} shares")113print("flag it if the first deposit can mint shares for almost nothing")114```115116```bash117# Token standard checks: return values, decimals, and approval races118grep -rn "transfer(\|transferFrom(\|approve(" contracts/ --include="*.sol" | head -40119# Confirm each ERC20 call handles tokens that return no boolean,120# each amount uses the token decimals, and allowances are not121# blindly set to the maximum without a documented reason122```123124## 5. Upgradeability and admin key retest125126```bash127# Proxy checklist: implementation, admin, and timelock, read on chain128cast call $PROXY "implementation()" --rpc-url $RPC_URL129cast call $PROXY "admin()" --rpc-url $RPC_URL130cast call $TIMELOCK "getMinDelay()" --rpc-url $RPC_URL131# A proxy whose admin is a single key with no timelock is a finding132# even if the implementation code is clean, because the code can change133```134135## Edge cases136137- A checklist item marked not applicable needs a one line reason, or the next auditor will assume it was skipped.138- Slither false positives are normal; confirm each one by reading the code, and record the confirmation, do not just delete the line.139- Upgradeable contracts need the checklist re-run after every upgrade, because a clean implementation behind a weak proxy is still weak.140- Contracts that compose with other protocols inherit those protocols' risks; check the external calls, not just the local code.141- A fix that adds a guard in one function can break an invariant in another; re-run the full automated pass after every fix.142- Time-dependent logic (deadlines, vesting, voting periods) needs boundary tests at exactly the deadline, one second before, and one second after.143144## Key references145146- Slither documentation and detectors: https://github.com/crytic/slither147- Foundry book, forge and cast reference: https://getfoundry.sh/148- OpenZeppelin Contracts documentation: https://docs.openzeppelin.com/contracts/149- Solidity documentation, security considerations: https://docs.soliditylang.org/150- Ethereum smart contract security best practices: https://consensys.github.io/smart-contract-best-practices/