SKIP TO CONTENT
HIRING6 minHiring for Production / Ep. 2 · Stage 2-2

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?

XIN

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.
External calls
What can another contract see or change during this call?
A concrete reentrancy analysis, why state updates come in that order, and a test.
System properties
What must stay true after any sequence of user actions?
A protocol-specific invariant, explicit preconditions and a test setup that reaches meaningful states.
Upgrade authority
What changes when the implementation is replaced?
Reasoning on initialization and storage, compatibility checks, and who can authorize the upgrade.
Deployment verification
How do we show the deployed system is the reviewed one?
Pinned build inputs, verified source, recorded addresses and constructor or initializer arguments, then role checks.

IN PLAIN WORDS

Row 1 is about reentrancy: another contract calls back into yours before your first call ends. The danger comes when your records are not yet up to date. The Solidity docs explain the checks-effects-interactions pattern: check, update your records, then call other contracts.

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

  1. A fuzzer (a test tool) runs random deposits and withdrawals.
  2. After each call, it compares the vault’s balance with its records.
  3. 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

  1. The vault records 100 but receives 99 after the fee.
  2. The test still passes: it only ever used the plain mock.
  3. 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

Flow diagram: 6 stepsFlow diagram: 6 steps. Pin the scope, then Write the design. Write the design, then Test. Test, then Plan upgrade and deploy. Plan upgrade and deploy, then Hand off to the reviewer. Hand off to the reviewer, then After the review.1Pin the scope2Write the design3Test4Plan upgrade and deploy5Hand off to the reviewer6After the review

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.

Pick a step to see it move
  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.
  2. Write the design Intended behavior, asset flows, a role matrix, trust assumptions and outside dependencies.
  3. Test Unit tests, refused-permission cases, the fuzz or invariant tests that fit, and how to reproduce a failure.
  4. Plan upgrade and deployment Initializer arguments, storage assumptions, admin transfers and checks against the reviewed build.
  5. Hand off to the reviewer Known issues, questions for the auditor, who fixes findings, and the changes that need another review.
  6. 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.
Six steps from scope to deployment. List them in the statement of work: both sides then know when prep is done.

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

Audit prep, the independent review and the go-ahead to deploy are three separate things.

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

Adam Boudjemaa
Adam Boudjemaa

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 role

My 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.