Testing a Solidity Developer: Interview and Audit Prep
A candidate’s tests all pass. What could they still miss, and what should you get before the audit?
IN 30 SECONDS
A good Solidity interview is a talk about a small code sample and what its tests could miss. An audit-ready delivery then lets a reviewer start without guessing; it does not mean audited.
KEY TAKEAWAYS · 3
- Judge a Solidity developer on permissions, tests and deployment, not on contract counts alone.
- Ask what the tests could miss, not just for a coverage figure.
- Audit preparation, the independent review and deployment checks are separate deliverables. Audit-ready never means audited.
On this page
Four questions for the technical interview
IN SHORT Hand over a small code sample (no client code needed) and ask the candidate what they would change.
WORDS TO KNOW
- Invariant
- A property that must stay true whatever users do, such as “the contract never owes more than it holds.”
- Independent audit
- A security review of one fixed version of the code, by people who did not write it.
- Audit-ready
- Code and documents a reviewer can start on without guessing: pinned version, design, tests, deployment plan. It does not mean audited.
IN PLAIN WORDS
Foundry, a Solidity test kit, explains invariant testing across random call sequences. Both docs are good anchors for the interview. Neither proves that a given contract is safe.
An Invariant A property that must stay true whatever users do, such as “the contract never owes more than it holds.” See the glossary test only checks the cases its setup can reach, so ask what it could miss. A good candidate names a state the test can’t reach, a token behavior it doesn’t model or an outside service. That answer beats a coverage figure on its own.
Coming up next: What does a test that misses look like?
A worked example: the test that passed
IN SHORT A green invariant test can still miss a token behavior it never modeled.
The vault, the token and the amounts below are made up. A vault is a contract that holds deposits. ERC-20 is the usual token standard.
A WORKED EXAMPLE
Illustrative numbers
PASSA deposit vault, tested with a plain token
INPUT
- Token in the test
- plain ERC-20 test token (a mock)
- Invariant
- tokens held ≥ deposits recorded
- Alice deposits
- 100
WHAT HAPPENS
- A fuzzer (a test tool) runs random deposits and withdrawals.
- After each call, it compares the vault’s balance with its records.
- Held 100, recorded 100: the property holds.
OUTPUT
- Invariant
- holds
- Test
- passes
MISSEDSame test, but the live token keeps a 1% fee on each transfer
INPUT
- Token in production
- fee-on-transfer token
- Alice deposits
- 100
WHAT HAPPENS
- The vault records 100 but receives 99 after the fee.
- The test still passes: it only ever used the plain mock.
- Alice asks to withdraw 100. The vault holds 99, so the call fails (it reverts).
OUTPUT
- Invariant
- broken in production
- Fix
- count what the vault really receives, or refuse such tokens
Coming up next: So what should reach the auditor?
What an audit-ready delivery contains, step by step
IN SHORT Audit-ready Code and documents a reviewer can start on without guessing: pinned version, design, tests, deployment plan. It does not mean audited. See the glossary means a reviewer can start without guessing. It does not mean audited, and it certainly does not mean free of vulnerabilities.
STEP BY STEP
Step 1. Pin the scope. Record the commit (the exact saved version of the code), contracts in scope, compiler and dependency versions, build commands and exclusions.
- Pin the scope Record the commit (the exact saved version of the code), contracts in scope, compiler and dependency versions, build commands and exclusions.
- Write the design Intended behavior, asset flows, a role matrix, trust assumptions and outside dependencies.
- Test Unit tests, refused-permission cases, the fuzz or invariant tests that fit, and how to reproduce a failure.
- Plan upgrade and deployment Initializer arguments, storage assumptions, admin transfers and checks against the reviewed build.
- Hand off to the reviewer Known issues, questions for the auditor, who fixes findings, and the changes that need another review.
- After the review A material change after the review should get an explicit decision about another review. Deployment approval stays separate from accepting the delivery.
Book the Independent audit A security review of one fixed version of the code, by people who did not write it. See the glossary against an agreed scope.
The go-ahead to deploy belongs to the team that will run the system: it must know what it is signing off.
ITEM GET
Ready is not audited
Solidity developer hiring questions
No. Development builds the system; an independent audit reviews a set version and scope, usually at a pinned commit. Tests and audit prep help, but they don’t replace that review and can’t promise the code has no security flaws.
Adam is open to talking about Solidity missions and senior engineering roles. His work covers ERC-3643, tokenization and modular smart accounts. To check the fit, share the target chain, the state of your repo, the role and the timing.
STAGE CLEAR
What you now know
- Why “what could your test miss?” beats a coverage figure alone, as the fee token shows.
- What an audit-ready delivery holds, and why it is not an audit.
Check yourself
Tap or click a question to see the answer.
Illustrative case: after the audit, the team changes who can grant the pause role. The change is 10 lines long. Does the audit still cover the deployed code?
No. The audit reviewed a pinned version. A change to who holds power changes the reviewed design, so it should get an explicit decision about another review, recorded before deployment.
You finished every stage published so far in this series. Back to the series map
Web3 x AI engineer, former CTO of Integra. Named author (1 of 5) of ERC-3643, first author of ERC-6960, co-author of ERC-7410, and co-author of ERC-8203, which is still a draft.
Have a project to ship or a role to fill?
Discuss your project or roleMy work at the web3 x AI intersectionOpen-source tools I build
Follow the engineering notes
Get new articles on production AI and smart contracts by email.