Skip to content

Blockchain Interview Questions for 10 Years Experience

40 questions with answers for candidates with 10+ years of experience — 14 medium, 26 hard.

What interviewers expect: 10 years experience

At ten years and above, roles are principal engineer, head of blockchain or chief architect. Interviews focus on vision, organisation-level decisions, client or investor communication and deep risk judgement. You may be asked how you would build a blockchain practice, evaluate new technology like zero-knowledge systems, and guide teams through market cycles while keeping security and compliance at the core.

This set is weighted towards DeFi, Tokens and NFTs (8), Smart Contract Security (6), Consensus and Scaling (6), dApp Development (6).

Technology vision Organisation leadership Risk and compliance strategy Stakeholder management
Solved at this levelStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

Show a contract vulnerable to reentrancy and a fixed version.

Save to ▾
Show answer
Vulnerable: the balance is cleared after sending. function withdraw() external { uint256 bal = balances[msg.sender]; (bool ok, ) = msg.sender.call{value: bal}(''); require(ok); balances[msg.sender] = 0; } Fixed: update state first and add a guard. import {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol'; function withdraw() external nonReentrant { uint256 bal = balances[msg.sender]; require(bal > 0, 'nothing'); balances[msg.sender] = 0; (bool ok, ) = msg.sender.call{value: bal}(''); require(ok, 'send failed'); }
02

Your staking validator is missing attestations and losing rewards. How do you investigate?

Save to ▾
Show answer
Check that both execution and consensus clients are synced and peering well, since low peer count or a lagging execution client causes missed duties. Look at system clock sync through NTP, CPU, memory and disk I/O, as slow disks often cause delays. Review client logs and metrics in Grafana, check for pending client upgrades before a fork, and verify network ports are open. Never start a second copy of the same validator key as a fix, because that causes slashing.
03

Your RPC provider starts rate-limiting and the dApp breaks during peak traffic. What do you do?

Save to ▾
Show answer
Short term, add a fallback transport with multiple providers so requests fail over automatically, and use retries with backoff. Reduce load: batch calls with multicall, cache read results, use WebSockets instead of tight polling, and move history queries to an indexer. Long term, upgrade the plan, spread traffic across providers or run your own node for critical paths, and monitor error rates and latency with alerts so you learn of issues before users do.
04

What is storage packing, and what are other key gas optimisations?

Save to ▾
Show answer
The EVM stores data in 32-byte slots, so consecutive small variables like uint128, uint64, address and bool can share a slot if declared next to each other, saving expensive SSTOREs. Other optimisations: use calldata for external arrays, cache storage reads in local variables, use immutable and constant, prefer custom errors over strings, avoid unbounded loops, use events instead of storing history, and use unchecked for counters that cannot overflow. Always measure with forge snapshot.
05

An attacker borrows governance tokens with a flash loan to pass a malicious DAO proposal. How do you prevent it?

Save to ▾
Show answer
Use snapshot-based voting power: count votes from token balances at a past block, as ERC20Votes does, so tokens acquired in the same transaction have no weight. Add a voting delay before voting starts, a quorum, and a timelock between approval and execution so the community can react or a guardian can veto. Require a proposal threshold, and keep critical actions such as treasury transfers behind additional safeguards like spending limits.
06

Write a minimal Python example showing how blocks are linked by hashes.

Save to ▾
Show answer
Each block stores the previous hash, so changing any earlier data breaks the chain. import hashlib, json def block_hash(block): data = json.dumps(block, sort_keys=True).encode() return hashlib.sha256(data).hexdigest() chain = [{'index': 0, 'data': 'genesis', 'prev': '0'}] for i, tx in enumerate(['A pays B 5', 'B pays C 2'], 1): chain.append({'index': i, 'data': tx, 'prev': block_hash(chain[-1])}) valid = all(chain[i]['prev'] == block_hash(chain[i-1]) for i in range(1, len(chain))) print(valid)
07

An auditor flags that a single owner key can mint tokens and change fees. How do you address it?

Save to ▾
Show answer
This is centralisation risk: if the key is compromised or misused, users lose funds. Move ownership to a multisig with signers on separate devices, add a timelock so users can see and react to changes, set hard-coded bounds such as a maximum fee, and remove powers that are not needed, like unlimited minting. Use role-based access instead of one all-powerful owner, and document the remaining admin powers publicly.
08

What are storage collision and uninitialised implementation risks in proxies?

Save to ▾
Show answer
With delegatecall, the implementation's code writes to the proxy's storage. If the proxy stores its admin or implementation address in a normal slot, implementation variables can overwrite it, so EIP-1967 uses pseudo-random slots. New implementation versions must only append variables, or use namespaced storage (ERC-7201). Implementations must also disable initialisers in their constructor; otherwise an attacker can initialise the implementation directly, take ownership and, in UUPS, potentially destroy or hijack it.
09

What are zero-knowledge proofs, and how do zk-SNARKs and zk-STARKs differ?

Save to ▾
Show answer
A zero-knowledge proof lets a prover convince a verifier that a statement is true without revealing why, for example proving a transaction is valid without exposing the details. zk-SNARKs have very small proofs and cheap verification, but many schemes need a trusted setup and rely on elliptic curves. zk-STARKs need no trusted setup, use hash-based cryptography considered post-quantum safe, but produce larger proofs. zk-rollups use them to prove batches of transactions to Ethereum.
10

A sharp market fall causes cascading liquidations in your lending protocol and bad debt. How do you design against it?

Save to ▾
Show answer
Set conservative loan-to-value ratios and liquidation thresholds per asset based on volatility and on-chain liquidity. Use supply and borrow caps for illiquid tokens, isolation mode for risky assets, and a liquidation bonus that attracts liquidators without over-penalising users. Allow partial liquidations so positions shrink gradually. Keep reliable oracles, an insurance or reserve fund to absorb bad debt, and run stress tests simulating 30 to 50 percent price drops.
11

A client in India wants to tokenise real estate for fractional ownership. What do you consider?

Save to ▾
Show answer
Regulation comes first: fractional real estate is likely a security or collective investment, so SEBI rules, including those for fractional ownership platforms, apply, and crypto-like tokens are taxed as virtual digital assets at 30 percent with 1 percent TDS. Use a permissioned token with KYC-gated transfers, such as ERC-3643, and a legal SPV that holds the property. Keep title documents off-chain, put hashes on-chain, and plan for rent distribution, transfer restrictions and recovery.
12

How do upgradeable contracts work, and how do Transparent and UUPS proxies differ?

Save to ▾
Show answer
A proxy holds the state and delegates every call to an implementation contract whose address is stored in a standard EIP-1967 slot; upgrading means pointing to a new implementation. In the Transparent pattern, upgrade logic lives in the proxy and an admin cannot call implementation functions, which avoids selector clashes. In UUPS, upgrade logic lives in the implementation, making proxies cheaper, but a faulty upgrade can brick it. Both use initialisers instead of constructors and require storage-layout compatibility.
13

How would you implement Sign-In with Ethereum on a web back-end?

Save to ▾
Show answer
Follow EIP-4361. The server generates a random nonce and stores it in the session. The front-end builds a SIWE message with domain, address, statement, URI, chain ID, nonce and issued-at time, and the wallet signs it. The server verifies the signature with a SIWE library, checks domain, nonce, expiry and chain, then issues a session cookie or JWT and deletes the nonce. For smart contract wallets, verify via ERC-1271 isValidSignature.
14

What is a Merkle Patricia Trie and why does Ethereum use it?

Save to ▾
Show answer
A Merkle Patricia Trie combines a Patricia (compressed prefix) trie with Merkle hashing. Ethereum uses it to store world state, account storage, transactions and receipts, with each root stored in the block header. It allows efficient insert, update and lookup by key, and any value can be proven against the root with a proof. Its weakness is large proof size, which is why Ethereum researchers plan to move to Verkle or binary hash trees for stateless clients.
15

Tell me about a bug you missed and what you learned from it.

Save to ▾
Show answer
Situation: I shipped a rewards contract where a rounding error let users claim slightly more than earned when claiming very often. Task: fix it and prevent repeats. Action: I owned the mistake in the team call, wrote a failing test reproducing it, changed the division order to round down in the protocol's favour, and added fuzz tests on claim frequency. Result: losses were tiny, and I now always fuzz any maths involving division.
16

Calculate the output of a swap in a constant product pool with a 0.3 percent fee.

Save to ▾
Show answer
Formula: amountOut = (amountIn x 997 x reserveOut) / (reserveIn x 1000 + amountIn x 997). Example: reserves 1,000 ETH and 3,000,000 USDC, swap 10 ETH. amountInWithFee = 10 x 997 = 9,970 numerator = 9,970 x 3,000,000 = 29,910,000,000 denominator = 1,000 x 1000 + 9,970 = 1,009,970 amountOut = 29,615 USDC (approx) The spot price is 3,000, but the trader gets about 2,961.5 per ETH because of fee and price impact.
17

What is finality, and how does probabilistic finality differ from deterministic finality?

Save to ▾
Show answer
Finality is the guarantee that a confirmed transaction will not be reversed. In proof of work, finality is probabilistic: each new block on top makes reversal exponentially less likely, so exchanges wait for several confirmations. In BFT-style and Ethereum proof of stake, finality is economic and deterministic: once two-thirds of stake attests to a checkpoint, reverting it would require burning at least one-third of all staked ETH. Ethereum finalises in about two epochs, roughly 13 minutes.
18

What is account abstraction, and how do ERC-4337 and EIP-7702 differ?

Save to ▾
Show answer
Account abstraction makes accounts programmable, so wallets can support batching, gas paid in tokens or by sponsors, passkeys, spending limits and social recovery. ERC-4337 does this without protocol changes: users send UserOperations to an alternate mempool, bundlers submit them to an EntryPoint contract, and paymasters can sponsor gas. EIP-7702 is a protocol change that lets an existing EOA point to smart account code, so users keep their address while gaining these features.
19

A simulated eth_call succeeds but the real transaction reverts. What could cause this?

Save to ▾
Show answer
The state can change between simulation and inclusion: price moved beyond slippage limits, a deadline passed, another user took the last item, or a bot front-ran the trade. Other causes are a different msg.sender or value in the simulation, a gas limit too low for the real path, block-dependent logic like block.timestamp, or a different block tag. Debug by tracing the failed transaction with cast run or a tracer and comparing inputs and state.
20

Write the core reward-per-token logic for a staking rewards contract.

Save to ▾
Show answer
uint256 public rewardRate; // tokens per second uint256 public rewardPerTokenStored; uint256 public lastUpdate; uint256 public totalStaked; mapping(address => uint256) public paid; mapping(address => uint256) public rewards; mapping(address => uint256) public staked; function rewardPerToken() public view returns (uint256) { if (totalStaked == 0) return rewardPerTokenStored; return rewardPerTokenStored + (block.timestamp - lastUpdate) * rewardRate * 1e18 / totalStaked; } modifier updateReward(address a) { rewardPerTokenStored = rewardPerToken(); lastUpdate = block.timestamp; rewards[a] += staked[a] * (rewardPerTokenStored - paid[a]) / 1e18; paid[a] = rewardPerTokenStored; _; }
21

What does a smart contract audit process look like?

Save to ▾
Show answer
It starts with scoping: fixed commit, documentation, threat model and test coverage. Auditors run automated tools like Slither and fuzzers, then do manual line-by-line review, checking business logic, access control, economic attacks and integrations. They write findings rated critical, high, medium, low and informational with fixes. The team fixes issues, auditors review the fixes, and a final report is published. Audits reduce risk but do not guarantee safety, so add bug bounties and monitoring.
22

How do you monitor smart contracts in production?

Save to ▾
Show answer
Track on-chain activity in real time: alert on admin actions, large transfers, unusual withdrawal rates, paused states, oracle deviations and failed transactions. Use monitoring services or custom bots reading events, with alerts to on-call channels. Monitor invariants, such as total assets matching total shares, and automate responses like pausing through a guardian. Also watch the front-end, RPC health and DNS for hijacking. Review alerts weekly to reduce noise and test the incident runbook.
23

How do you read a Chainlink price feed in Solidity safely?

Save to ▾
Show answer
import {AggregatorV3Interface} from '@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol'; AggregatorV3Interface public feed; uint256 constant MAX_DELAY = 1 hours; function getPrice() public view returns (uint256) { (, int256 answer, , uint256 updatedAt, ) = feed.latestRoundData(); require(answer > 0, 'bad price'); require(block.timestamp - updatedAt <= MAX_DELAY, 'stale price'); return uint256(answer); // scale using feed.decimals(), often 8 } Always check staleness, sign and decimals; on L2s also check the sequencer uptime feed.
24

Design a back-end relayer so users can make transactions without holding gas.

Save to ▾
Show answer
Users sign an EIP-712 meta-transaction or an ERC-4337 UserOperation. The relayer validates the signature, checks business rules and rate limits per user, then submits it, paying gas from a hot wallet or via a paymaster. Contracts must verify the original signer, using ERC-2771 trusted forwarders or account abstraction. Manage nonces carefully with a queue, replace stuck transactions, keep the relayer wallet funded and monitored, and cap daily sponsorship to prevent abuse.
25

Design the custody setup for an exchange's hot and cold wallets.

Save to ▾
Show answer
Keep a small float, around a few percent of assets, in hot wallets for withdrawals, secured by HSMs or MPC with rate limits, address allowlists and automated monitoring. Keep the rest in cold storage: air-gapped or multisig/MPC with keys held by different officers in different locations, plus time delays. Refill hot wallets through a manual, multi-approver process. Add proof of reserves, regular key ceremonies, insurance, and incident runbooks for freezing withdrawals if anomalies appear.
26

How does the EIP-1559 fee model work?

Save to ▾
Show answer
EIP-1559 splits the fee into a base fee and a priority fee. The protocol sets the base fee per block from demand: if the previous block was more than half full, it rises up to 12.5 percent, otherwise it falls. The base fee is burned. Users add a priority fee (tip) for the proposer and set maxFeePerGas as their cap. They pay base fee plus tip, never more than the cap, which makes fees more predictable.
27

What is signature malleability and how is it prevented?

Save to ▾
Show answer
For any valid ECDSA signature (r, s), the value (r, n - s) is also valid for the same message. If code uses a signature as a unique ID, for example to mark it as used, an attacker can submit the flipped version and replay it. Ethereum's EIP-2 requires s to be in the lower half of the curve order for transactions. In contracts, use a library like OpenZeppelin ECDSA that enforces low s, and track nonces instead of signatures.
28

Four organisations are building a private EVM network. Which consensus would you pick: Raft or QBFT?

Save to ▾
Show answer
Raft is crash fault tolerant: fast and simple, but it assumes no node lies, so it fits when all members trust each other's infrastructure. QBFT is Byzantine fault tolerant and tolerates f malicious nodes out of 3f+1, so with four validators it survives one bad actor and gives immediate finality. Since the organisations are separate businesses that may not fully trust each other, I would choose QBFT and run at least four validators, ideally more.
29

How do you manage deployer private keys in a CI/CD pipeline?

Save to ▾
Show answer
Never commit keys or put them in plain environment files. For testnets, use CI secret storage with restricted access. For mainnet, avoid hot keys in CI entirely: have CI produce a transaction proposal that signers approve in a multisig, or use a cloud KMS or HSM signer so the key never leaves secure hardware. Separate deployer and admin roles, transfer ownership to a multisig immediately after deployment, and log and review every deployment.
30

Your dApp needs a full history of user transactions and fast queries. Reading events from the node is too slow. What do you do?

Save to ▾
Show answer
Build or use an indexer. An indexer listens to contract events from a start block, transforms them and stores them in a database like PostgreSQL, so the front-end runs normal fast queries. Options are a subgraph on The Graph, hosted indexing services, or a custom service with ethers and a queue. It must handle reorgs by tracking block hashes, support backfilling, and expose an API. Design events up front with indexed fields that queries need.
31

You are asked to design a cross-chain bridge. What are the main risks and design choices?

Save to ▾
Show answer
Bridges hold large pooled funds, so they are top hacking targets. Main risks are compromised validator or multisig keys, faulty message verification, and replay of messages across chains. Prefer verification based on light clients or zk proofs over a small trusted multisig. Use rate limits, per-transfer caps, pausing, monitoring of mint-versus-lock balances, and a delay for large transfers. Get multiple audits, run a bug bounty, and consider established messaging protocols instead of building from scratch.
32

Tell me about working with product, legal or compliance teams on a blockchain feature.

Save to ▾
Show answer
Situation: we planned a token reward feature for Indian users, and legal raised VDA tax and securities concerns. Task: as tech lead I had to find a compliant design. Action: I ran workshops to understand their constraints, proposed non-transferable points that convert to vouchers, and documented the data flow for compliance. Result: we launched a month later than planned but with sign-off from all teams, and avoided a costly redesign after launch.
33

What did EIP-4844 (proto-danksharding) change?

Save to ▾
Show answer
EIP-4844, shipped in the Dencun upgrade in March 2024, added blob-carrying transactions. Blobs are large data chunks of about 128 KB that rollups use to post batch data, priced in a separate fee market and pruned by nodes after roughly 18 days. Contracts cannot read blob contents, only their KZG commitments. This cut L2 data costs dramatically. Later upgrades raised blob capacity, and PeerDAS in the Fusaka upgrade lets nodes sample data instead of downloading every blob.
34

Describe a production incident you handled under pressure.

Save to ▾
Show answer
Situation: after a release, our token-claim page started failing for some users while traffic was peaking. Task: as on-call lead I had to restore service quickly. Action: I paused the claim contract through our multisig, traced failing transactions, and found a front-end bug sending an outdated Merkle proof format. We hot-fixed the UI, tested on a fork, and unpaused. Result: downtime was 40 minutes, no funds were at risk, and we added an end-to-end check against the deployed root.
35

A stablecoin used as collateral in your protocol loses its peg. How do you respond?

Save to ▾
Show answer
Activate the risk plan: pause new borrowing against that asset and freeze its use as new collateral through governance or the guardian. Switch its oracle to a market price rather than a hard-coded one dollar, so positions are valued honestly, which may trigger liquidations. Reduce its loan-to-value and supply caps. Communicate clearly with users. Longer term, cap exposure per stablecoin, diversify collateral and model depeg scenarios in risk dashboards.
36

What is MEV and what is proposer-builder separation?

Save to ▾
Show answer
MEV, maximal extractable value, is profit a block producer or searcher earns by including, excluding or reordering transactions, for example arbitrage, liquidations and sandwich attacks on swaps. On Ethereum, most validators use MEV-Boost, where specialised builders assemble profitable blocks and bid for them through relays, separating block building from proposing. This spreads MEV revenue to validators but concentrates building power. Enshrined PBS and inclusion lists are being researched to reduce censorship risk.
37

Your dApp's users are paying high gas fees on Ethereum mainnet. How would you choose a Layer 2?

Save to ▾
Show answer
I would compare candidate rollups on security (proof system live, stage of decentralisation, upgrade keys), EVM compatibility so our Solidity code deploys unchanged, ecosystem fit (wallets, oracles, liquidity, bridges our users already use), fees and throughput, and withdrawal experience. I would deploy to testnets first, measure real costs and latency, and check that our dependencies such as Chainlink feeds exist there. Then migrate gradually, keeping L1 contracts for high-value settlement if needed.
38

Write a Foundry invariant test for a token's total supply.

Save to ▾
Show answer
Invariant tests call random functions on target contracts and check a property after every call. import {Test} from 'forge-std/Test.sol'; import {MyToken} from '../src/MyToken.sol'; import {Handler} from './Handler.sol'; contract SupplyInvariant is Test { MyToken token; Handler handler; function setUp() public { token = new MyToken(); handler = new Handler(token); targetContract(address(handler)); } function invariant_supplyMatchesBalances() public view { assertEq(token.totalSupply(), handler.sumOfBalances()); } } The handler bounds inputs and tracks actors so calls stay realistic.
39

Your contract fails to deploy because it exceeds the 24 KB size limit. What do you do?

Save to ▾
Show answer
The EIP-170 limit is 24,576 bytes of runtime code. First enable the optimiser and try a lower runs value or via-IR. Replace revert strings with custom errors, move repeated logic out of modifiers into internal functions, and remove unused code. If still too big, split logic into separate contracts or external libraries, or use a modular pattern like the Diamond (EIP-2535). Splitting also often improves clarity and auditability.
40

Write a Foundry deployment script.

Save to ▾
Show answer
// script/Deploy.s.sol pragma solidity ^0.8.24; import {Script, console} from 'forge-std/Script.sol'; import {Counter} from '../src/Counter.sol'; contract Deploy is Script { function run() external returns (Counter c) { vm.startBroadcast(); c = new Counter(); vm.stopBroadcast(); console.log('Counter deployed at', address(c)); } } # Run it with an encrypted keystore account forge script script/Deploy.s.sol --rpc-url $RPC_URL \ --account deployer --broadcast --verify Broadcast output in the broadcast folder records addresses for later scripts.

Frequently asked questions

What is asked in Blockchain interviews for 10+ years of experience?

At ten years and above, roles are principal engineer, head of blockchain or chief architect. Interviews focus on vision, organisation-level decisions, client or investor communication and deep risk judgement. You may be asked how you would build a blockchain practice, evaluate new technology like zero-knowledge systems, and guide teams through market cycles while keeping security and compliance at the core.

How many questions should I practise before a Blockchain interview?

Work through all 40 questions here, then the company-wise sets for the employers you are targeting. Quality matters more than count: be able to explain why each answer is right.

Which topics matter most for 10+ years of experience?

Focus first on Technology vision, Organisation leadership, Risk and compliance strategy, Stakeholder management.