What is MEV, and how would you protect your protocol's users from harmful MEV?
What the interviewer wants to hear
- Maximal extractable value from ordering, including or excluding transactions
- Harmful forms: sandwich attacks, front-running
- Benign forms: arbitrage, liquidations
- Private orderflow and MEV-protected RPCs
- Protocol designs: slippage limits, batch auctions, commit-reveal, intent-based systems
Model answer
MEV, maximal extractable value, is profit that block builders and searchers can make by choosing which transactions go into a block and in what order. Some MEV is useful, like arbitrage that keeps prices aligned across DEXs and liquidations that keep lenders solvent. Harmful MEV hurts users directly, mainly sandwich attacks, where a bot buys before a user's swap and sells after it, and front-running of valuable actions like NFT mints. To protect users, I set sensible default slippage and deadlines in the frontend and route transactions through private or MEV-protected RPCs, so they skip the public mempool. At the protocol level, designs like batch auctions with a uniform clearing price, as CoW Protocol uses, intent-based systems where solvers compete, or commit-reveal schemes for actions that should not be visible early, remove the advantage of ordering. Some protocols also redistribute MEV back to users through order flow auctions.
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?
- 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?
- Your protocol is being exploited right now on mainnet. What do you do in the first hour and afterwards?
- 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?