Your protocol is being exploited right now on mainnet. What do you do in the first hour and afterwards?
What the interviewer wants to hear
- Confirm the attack and pause affected contracts using emergency roles
- Have a prepared incident plan, war room and owners
- Consider whitehat rescue of remaining funds, beware of front-running
- Contact security partners, exchanges, bridges and stablecoin issuers to freeze
- Communicate clearly, then do root cause analysis, fixes, audit and post-mortem
Model answer
First I confirm what is happening from monitoring and transactions, and open a war room with the people and keys we need, following our prepared incident plan. If the contracts have a pause or guard role, I use it at once to stop further losses, and I disable affected frontend actions. If funds remain at risk and cannot be paused, we consider a whitehat rescue, using a private transaction route so the attacker or bots cannot front-run us. In parallel we contact security groups such as SEAL 911, and exchanges, bridges and stablecoin issuers who may freeze stolen funds. We post a short, honest status update and keep it updated. Afterwards we trace the root cause, fix it with tests, get the fix reviewed or audited, and publish a full post-mortem with a recovery or compensation plan.
Can you answer it under time pressure?
Take a timed hard round and get scored on every answer.
More hard Blockchain Developer questions
- You are designing a new lending protocol. What are the biggest security risks and how do you address them?
- Why have cross-chain bridges been a common target for large hacks, and how would you design a safer cross-chain system?
- What is MEV, and how would you protect your protocol's users from harmful MEV?
- How do you prepare a codebase for a security audit, and what happens after the audit?
- How do you decide what logic and data should live on chain versus off chain in a dApp?
- How does EIP-7702 change assumptions that smart contracts and dApps make about EOAs, and what would you change in your code?
- How do you make sure an upgrade to a proxy-based contract does not corrupt storage or break the system?
- You are building an ERC-4626 yield vault. What design and security issues do you consider?
- Your team wants to deploy the same protocol to five EVM chains, including L2s. What can go wrong and how do you prepare?