The interviewer asks: "Explain the reentrancy attack. How did it affect The DAO, and what is the correct fix at the code level?" Which answer is most precise?
Option B is strongest. It explains the attack with a step-by-step operation order (check → send → update state), making the race condition precise. The DAO context (2016, $60M) anchors the severity. The code example for CEI shows the pattern in actual Solidity syntax — most candidates describe CEI without demonstrating it in code. The three fixes are presented in order of preference with specific implementation details: CEI with code, OpenZeppelin ReentrancyGuard with gas cost (~2200 gas for SSTORE — showing EVM-level awareness), and pull payments with the security rationale. The cross-function reentrancy section is the crucial advanced point: CEI alone does not protect against attacks that span two functions, requiring ReentrancyGuard on all affected functions. Reentrancy vocabulary:Checks-Effects-Interactions (CEI) — the pattern of checking conditions, updating state, then making external calls. Mutex (ReentrancyGuard) — a boolean lock preventing re-entry into protected functions. Fallback / receive function — the Solidity function called when a contract receives ETH. Cross-function reentrancy — a reentrancy attack that exploits two functions sharing state. Pull payments pattern — letting users withdraw funds themselves rather than pushing ETH to them. Options C and D are accurate but lack the code-level CEI example and the cross-function reentrancy nuance.
2 / 14
The interviewer asks: "What is a flash loan attack and how do attackers use them to manipulate price oracles?" Which answer is most complete?
Option B is strongest. The flash loan definition precisely captures the key property: atomicity — if not repaid, the entire transaction reverts, making them risk-free to offer. The oracle attack mechanism is explained step-by-step (5 steps) with the constant product formula reference (x*y=k) explaining WHY the AMM price moves dramatically from a large swap. The bZx hack is the correct reference (2020, $350K, two transactions) — a real example demonstrating real impact. The three defences are presented with the exact protection mechanism: TWAP uses a 30-minute window, and a flash loan only affects one block (12 seconds), so manipulating the TWAP requires sustained capital across many blocks (quantified economic infeasibility). Chainlink's defence is explained as architectural (off-chain aggregation), not just "use a better oracle." Flash loan vocabulary:Atomic transaction — a transaction where all operations succeed or all revert. AMM (Automated Market Maker) — a smart contract that maintains liquidity using a mathematical formula (x*y=k). Spot price — the current instantaneous price from an AMM based on current pool reserves. TWAP (Time-Weighted Average Price) — an oracle price computed as the average over a time window. bZx — a DeFi lending protocol exploited in the first major flash loan attack in 2020. Options C and D are accurate but lack the step-by-step attack mechanism and the TWAP economic infeasibility explanation.
3 / 14
The interviewer asks: "What are the most common access control vulnerabilities in smart contracts and how do you audit for them?" Which answer is most systematic?
Option B is strongest. It presents four categories with detection methods for each — the correct audit workflow framing. The missing modifiers section gives specific admin function examples (pause, mint, upgrade, setFee) and names the specific Slither detectors. The unprotected initialisation section uses the Parity Multisig Wallet hack as a real example ($280M frozen in 2017) — one of the most important Ethereum history events for a security auditor to know. The delegatecall section explains the storage slot 0 mechanism precisely (delegatecall runs in the calling contract's storage context, so malicious code can overwrite the owner variable which is typically at slot 0). The tx.origin section explains the phishing path (victim → malicious contract → victim contract) step-by-step. The audit workflow closes with the correct three-phase approach: Slither automated → manual matrix → Echidna fuzzing. Smart contract access control vocabulary:onlyOwner modifier — an access control restriction limiting calls to the contract owner. UUPS (Universal Upgradeable Proxy Standard) — a proxy pattern for upgradeable contracts using an initializer. delegatecall — a low-level call that executes code in the calling contract's storage context. tx.origin — the original transaction signer, as opposed to msg.sender (the immediate caller). Echidna — a smart contract fuzzer for property-based testing. Options C and D name the categories correctly but lack the Parity example and the delegatecall storage slot mechanism.
4 / 14
The interviewer asks: "What is formal verification for smart contracts and when is it worth the cost?" Which answer is most complete?
Option B is strongest. The opening definition distinguishes formal verification from testing precisely: ALL inputs vs. tested inputs only. The two-approach section correctly distinguishes Certora (model checking, complete for specified properties) from Echidna (fuzzing, not complete but practical), with an example CVL property showing what specifications look like. The "when worth the cost" section is the most operationally valuable part: it gives the $100M TVL threshold as a rule of thumb and explains the insurance logic (Certora engagement < $100M potential loss), which is how actual security teams make the ROI calculation. The post-audit hardening use case is a practical scenario many candidates miss. The limitations section is important: formal verification only proves specified properties — it cannot catch oracle manipulation (an economic attack that is formally valid) or business logic that is unspecified. Formal verification vocabulary:Certora Prover — a model checker for smart contracts using Certora Verification Language. CVL (Certora Verification Language) — the specification language for writing properties verified by Certora. Invariant — a property that must always hold true across all contract states. Echidna — a property-based fuzzer for Solidity smart contracts. TVL (Total Value Locked) — the total value of assets deposited in a DeFi protocol, used as a risk proxy. Options C and D are accurate but lack the example CVL property and the ROI insurance framing.
5 / 14
The interviewer asks: "How do you structure a smart contract audit report, and how do you classify finding severity?" Which answer is most complete?
Option B is strongest. The report structure section is specific: commit hash (a detail many candidates omit, but critical because the audit applies to a specific code version), four sections with their contents, and the exact fields in each finding. The PoC requirement is the most important professional standard: "an attacker could..." without code is insufficient — working PoC code in Foundry proves exploitability and justifies Critical/High severity. This is a real standard at top firms (Spearbit, Trail of Bits) that separates professional reports from amateur ones. The severity classification maps to CVSS criteria (impact severity × exploitability), which is the correct framing. The Informational level is often omitted by candidates. The firm names (Trail of Bits, OpenZeppelin, Spearbit) show industry knowledge. Audit report vocabulary:Commit hash — the exact git revision to which the audit findings apply. Proof of Concept (PoC) — working exploit code demonstrating that a finding is genuinely exploitable. CVSS (Common Vulnerability Scoring System) — a framework for classifying vulnerability severity. Scope — the exact set of contracts and files covered by the audit. Informational finding — a code quality or gas optimisation note with no direct security impact. Options C and D are accurate but lack the PoC requirement rationale and the commit hash importance.
6 / 14
Alice (Senior Developer) just posted a code review comment on your pull request for the new decentralized exchange smart contract. She points out: 'I'm seeing a potential issue with unchecked external calls to `IERC20`. Consider adding input validation to prevent malicious actors from triggering unintended contract state changes.' Which of the following best describes Alice's concern regarding security?
Alice's comment focuses on a critical vulnerability: unchecked external calls. This allows an attacker to repeatedly call functions on the contract, potentially exhausting its gas limit or manipulating its state in ways that weren't intended. Input validation is essential for mitigating this risk by verifying data before executing external function calls; reentrancy is a separate concern related to how contracts interact with each other.
7 / 14
Ben (Lead Security Engineer) sends you a Slack message: 'Hey team, we're seeing unusually high gas usage on the `deposit` function of our stablecoin smart contract. Initial analysis suggests potential frontrunning attacks. Can anyone investigate the transaction timestamps and block explorer data?' What is Ben primarily investigating?
Ben's message highlights a key indicator of frontrunning: unusually high gas usage. Frontrunners monitor the mempool for pending transactions and execute their own transaction slightly before the target to gain an advantage (e.g., buying low before a large order executes). Examining timestamps and block explorer data will reveal if this is happening.
8 / 14
You're reviewing the PR description for a new NFT minting contract. It reads: 'This smart contract allows users to mint NFTs with random attributes generated by a Chainlink VRF oracle. The contract uses `msg.value` to determine the number of NFTs minted and stores metadata on IPFS.' What is a significant security consideration related to this description?
While Chainlink VRF provides randomness, it introduces a single point of failure. If the oracle is compromised, attackers could manipulate the random attributes generated for NFTs. Directly using `msg.value` as the minting amount creates an attack vector where an attacker can drain funds by sending large transactions.
9 / 14
You're preparing a security audit report for a lending protocol. The report identifies several vulnerabilities including improper access control and insufficient input validation. You need to classify the severity of these findings. Which statement BEST describes your approach?
Severity classification is a core component of a robust audit report. It's not sufficient to simply label everything 'Critical.' A proper assessment considers the potential impact (financial loss, reputational damage), the likelihood of exploitation, and the criticality of the affected business functions. This allows for prioritization of remediation efforts.
10 / 14
Daniel (Junior Developer) posted this comment on your pull request for a decentralized lending contract: 'The `approve` function doesn't seem to have any checks against the amount being approved. A malicious user could potentially approve a large amount, allowing them to borrow significantly more than their collateral.' Which of the following best describes Daniel's concern?
Daniel's comment highlights a critical security weakness: lack of authorization checks. While approving tokens is common, failing to limit the amount approved creates an opportunity for malicious actors to borrow excessive amounts and potentially drain liquidity. The correct answer focuses on the core risk – over-collateralization – which is frequently exploited in smart contract vulnerabilities. Options A, B, and C are all factually incorrect regarding the function's purpose or general security principles.
11 / 14
Sarah (Lead Auditor) sends you this Slack message: 'I'm seeing a spike in transactions targeting our token swap contract. Initial investigation shows attackers are exploiting a vulnerability where the price calculation relies solely on Chainlink oracles without any fallback mechanism. They're manipulating oracle prices to drain liquidity.' What is Sarah primarily describing?
Sarah is describing a classic flash loan attack. Attackers use flash loans to borrow funds rapidly, manipulate oracle prices, and then repay the loan – all without depositing any collateral. The absence of a fallback mechanism allows this manipulation to be highly effective. Options A, B, and C represent alternative attack vectors or issues that don't align with Sarah's description of exploiting oracle dependencies.
12 / 14
You are reviewing the PR description for a new decentralized voting contract. It states: 'This smart contract utilizes a Chainlink VRF to generate random proposals for election candidates. The contract calls `msg.value` to determine the number of votes each candidate receives.' What is the *most* significant security concern raised by this design?
While all options represent potential issues, the primary concern is the reliance on an external oracle (Chainlink). Oracles are susceptible to manipulation and compromise, allowing attackers to influence the election outcome. Using `msg.value` as a direct input source *could* lead to integer overflows but isn't the core vulnerability here; the oracle dependency is far more critical in this scenario. Options B, C, and D represent secondary concerns or incomplete aspects of security.
13 / 14
Mark (Senior Auditor) asks you to classify the severity of a finding in your audit report for a decentralized insurance contract. The vulnerability allows an attacker to submit fraudulent claims by exploiting a flaw in the payout calculation logic. The potential loss to the protocol is estimated at up to 10% of total funds held within the smart contract. Which severity level is most appropriate?
Given that the potential loss is 10% of total funds held, this vulnerability constitutes a 'Medium' severity. While a single fraudulent claim might be 'Low,' the scale of the risk – affecting a substantial portion of the protocol's assets – warrants a higher classification. 'High' would be reserved for truly existential threats; 'Informational' is entirely inappropriate given the financial implications. The key factor is the *magnitude* of potential loss.
14 / 14
You are reviewing a smart contract for a decentralized prediction market and notice the function `predict()` uses `block.timestamp` to determine the outcome of the prediction. The contract allows users to manipulate this timestamp via frontrunning. What is the *most* effective mitigation strategy?
The best mitigation is to utilize a decentralized oracle for block time estimation rather than relying on the potentially manipulatable `block.timestamp`. Decentralized oracles provide an independent and trustworthy source of information, preventing attackers from influencing the outcome by manipulating the timestamp. Options A, B, and C are either insufficient or introduce new vulnerabilities; attempting to randomize the result directly addresses the problem but doesn't eliminate the underlying attack surface.
What does "Web3 Smart Contract Security Auditor Interview Questions — IT English Practice" cover?
Practise answering Web3 and Smart Contract Security Auditor interview questions in English: reentrancy, integer overflow, flash loans, access control, formal verification, and audit reports.
How many questions are in this interview set?
This set has 14 exercises, each with a full explanation.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do these exercises include model answers?
Yes. Each interview question gives you several possible responses and asks you to pick the one that communicates most clearly and completely — the explanation then breaks down exactly why that answer works, including the specific vocabulary a strong candidate would use.
What if I choose an answer that isn't the strongest one?
You'll see which option was correct and read a full explanation of why it's stronger than the alternatives, plus the key vocabulary and phrasing worth reusing in a real interview.
Can I retry the questions?
Yes — use the "Try again" button on the results screen to reset and go through the set again.
Is this the same as a real technical or behavioural interview?
No — it's focused practice for the language side of interviewing: recognising which phrasing sounds precise and confident versus vague, and knowing the vocabulary interviewers expect for this role. It won't replace mock interviews, but it builds the vocabulary you'll need in one.
Where can I find interview prep for other roles?
Browse the full Interview exercises hub for 170+ modules covering behavioural, technical, and system design rounds across dozens of IT roles, or check the "Next up" link below to continue.
Do I need an account, and is my progress saved?
No account is needed. Progress is tracked only for your current visit — reloading or leaving the page resets the counter.
Who writes these interview questions?
Every question is written by the CoderSlingo team based on real technical interview patterns for this role, then reviewed for accuracy and clarity.