Skip to content
Tech Interview Prep

Blockchain Developer Interview Prep

Overview

Builds and owns decentralized applications, smart contracts, and blockchain integrations, and defends the security, correctness, and trust assumptions they rest on.

Curated: · Written: · Reviewed:

Interview Q&A
102
Practice MCQs
105

The role in one line

You build and own the contracts, dapp flows and chain integrations that hold user funds, and you can defend the trust assumptions under them: who may call what, what state can be reordered, and what happens after a key or a dependency is compromised.

The interview loop

RoundWhat it scores
Role screenShipped contracts or funds-moving paths you can name, with chain and version
Contract semanticsA traced transaction: msg.sender, storage writes, external calls, gas, revert paths, and the invariant it touches
Adversarial reviewA contract or diff you must break (reentrancy, access control, oracle, signature replay) and the test that catches it
Protocol and finalityWhat settled means on the chain in question, fork choice, reorg handling
Off-chain boundary designIndexer rollback, key custody, upgrade authority, recovery after compromise
BehaviouralA pause, a bad deploy or a disputed loss you handled, and what you changed afterwards

Five must-know areas

  • Finality: which checkpoint a withdrawal may trust, and why head and safe are not settlement.
  • Signatures: what ecrecover, EIP-155 and EIP-712 bind to a signer, a chain and a domain, and what they leave open.
  • Reorg-safe indexing: keying data by blockHash and rolling back to the common ancestor.
  • Access control and reentrancy: who can upgrade, pause or drain, and whether state changes precede external calls.
  • Oracles and price manipulation: spot price against TWAP, and how a flash loan moves a single-block price.

Numbers and formulas to have ready

  • Slot time is 12 s. An epoch is 32 slots, 6.4 min. Justification and finalization usually land about two epochs (12.8 min) apart under normal participation. It stretches when participation drops, so say that rather than quoting it as a constant.
  • Finality needs links that carry at least 2/3 of active stake, weighted by effective balance:
∑v∈Swv≥23∑vwv\sum_{v \in S} w_v \ge \tfrac{2}{3} \sum_{v} w_v
  • Reverting a finalized block requires at least one third of stake to be slashable.
  • The inactivity leak starts after 4 epochs without finalization.
  • A 36 s gap with no block number increment is three missed 12 s slots. It is not a halt. Finality stalls only when justification stops across epochs.
  • Ethereum address is the last 20 bytes of keccak256 of the 64-byte uncompressed public key:
addr=keccak256(pubkey64)[12:32]\text{addr} = \text{keccak256}(\text{pubkey}_{64})[12{:}32]
  • EIP-155 signing value: v=2⋅chainId+35 or 36v = 2\cdot\text{chainId} + 35 \text{ or } 36
  • EIP-2 high-s rule: s≤n2s \le \frac{n}{2} where n is the secp256k1 group order.
  • A 12-word mnemonic carries 128 bits of entropy. The seed comes from PBKDF2-HMAC-SHA512 with 2048 rounds, plus an optional passphrase. The default Ethereum path is m/44'/60'/0'/0/i, so the account index i changes the derived address.

Reference architecture

signed tx price read upgrade calls finalized and safe tags rollback by blockHash withdraw after finalized User wallet Vault contract Oracle adapter Proxy admin multisig Beacon and execution node Indexer Store Keeper bot

The indexer keys every row by blockHash and rolls back to the common ancestor on reorg. Withdrawals read the finalized tag. The admin multisig is the only path that can change the implementation.

Strong vs weak answers

QuestionStrong answer sounds likeWeak answer sounds like
Is a success at head final?Head can reorg; finalized means justified then finalized by a later supermajority, so I wait for the finalized tagOnce it is in a block it is final
Reentrancy fixUpdate balance before the external call, then add a test that re-enters from a receiver and asserts the second withdraw revertsUse ReentrancyGuard everywhere
ecrecoverReject address(0), check v is 27 or 28, enforce low-s, and bind the signed digest to chainId and nonceIt returns the signer, so it is safe
ReorgUndo rows keyed to the orphaned blockHash, keep finalized rows, re-index from the ancestorRestart the indexer
OracleTWAP over a window plus deviation bounds, and a fallback that pauses instead of trusting spotUse Chainlink, it is decentralized

Interview tips

  1. State your assumptions first: chain, client version, which tag you trust and what the adversary controls.
  2. Walk one concrete transaction or attack to the invariant it breaks before naming a fix.
  3. Name the test that would fail on the bug. A Foundry fuzz or invariant test beats a checklist item.
  4. Separate what the chain guarantees from what your contract or indexer must enforce.
  5. Say what you would do after a compromised key or dependency: pause, rotate authority, and check which state survives.

Last-week checklist

  • Re-derive the slot, epoch and finality numbers from the Ethereum consensus specs and say which version you checked.
  • Trace a transfer and a withdrawal through a vault, including revert paths and gas.
  • Write one reentrancy test and one signature replay test from memory.
  • Review your indexer's rollback path against a 4-block reorg.
  • Read the concept pages for Consensus Mechanisms, Smart Contract Security and Oracles & Cross-Chain Interoperability in that order.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.