Skip to content
RED SAGSkills
mediumBlockchain Developer interview question

How do chain reorganizations affect a dApp or backend service, and how do you handle them?

What the interviewer wants to hear

  • Recent blocks can be replaced, removing or reordering transactions
  • Use confirmation depth or safe and finalized block tags depending on value
  • Indexers track block hashes and roll back orphaned data
  • Idempotent processing keyed by tx hash and log index
  • Different chains and L2s have different finality rules

Model answer

A reorg happens when the network switches to a different chain tip, so transactions in the replaced blocks can vanish or move. On Ethereum, reorgs beyond one or two blocks are rare, but finality takes about 13 minutes, and other chains differ. For low-value UI updates I show results after one confirmation. For anything involving money, like crediting deposits, I wait for the safe or finalized block tag, or a confirmation depth suited to the chain. My indexers store each block's hash and parent hash, detect when they no longer match, and roll back events from orphaned blocks before reprocessing. Processing is idempotent, keyed by transaction hash and log index, so replays do not double-count. On L2s I also separate soft confirmation from the sequencer and real finality on L1.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Blockchain Developer questions