Skip to content
Tech Interview Prep
Technical interview guide

Oracles & Cross-Chain Interoperability

How smart contracts get real-world data they can't natively access, and how assets and messages move between otherwise-isolated chains.

Read
50 min
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: Chainlink Data Feeds, Sequencer Uptime Feeds, VRF v2.5 and CCIP documentation; Uniswap v2 oracle design; IBC core and ICS-23 specifications; EIP-3668 reviewed 2026-09-07.

Curated: · Written: · Reviewed:

25 questions

MCQ-3A price feed takes the median of 21 independent reporters. Three reporters are compromised and submit a price 40% below the true market price; the other eighteen agree within 0.5%. What does the median actually protect the feed against in this scenario?
MCQ-9A lottery contract stores the operator's VRF public key K. For round 42 it accepts a request tuple (randomness, proof, publicKey). It verifies proof against the supplied publicKey and the round number 42, then accepts the randomness if the proof is valid. An attacker submits randomness R' with a proof that verifies under the attacker's own key K' for round 42, and the contract accepts R'. Which change makes the contract reject that submission?
MCQ-5A lending protocol on an L2 reads a Chainlink-style price feed to decide liquidations. The feed's on-chain config lists a 0.5% deviation threshold and a 3600 s heartbeat. ETH's price moves 0.2% over 50 minutes, then 0.9% in a single 12 s block. The protocol's liquidation bot polls the feed's latest answer every block. What does the feed do across this window?
MCQ-4A team copies a deployment script that reads `latestRoundData()` from a hardcoded aggregator address on Ethereum mainnet and runs it unchanged against an L2. The call succeeds and returns a number. Which set of values must the config pin per deployment for that number to be safe to use?
MCQ-6A lending market prices collateral from a single Uniswap v2 pair's spot reserves, and an attacker drained it with a flash loan. The team replaces the spot read with a 30-minute TWAP on the same pool. What actually raises the attacker's cost?
MCQ-8A lending market on Arbitrum gates every liquidation on Chainlink's L2 Sequencer Uptime Feed. The feed's latest round reports answer = 0 with startedAt = 12:20, right after a 20-minute sequencer outage. The market's grace period is 30 minutes. At 12:40 a keeper submits a liquidation against a borrower whose collateral price feed went stale during the outage. What does the market's liquidation path do?
MCQ-2An Arbitrum One lending market reads the ETH/USD Chainlink feed (8 decimals, 24 h heartbeat) before every liquidation. Its risk config sets maxStaleness = 3600 s and a sequencer grace period of 1800 s. At block timestamp 1745003600 the calls return: ETH/USD: answer = 2450 * 10^8, updatedAt = 1745003550, answeredInRound = roundId; sequencer uptime feed: answer = 0, startedAt = 1745003400. The consumer already enforces answer > 0, updatedAt within maxStaleness, and answeredInRound >= roundId. What should it do?
MCQ-1An exchange prices ETH collateral from an on-chain feed with seven slots. An accepted update carries one reporter's (price, timestamp) plus a signature; the contract recovers the signer, requires it to be one of the seven registered addresses, and overwrites that reporter's slot. The contract never compares the timestamp to block.timestamp, and the stored price is the median of the seven slot values. An audit finds that one operator holds three of the seven keys and posts whatever price suits it, while the other four reporters keep the true price in their slots. What is the largest gap between the stored price and the true price?
MCQ-18A perp DEX's consumer contract serves ETH/USD and BTC/USD. A report is `(feedId, observationsTimestamp, price, signature)`; the handler writes `report.price` into the slot named by a caller-supplied `marketId`, checking only the signature and a newer `observationsTimestamp` than the slot's. An attacker submits a valid, freshly signed ETH/USD report (price ~1/20th of BTC's) with `marketId` set to BTC/USD, collapsing that slot. Which check fixes this, and why does freshness alone not stop it?
MCQ-7A lending market prices collateral from a primary oracle that aggregates eight CEX feeds with a 0.5% deviation threshold and a 1-hour heartbeat. If the primary is stale for more than 30 minutes, the contract automatically switches to a fallback: a 10-minute TWAP from one Uniswap v3 ETH/USDC pool holding $2.1M. On a volatile weekend the primary goes stale for 40 minutes, the fallback activates, and a borrower opens a position the fallback prices 6% below the eight-feed median. Which conclusion about this incident is correct?
MCQ-25A perp DEX on an L2 needs sub-second price updates to trigger liquidations, but its oracle reads arrive in bursts of a few hundred per hour, and the team is choosing between Chainlink Data Streams and a conventional push feed that writes on deviation and heartbeat. Which trade-off does adopting the pull-based stream introduce?
MCQ-22A contract uses EIP-3668 (CCIP-Read) to resolve names. The client fetches the response from the gateway URL the contract returned, then calls the contract's callback with the gateway's bytes. The gateway operator is a single party the team does not control, and the contract's callback currently only checks that the response is non-empty before storing the resolved address. A user reports that a name they never registered now resolves to an attacker's address. Which change to the callback actually closes this hole?
MCQ-17A relayer operator runs two channels over the same connection between chain A and chain B: channel-0 is ORDERED for a custom module, and channel-7 is UNORDERED for ICS-20 transfers. A packet sent from chain A on channel-0 with sequence 42 is never received by chain B before its timeout height, and the operator submits the timeout proof to chain A. What is the resulting state?
MCQ-19A bridge locks 100 ETH in escrow on Chain A for a transfer to Chain B. The relayer submits the packet, Chain B credits 100 wrapped ETH, and the acknowledgement is relayed back to Chain A. Chain A's timeout is 30 minutes. In one incident Chain B credited at T+29:30, the acknowledgement reached Chain A at T+31, and a timeout refund of the escrow executed at T+30:10, so the user kept both the refund and the wrapped ETH. Which change fixes the protocol's terminal-state handling?
MCQ-20A bridge verifies source-chain state with a light client on the destination chain. Relayers are permissionless: any relayer can submit a source header and a Merkle proof for a deposit. Relayer R stops forwarding deposits for one user. Relayer S submits the same deposit proof, and the destination contract accepts it. What does this incident show about the bridge's trust model?
MCQ-14A destination chain runs a light client of a source chain. Its latest trusted header is at height 1,000,000 with validator set V1 (total voting power 100). A relayer submits a header at height 1,000,500 signed by validators with total voting power 70 from V1, plus a Merkle proof that a transfer was included in that block. The source chain actually changed its validator set at height 1,000,200 to V2, and the light client's trusting period is 14 days. What should the destination bridge do?
MCQ-13A bridge mints wrapped ETH on an L2 once a deposit event has 12 confirmations on the source chain (12-second slots, 32 slots per epoch, finalized after two epochs). Last week a client bug caused a 15-block reorg on the source chain: the deposit event was reorged out, but the relayer had already minted 40 wETH, which was swapped on the destination DEX before anyone noticed. Which change removes the root cause?
MCQ-10A bridge relays messages from Ethereum (chainid 1) to a target contract deployed by the same deployer with the same nonce on Arbitrum (42161) and Optimism (10), so the target has the same address on both chains. Each message carries an identifier computed at the source as keccak256(abi.encode(sourceChainId, sender, nonce, target, payloadHash)), and the destination contract marks an identifier consumed before executing. A message sent for Arbitrum was relayed to Optimism, where the identifier was unconsumed, and the Optimism deployment executed the call. Which change stops this replay?
MCQ-12Chain A's bridge assigns nonces per sender (`nonces[msg.sender]++`) and a relayer delivers messages to this receiver on chain B (Solidity 0.8): ```solidity mapping(uint256 => bool) public consumed; function execute(uint256 nonce, address to, uint256 amount) external onlyRelayer { require(!consumed[nonce], "already consumed"); consumed[nonce] = true; token.mint(to, amount); } ``` Alice sends 100 USDC; her counter on chain A is at 7, and the relayer delivers that message. Bob then sends 250 USDC, and his own counter is also at 7. The relayer delivers Bob's message. What happens, and what does it imply?
MCQ-11A bridge carries messages from Ethereum (chain id 1) to Base (chain id 8453), and WETH on Base is meant to be minted only against ETH that VaultEth has locked. VaultBase is deployed on Base only: ```solidity contract VaultBase { address constant ROUTER = 0x9f3c...; // the bridge's delivery router on Base mapping(bytes32 => bool) public done; function onMessage(bytes32 msgId, uint256 srcChainId, address srcVault, address beneficiary, uint256 amount) external { require(msg.sender == ROUTER, "caller"); require(!done[msgId], "used"); done[msgId] = true; weth.mint(beneficiary, amount); } } ``` The Ethereum router takes any caller's payload, moves no value, and the outbox delivers that payload to the dstVault named in the call: ```solidity function send(uint256 dstChainId, address dstVault, address beneficiary, uint256 amount) external payable { outbox.send(dstChainId, dstVault, abi.encode(msg.sender, beneficiary, amount)); } ``` VaultEth holds 4,000 ETH and is never called. The WETH/ETH pool on Base holds 600 ETH. An attacker with no ETH calls send(8453, VaultBase, attacker, 4000e18). The bridge delivers the message to onMessage with msgId 0x1179 (unused), srcChainId 1, srcVault = attacker, beneficiary = attacker and amount 4000e18; no ETH was locked anywhere on Ethereum. What does the attacker end up with, and which check in onMessage would have blocked it?
MCQ-23A bridge's source-chain contract is upgraded to payload format v2 at block 19,400,000 and starts emitting v2 payloads immediately. The destination adapter still runs the v1 decoder, which rejects any payload whose leading version byte is not 0x01. At the upgrade block, 1,200 v1 messages are still queued in the relayer, which drains at 300 messages per hour. What is the outcome?
MCQ-21A lock-and-mint bridge escrows canonical USDC on Ethereum and mints a wrapped representation on an L2. Over one week the bridge processes 40,000 deposits of 100 USDC each and 39,600 withdrawals of 100 USDC each. The L2 wrapped-USDC total supply is read as 4,120,000 USDC, while the Ethereum escrow contract holds 4,000,000 USDC. The relayer set reports no failed or dropped messages, and the L2 mint/burn contract's event log shows exactly 40,000 Mint events and 39,600 Burn events. What does this state indicate?
MCQ-15A bridge holds $310M in escrow and settles withdrawals with a 5-of-13 validator multisig. Three of the 13 keys are generated and held in one cloud KMS account; the other 10 are independent operators with hardware wallets. The team asks: if the KMS account is compromised, what is the largest number of the 10 independent operators that can also be compromised while the bridge remains safe?
MCQ-16An optimistic bridge escrows ETH on L1 and uses a single-round fraud proof: a proposed output root becomes final and its withdrawals executable 7,200 s after the L1 block that included it, unless a challenge transaction carrying a complete fraud proof lands in an earlier block. L1 blocks arrive every 12 s, L1 is live and does not censor the watcher, and the proposer's 8 ETH bond goes to a challenger who wins. A proposer posts a root that credits itself a 300 ETH withdrawal it is not entitled to. The bridge's only honest watcher is online throughout: it polls L1 every 300 s, sees the root at the first poll after it was included, spends the next 7,800 s re-executing the disputed batch to produce the proof, and is ready to send the challenge in the following block. What is the outcome?
MCQ-24In CCIP, the Commit DON writes a Merkle root of outgoing messages to the destination CommitStore. A second, independent node set runs its own client implementation: for each committed root its nodes recompute the expected root from raw source-chain events and sign the result. What does the destination chain require from those signatures before the Executing DON may deliver messages under the root?