Skip to content
Tech Interview Prep

Top 100 Blockchain Developer Practice MCQs

Every question on one page: open one, choose an answer, and see why at once. Signed in, your latest answer to each question counts, and you can answer again after 24 hours.

Curated: · Written: · Reviewed:

Reviewed 99Review pending 1

Answers to reviewed questions count toward this role and the overall leaderboard; your latest answer to each one is the one that counts.

100 questions

MCQ-1A security review is deciding how to explain why a transaction 120 slots deep cannot be silently rewritten on an EVM chain with 12-second slots. Which statement holds up?
MCQ-9A bridge credits deposits once a checkpoint is finalized. Total effective balance is 30,000,000 ETH. The operator sees checkpoint A finalized on fork 1 and checkpoint B finalized on fork 2, each carrying 21,000,000 ETH of attestations. What is the minimum amount of stake that must have signed both checkpoints?
MCQ-2A bridge credits deposits from two chains. Chain A is proof of work; an adversary has sustained about 40% of its hashrate, and a 9-block reorg was observed last month. Chain B is post-Merge proof of stake with 12-second slots, finalizing a checkpoint every two epochs (64 slots, 768 s). The bridge's risk policy requires the probability that a credited deposit is later reorged to stay below 1e-6. Which confirmation policy holds up?
MCQ-3At slot n a beacon node running LMD-GHOST sees two children of one parent: 0xaa holds 8,200,000 ETH of attestation weight, 0xbb holds 8,199,995 ETH plus a 12.8 ETH proposer boost, and the node sets 0xbb as head. At slot n+3 the node reports 0xaa at 8,200,005 ETH and 0xbb still at 8,199,995 ETH, and now sets 0xaa as head; no FFG checkpoint changed. Which conclusion about the slot n+3 head is correct?
MCQ-4A marketplace credits a seller's balance when a mint transaction is 6 slots deep (72 s). Last month a 7-slot reorg at slot 7,881,200 dropped a mint after the seller had shipped a $180k physical item; the credit stayed and the item was gone. Daily volume is about 40k credits, most under $50, a few hundred between $1k and $5k, and roughly 20 above $50k. The team is fixing the confirmation policy before mainnet. Which policy fits this loss profile?
MCQ-7A bridge credits a deposit once its block is 64 blocks deep on the head chain (2 epochs, 12.8 minutes) and mints the wrapped asset immediately. At 09:00 UTC the beacon chain stops finalizing: the finalized checkpoint is stuck at epoch 210,000 while the head advances one epoch every 6.4 minutes. At 09:40 the head is at epoch 210,006, 38% of validators have been unreachable since 09:00 after a bad client release, and the bridge has credited $2.1M across 40 deposits. The connected validators are honest and attest normally. What is the correct read of the situation, and what should the bridge do now?
MCQ-11A bridge pays out a $40M mint the moment its node tags the deposit's checkpoint finalized; staked ETH is 32.0M. Last month a checkpoint that clients had tagged finalized was left behind when the chain followed a branch that excluded it, after validators holding roughly a third of that stake were caught signing conflicting checkpoints, and the deposit's receipt survived only on the abandoned branch. Which line belongs in the risk memo for the next release?
MCQ-92An exchange credits ETH deposits after 12 confirmations (~2.4 min at 12 s slots). During a 40-minute window in which a client bug keeps more than a third of validators from attesting, the head keeps advancing but no checkpoint finalizes, and a 3-block reorg removes a deposit that had already been credited and withdrawn. Which change addresses the failure?
MCQ-5A custodian's deposit service credits a customer when `eth_getTransactionReceipt` returns a block that the `safe` tag has reached. A 3,200 USDC deposit credited at slot 11,004,088 was reorged out four minutes later when the justified checkpoint moved; the USDC had already left the hot wallet. The deposit block sits 40 blocks behind the head. Which change to the settlement check should the review require?
MCQ-80A rollup bridge mints L2 deposits as soon as the L1 deposit transaction is included in a block tagged `latest`. L1 slots are 12 seconds; a block is `safe` (justified) about one epoch after inclusion and `finalized` about two epochs after. A 720 ETH deposit was minted on L2 and swapped into an AMM; six L1 blocks later a reorg replaced those blocks and dropped the deposit transaction, leaving 720 ETH of unbacked L2 ETH. The team wants a rule that no L1 reorg can break. Which rule does that?
MCQ-10A liquidation keeper on Ethereum mainnet must submit within 60 s of a position becoming unhealthy or a competing bot takes it. It polls `eth_blockNumber` every 12 s and runs its check only when the returned number changes. At slot 5000 the position becomes unhealthy. Slots 5000 and 5001 are missed; slot 5002 produces block N+1. What should the keeper do?
MCQ-8A liquidation keeper on Ethereum mainnet advances its clock by counting new block numbers from eth_getBlockByNumber: it fires when the counter reaches 64 since the last settlement check, treating that as 64 × 12 s = 768 s. In the window that just fired, the beacon chain missed 18 slots and the keeper's log scan recorded 62 Transfer receipts; it liquidated 14 positions. What does the trace show, and what should replace the counter?
MCQ-6An indexer ingests DEX swap logs into an append-only `swaps` table keyed by (blockHash, txHash, logIndex) and materializes account balances into a `positions` table by upsert on (account, market). Its 24h volume API sums `swaps` rows with blockTime in the last 24 hours. At stored head 1008 (hash H_a) the node reports head 1008 with hash H_b; the common ancestor is 1000. Blocks 1001–1008 hold 4,812 swap rows; the new branch 1001'–1008' holds 4,790. The indexer has already served the old branch. Which action makes the volume API and the positions table correct?
MCQ-12An indexer ingests ERC-20 Transfer logs with eth_getLogs using the `latest` tag and stores each row keyed by (txHash, logIndex), upserting on conflict. A rewards job re-runs every minute and sums `amount` per recipient over the last 32 blocks. At head 21,000,000 a 3-block reorg replaces blocks 20,999,998 through 21,000,000. The orphaned block 20,999,999 held tx 0xaaa (sender S, nonce 7) emitting Transfer(R, 9,300) at logIndex 3; the canonical block 21,000,000 holds tx 0xbbb (sender S, nonce 7) emitting Transfer(R, 9,300) at logIndex 3. R has no other transfers in the window, and the job reports 18,600 for R. Which change makes the job report the on-chain truth for R?
MCQ-90An indexer writes reward accruals with `UNIQUE (chain_id, block_number, log_index)` and keeps a cursor row holding only the last processed `block_number`. At 14:02 the chain reorged 12 blocks: heights 19,880,000–19,880,011 were replaced, and the replacement blocks carry Transfer logs at the same `(block_number, log_index)` coordinates as the discarded ones but with different tx hashes and amounts. The cursor already read 19,880,011, so the indexer resumed at 19,880,012 and never saw the replacements. Reconciliation against a node shows 44,000 users short by $0.90 each: $39,600. Which change makes the indexer converge on the node's canonical balances after this reorg and the next one?
MCQ-35A block-accounting service reports the ETH each proposer actually receives per block. For a transaction with gasUsed = 21,000, baseFee = 5 gwei, maxPriorityFeePerGas = 18 gwei, and maxFeePerGas = 20 gwei, which figure is the proposer's delta for that transaction?
MCQ-36A payout service submits 50,000 EIP-1559 transfers with maxFeePerGas = 30 gwei and maxPriorityFeePerGas = 2 gwei. Base fee climbs to 45 gwei and holds there. Nonce 17 is stuck; an operator resubmits the same transfer as nonce 18 with maxFeePerGas = 60 gwei and maxPriorityFeePerGas = 2 gwei. Ten minutes later, what is the state of the two transactions?
MCQ-39A user's mainnet (chain 1) account has latest nonce 5 and a transaction at nonce 5 that has been unconfirmed for 4 hours because its gas price is below the current base fee. Their Polygon (chain 137) account has latest nonce 42 with no pending transactions. Support advises sending a 0 ETH self-transfer on Polygon to resolve the stuck mainnet transaction. The user broadcasts it and it confirms at nonce 42. What is the state of the two accounts now?
MCQ-16A relayer signs legacy (type 0x00) transactions for Ethereum mainnet (chainId 1). Two raw signed blobs are captured from the mempool and rebroadcast to Polygon (chainId 137), where the relayer's account holds the same balance: - Tx A: nonce 7, v = 27 - Tx B: nonce 8, v = 38 Which blob executes on Polygon, and why?
MCQ-98An account using EntryPoint v0.7 sends a 3 ETH payment with nonce key 0, seq 0 through bundler A. The client times out after 45 s and shows 'failed'. The user retries: the wallet builds the same payment with nonce key 0, seq 0 and a 20% higher maxPriorityFeePerGas, and sends it to bundler B. Bundler B rejects it during simulation with AA25 invalid account nonce. The recipient confirms one 3 ETH payment landed. What should the engineer do next?
MCQ-37A rollup's sequencer posts blobs to a chain running Cancun's blob parameters: a 3-blob target and a 6-blob maximum per block. For 200 consecutive blocks it posts 6 blobs per block, and the blob base fee climbs from 1 wei to about 17 gwei. The surge ends and the sequencer settles at exactly 3 blobs per block. Over the next 50 blocks, what happens to the blob base fee?
MCQ-14A custody service derives deposit addresses with `keccak256(pubkey)[12:32]`. A client's secp256k1 key arrives as a 65-byte value beginning with 0x04. The service returns an address that is well-formed and passes EIP-55, but it does not match the address the client's hardware wallet shows for the same key. The service logs the keccak256 input as 65 bytes and its keccak256 matches a reference implementation on that input. What is the cause?
MCQ-19A treasury service derives 40 deposit addresses from one BIP-39 mnemonic at m/44'/60'/0'/0/i for i = 0..39, with no BIP-39 passphrase. The addresses hold 310 ETH in total, 12 ETH of it on index 0. During an incident an engineer pastes the mnemonic into a public Slack thread. Which remediation is correct?
MCQ-15A wallet validates EIP-55 on every pasted destination address: a mixed-case string whose letter casing does not match its keccak hash is rejected, while an all-lowercase string is accepted with no check. In one month the wallet logs 50,000 pastes; 40% are all-lowercase and the rest are mixed-case. Assume 1 paste in 1,000 contains a single-character typo, regardless of form, and that the check catches every single-character typo in a mixed-case address. How many typo'd addresses does the wallet accept?
MCQ-13A relayer service verifies user-signed transactions before submitting them. Its new helper takes the signed payload, (r, s, v) and the expected signer, recovers the address, and compares. It must handle both legacy and EIP-1559 (typed) transactions. Which review comment should be accepted?
MCQ-17A bridge indexer on Ethereum mainnet credits a deposit when it sees a transfer to the bridge address and stores the credit under `txHash`. An attacker copies a pending 40 ETH deposit, keeps `r` and the nonce, and rebroadcasts it with `s' = n − s` and the flipped `v`. The team's node is a current mainnet client. How many ETH does the indexer credit, and why?
MCQ-65A gasless withdrawal service lets users who hold no ETH sign an EIP-712 `Withdraw(address to, uint256 amount)` message; a relayer submits it and the contract calls `ecrecover` and pays out. The contract keeps no record of signatures it has already processed. Thousands of users share the service, each signing independently. An attacker copies a pending withdrawal from the mempool and resubmits it, and also submits the malleated twin with `s` replaced by `secp256k1n - s`; the contract pays each time. The relayer must stay, since users hold no ETH. Which change stops the double payout?
MCQ-18A voucher contract mints points when ecrecover(hash, v, r, s) equals signers[voucherId], a mapping that defaults to address(0), and marks the voucher used by keccak256(v, r, s). An attacker minted 50,000 points without any signer's key. Which remediation closes the bug class?
MCQ-46An owner with balanceOf(owner) = 1000, allowance[owner][spender] = 0 and permit nonce 4 signs permit(owner, spender, value=500, deadline). The spender submits the permit, then calls transferFrom(owner, merchant, 300), then calls transferFrom(owner, merchant, 300) again. What is the state after these calls?
MCQ-21A factory deploys two ERC-20 tokens, USDP and USDQ, both implementing EIP-2612 permit. The factory computes a single domain separator and hands the same bytes to both tokens: keccak256(abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes("USD Stable")), keccak256(bytes("1")), block.chainid, address(factory) )) Alice signs a permit approving Bob for 1000 USDP. Bob submits that exact signature to USDQ's permit(), which accepts it and credits him 1000 USDQ. Which change to the deployment stops the signature from being usable on USDQ?
MCQ-20The team must choose an approach to EIP-712 typed data hashing before mainnet. Which one holds up?
MCQ-22A factory deploys per-user accounts with CREATE2. Its salt is a constant bytes32(0) for every user. The creation code takes the owner address as a constructor argument. Alice deploys first; Bob deploys next through the same factory. What happens to Bob's deployment?
MCQ-55A team wants one hardcoded vault address across Ethereum and Base. They deploy VaultFactory on each chain from different deployer EOAs, so it lands at 0x1111… on Ethereum and 0x2222… on Base. Each factory creates vaults with CREATE2 using salt = keccak256(vaultId) and identical initcode. Vault vaultId=7 comes out at 0xAAAA… on Ethereum and 0xBBBB… on Base. Which explanation and fix is correct?
MCQ-24A rollup sequencer signs 2,300 batches/day with an 80 ms p99 signing budget. The sequencer host holds one hot key authorized for both batch submissions and proxy admin upgrades. During a compromise, the attacker used that key to send 1,842 batch transactions and one upgradeTo transaction that drained $19M. Upgrades happen once a quarter and can wait 48 h. In this deployment, a network HSM signs in 12 ms p99, while a manual hardware-wallet confirmation takes 1.5 s. Which change addresses the cause while meeting the batch signing budget?
MCQ-32A vault compiled with Solidity 0.8.20 stores `feeBps` as `uint256` and derives the fee tier with `uint8 tier = uint8(feeBps)`. Governance sets `feeBps = 300`. On a deposit of 1e18 wei the contract runs: ```solidity uint256 fee = 1e18 * uint256(tier) / 10_000; ``` What is `fee`, and does the call revert?
MCQ-41A contract is compiled with Solidity 0.8.24: ```solidity contract Meter { uint256 public plain; uint256 public routed; receive() external payable { plain += 1; } fallback() external payable { routed += 1; } } ``` From a fresh deployment, three separate calls arrive in order: (A) 1 ETH with empty calldata; (B) 0 ETH with calldata `0xdeadbeef`; (C) 0 ETH with empty calldata. What does the contract report for `(plain, routed)`?
MCQ-40A vault's withdraw() pays out with payable(msg.sender).transfer(amount) and updates balances[msg.sender] after the payout. A test receiver whose fallback writes one storage slot (about 20,000 gas) reverts every withdrawal, even when the transaction is sent with a 500,000 gas limit. Which change makes the payout succeed and keeps the vault safe from reentrancy?
MCQ-23A vault contract holds 40 ETH. Its withdrawAll() is `require(tx.origin == owner, "not owner"); payable(msg.sender).transfer(address(this).balance);`, with owner set to the EOA 0xA11CE. 0xA11CE signs one transaction that calls claim() on an attacker contract 0xBAD, which has a payable fallback and whose claim() calls vault.withdrawAll(). What happens?
MCQ-28A vault holds 4,200 ETH. Its `sweep(address to)` is guarded by `require(tx.origin == owner)`. The owner is an EOA and calls `sweep` directly; a `Keeper` contract deployed by the owner also calls `sweep` on a schedule. An attacker deploys `Phish`, which calls `vault.sweep(attacker)`. The owner is tricked into calling `Phish.claim()`. The sweep executes and the 4,200 ETH leaves. Which change fixes the cause?
MCQ-42A vault holds 10 ETH deposited by other users. Its `withdraw(uint256 amt)` runs `require(balances[msg.sender] >= amt)`, then `msg.sender.call{value: amt}("")`, then `balances[msg.sender] -= amt`. An attacker contract deposits 1 ETH and, from its `receive()`, calls `withdraw(1 ETH)` again before the first call returns. Which change stops the drain, and what is the most the attacker can then withdraw in that transaction?
MCQ-43A vault holds 100 USDC from honest depositors and has issued 100 shares. deposit() computes shares = amount * totalShares / totalAssets, mints them, then calls token.transferFrom; the token is ERC-777, so transferFrom fires a tokensToSend hook on the sender before balances move. An attacker holding 200 USDC calls deposit(100), and its hook reenters deposit(100) once. Both transfers complete: the vault holds 300 USDC and 400 shares are outstanding, 300 of them the attacker's. Which change removes the loss?
MCQ-99A router holds 40 ETH of float deposited by other users. Its batch entry point delegates each entry back into the router's own code: function multicall(bytes[] calldata data) external payable { for (uint256 i; i < data.length; i++) { (bool ok,) = address(this).delegatecall(data[i]); require(ok, 'subcall failed'); } } function payOrder(uint256 id) external payable { require(!paid[id], 'already paid'); require(msg.value == orderPrice[id], 'wrong value'); paid[id] = true; (bool ok,) = treasury.call{value: msg.value}(''); require(ok, 'transfer failed'); } orderPrice[1], orderPrice[2] and orderPrice[3] are each 0.6 ETH and none of them is paid. A user submits one multicall transaction with msg.value = 0.6 ETH and data = [payOrder(1), payOrder(2), payOrder(3)]. What is the outcome?
MCQ-33Solidity 0.8.24. A rewards contract runs one batch payout per transaction, and its withdraw path transfers `balances[msg.sender]`: ```solidity function pay(uint256[] calldata amounts) external { uint256 total; for (uint256 i; i < amounts.length; ++i) { total += amounts[i]; balances[msg.sender] -= amounts[i]; } emit Paid(total); } ``` A gas snapshot on a 400-element batch reads 402,000 gas. The `++i` counter check, the `total +=` check and the `balances -=` check each cost about 33 gas per iteration, so 400 x 3 x 33 = 39,600 gas of that batch goes to overflow checking. The contract holds 1,240 ETH in balances. The team wants the largest cut to that 402,000 that cannot change behaviour for any input. Which edit ships?
MCQ-34A vesting contract stores `cliff`, `start` and `duration` as `uint32` seconds, all written by one governance call that takes `uint256`. Governance passes `cliff = 2**32 + 3600`; the transaction succeeds and the beneficiary withdraws the full balance one hour later. What is the correct remediation?
MCQ-51A `BatchPayout` contract (Solidity 0.8.x) holds 50 ETH of accumulated protocol fees. Its only payout path is: ```solidity function payout(address[] calldata payees) external payable { for (uint256 i = 0; i < payees.length; i++) { (bool ok, ) = payees[i].call{value: msg.value}(""); require(ok, "payout failed"); } } ``` An attacker calls `payout([X, Y, Z])` with three addresses they control and `msg.value = 2 ether`. The transaction succeeds. What do X, Y and Z receive in total, and how does the contract's reserve change?
MCQ-57An NFT drop caps supply at 100 and allows one mint per wallet: ```solidity uint256 public nextId; mapping(address => uint256) public mintedBy; function mint() external { require(mintedBy[msg.sender] == 0, "one per wallet"); require(nextId < 100, "sold out"); _safeMint(msg.sender, nextId++); mintedBy[msg.sender] = 1; } ``` An attacker deploys a contract whose `onERC721Received` calls `mint()` again inside a `try/catch`, then calls `mint()` once from that contract. What does the transaction do?
MCQ-58A launchpad caps each wallet at 1 unit of any id. Its mint path is: ```solidity function mintBatch(uint256[] calldata ids, uint256[] calldata amounts) external { for (uint256 i = 0; i < ids.length; i++) { require(amounts[i] == 1, "one per id"); } token.safeBatchTransferFrom(address(this), msg.sender, ids, amounts, ""); } ``` A wallet calls `mintBatch([7, 7, 7], [1, 1, 1])` and ends the transaction holding 3 units of id 7. Which change enforces the 1-per-id cap?
MCQ-52A token uses OpenZeppelin `AccessControl` (v5). `pause()` is `onlyRole(PAUSER_ROLE)`, `mint()` is `onlyRole(MINTER_ROLE)`, and `grantRole` is `onlyRole(DEFAULT_ADMIN_ROLE)`. Three separate Safes hold the roles: `PAUSER_ROLE` a 3-of-5, `MINTER_ROLE` a 4-of-7, `DEFAULT_ADMIN_ROLE` a 5-of-8. The deployer renounced its `MINTER_ROLE` after deployment. An attacker compromises the 3-of-5 pauser Safe and, with its three signatures, submits `mint(attacker, 1_000_000e18)` and then `grantRole(MINTER_ROLE, attacker)`. What happens?
MCQ-53A DAO uses OpenZeppelin TimelockController with minDelay = 48h. At t=0 the multisig schedules upgradeTo(0xImplB) with salt=0x01. At t=10h it schedules upgradeTo(0xImplC) with salt=0x02 and predecessor=0. Both operations are queued; the first is never executed. Watchers track the operation ID emitted by the first CallScheduled event. At t=48h the second operation executes and the proxy admin changes to 0xImplC. Which review conclusion is correct?
MCQ-54An Ethereum lending market runs a PauseGuard with two independent flags: riskIn blocks deposit and borrow, while exitFreeze blocks withdraw and transfer but always leaves repay open. Both flags are callable by a 3-of-5 incident multisig; code and parameter changes wait 48 hours behind a timelock. The market's max LTV is 80%. The ETH/USD oracle has not updated for 42 minutes against a 30-minute maxAge, and it reports 2,150 while three exchanges report 1,780. An address holding 10,000 ETH has just borrowed 15M USDC in three calls, and the mempool shows a 15M USDC transfer from that address to a fresh EOA. The incident commander must choose the first on-chain action. Which action is correct?
MCQ-45A DAO ops key holds a standing allowance of 1,000,000 USDC to a payments router, the only address with a non-zero allowance. A PR changes the router's top-up from `approve(1e6)` to `approve(2e6)` on a standard ERC-20. The ops key is a 3-of-5 multisig; the router is upgradeable and its admin key is a hot wallet. Which statement should the review accept?
MCQ-47A blockchain developer is asked to justify the handling of infinite ERC-20 allowances. Which justification is sound?
MCQ-89A settlement contract keys pending orders by a 64-bit truncated hash of the order struct. It is expected to process 2^30 orders over its lifetime, and a key collision silently overwrites an existing order, dropping a fill. Using the birthday bound, what is the chance of at least one collision, and what should the team do?
MCQ-91An NFT indexer consumes Transfer logs from a Kafka topic (at-least-once) on a single chain and mints one receipt NFT per payment. Its dedupe key is the transaction hash: before minting it checks a `processed` table keyed on txHash. One batch holds 1,150 payment logs. Twelve of the transactions each minted two tokens in a single transaction, emitting two Transfer logs from the zero address; the other 1,126 transactions emitted one log each. The batch spans 900 blocks, each holding at most four of these logs, with logIndex values 0–3. The indexer minted fewer receipts than there were payments. Which key makes the batch mint exactly 1,150 receipts?
MCQ-93A team is reviewing a Merkle-distributor airdrop contract before deployment. The allocation set is frozen at deploy time and a single distributor holds every allocation; some addresses hold more than one. The tree is built off-chain over (account, amount) pairs, and the contract stores merkleRoot and pays out on a valid proof. Which review comment should the team accept?
MCQ-94A vault's `deposit()` runs `bool ok = IERC20(USDT).transferFrom(msg.sender, address(this), amount); require(ok);`. Unit tests against a `MockERC20` that returns `true` all pass. A Foundry test pinned with `vm.createSelectFork(rpc, 19_000_000)` reverts inside `deposit()` with no reason string, even though the test address holds 1,000,000 USDT and has approved the vault for the full amount. What is the cause and the correct fix?
MCQ-95A vault's `deposit(uint256 assets)` mints `assets * totalSupply() / totalAssets()` shares, and `totalAssets()` returns `asset.balanceOf(address(this))`. The suite has one test, `testFuzz_deposit(uint96 assets)` with `runs = 1000`, and it passes on every run. Any address can also call `asset.transfer(address(vault), amount)` directly. An attacker deposits 1 wei, transfers 1e18 tokens to the vault, and the next depositor's 1e18 - 1 deposit mints 0 shares. Which change to the suite would have caught this?
MCQ-96A keeper bot quotes a WETH→USDC swap with eth_call at block tag latest, from = the bot's address, no state overrides. The quote is 12,400 USDC out for 5 WETH. It sends the tx with minOut = 12,400. The tx mines two blocks later and reverts; the pool would have returned 11,900. Gas cost 0.021 ETH. Across the last 100 fills the bot's quotes ran a median 380 USDC above the mined amount, p95 gap 900. Which change addresses the cause of the revert?
MCQ-97A payout service releases USDC when a deposit receipt shows status 1. It reads receipts from one public RPC. A test run against that endpoint returned status 1 for a 500 ETH transfer at block 21,450,000, and the same endpoint reported eth_blockNumber 21,450,012. The tx hash appears in no other provider, and the team's own consensus node has finalized head 21,449,000. The service released $1.4M of fiat in 8 minutes. Which check should gate the payout?
MCQ-100A protocol ships before mainnet with two timestamp uses: a 7-day vest gate and a same-slot raffle that picks one winner among all mints in a block. Which approach holds up?
MCQ-85A Groth16 rollup's mint circuit constrains `newBalance = oldBalance + amount` over the BN254 scalar field Fr (r = 21888242871839275222246405745257275088548364400416034343698204186575808495617) and exposes `amount` as a public input; the Solidity contract mints `amount` as a uint256. A fuzzer runs 10,000 traces and finds 3 where `amount = r - 1`; the verifier accepts each proof and the contract mints r - 1 tokens. Which conclusion should the review record?
MCQ-26A Vault's storage layout is slot 0 `owner`, slot 1 `totalDeposits`, slot 2 `paused`, slot 3 `mapping(address => uint256) balances`. Alice (0x…00A1) deposited, so `balances[alice]` is 4_100_000e18. A test that read slot 3 directly got 0. Which `vm.load` call returns the word holding alice's balance?
MCQ-25A vault's V1 declares `uint128 shares; uint128 unlockTime; address owner;`. Solidity packs `shares` and `unlockTime` into slot 0 and puts `owner` in slot 1. V2 inserts `uint128 feeBps` between `shares` and `unlockTime` and ships. After the upgrade, `owner()` returns address(0). Which layout does V2 produce?
MCQ-29A team deploys an upgradeable ERC-20 behind a hand-rolled proxy. The proxy's fallback reads the implementation address from storage slot 0 and `delegatecall`s into it. `TokenV1` declares `address owner` at slot 0, `uint256 totalSupply` at slot 1, and `mapping(address => uint256) balanceOf` at slot 2. The proxy is deployed against TokenV1, then the deployer (0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266) calls `initialize()`, which sets `owner = msg.sender`. The next call, `totalSupply()`, reverts. What caused the revert?
MCQ-30A protocol runs behind an ERC1967 proxy whose implementation V1 inherits OpenZeppelin 5's UUPSUpgradeable; upgradeToAndCall is the only upgrade entrypoint and the owner is a 3-of-5 multisig. A hotfix implementation, V2, is deployed with the same storage layout and logic but accidentally without UUPSUpgradeable, so it exposes no proxiableUUID() and no upgradeToAndCall. The multisig then calls upgradeToAndCall(V2, empty bytes) on the proxy address. What is the result?
MCQ-31An ERC1967 proxy is deployed in tx A at block 21,000,000, pointing at implementation V1. V1's constructor calls _disableInitializers(); V1 inherits OpenZeppelin's Initializable and UUPSUpgradeable. The deploy script's tx B calls initialize(teamMultisig) on the proxy and is mined at block 21,000,003. A searcher's bot calls initialize(searcherEOA) on the proxy at block 21,000,001. The proxy holds 1,240 ETH of user deposits. What is the outcome?
MCQ-27A bridge's `relay(bytes calldata proof)` verifies a 1,024-byte proof and, for debugging, appends it to a storage array with `debugProofs.push(proof)`. Each relay costs about 690k gas; the same function with the append removed costs about 52k. The team still needs every proof queryable off-chain after the fact. Which change removes most of the remaining cost?
MCQ-56A factory deploys constant-product pools pairing USDC with any listed ERC-20. One pool pairs USDC with FEE, a token that burns 1% of every transfer. Its swap path runs `FEE.transferFrom(trader, pair, amountIn)` and then `reserveFEE += amountIn`. After 500 swaps of amountIn = 10,000 FEE, recorded `reserveFEE` sits 50,000 FEE above the pair's real FEE balance, and LPs have withdrawn USDC against reserves that were never there. Which change fixes the accounting?
MCQ-60A lending vault records collateral as a static amount at deposit time, `collateral[user] += amount`, and its health check reads that stored number, never `balanceOf`. Alice deposits 1,000 of a rebasing collateral token (balanceOf = 1,000) and borrows 700 USDC at the 80% max LTV. The token then rebases -25% with no `Transfer` event. What does the vault's health check report, and how does its recorded collateral compare to the tokens it holds?
MCQ-62A lending market on an EVM chain takes USDC (6 decimals) as collateral and WETH (18 decimals) as debt. The oracle returns USD prices with 8 decimals. Collateral is valued with `valueUsd = amount * price / 1e18`, which passed tests with WETH and a mock oracle returning 18-decimal prices. A user deposits 1,000,000 USDC (1e12 raw units) when the real feed reports $1.00 (1e8). The protocol records the collateral as 100 wei USD. Which change makes the recorded value correct?
MCQ-59A router sets minSharesOut = vault.convertToShares(assets) and then calls vault.deposit(assets, receiver). The vault charges a 0.5% deposit fee in shares and rounds down. At the time of the call, totalSupply = 1,000,000 shares and totalAssets = 1,200,000 USDC. A user deposits 12,000 USDC. What does the deposit call do?
MCQ-64A router swaps 10e18 tokenIn into a Uniswap v2 pool holding 1000e18/1000e18 and returns 9.90099e18 tokenOut. A test asserting k_after >= k_before passes. What does the passing test show?
MCQ-67A lending market accepts Uniswap v3 LP NFTs as collateral. Its adapter values each position as if it held its full liquidity split evenly between the pool's two tokens, using slot0.sqrtPriceX96 as the price. A borrower's position in the token0/token1 pool has range ticks [200000, 200200]; the pool's current tick is 200100. A keeper then executes a swap that pushes the pool tick to 201000, where it settles. Which statement about the position and the adapter's valuation is correct?
MCQ-66A lending market prices collateral from a Uniswap v2 pair holding $5M of liquidity and caps borrowing at $2M against it. The oracle reads a 2-block TWAP (24s on this chain). An attacker held the pool 20% off-market for two blocks and drained the full $2M. The team's cost model puts holding the pool 20% off-market at about $20k per block in arbitrage paid to other traders, and the risk policy forbids an oracle that lags real price moves by more than 30 minutes. Which window should they set?
MCQ-70An engineer argues their lending market is safe from flash-loan price manipulation: "A flash loan must be repaid before the transaction ends, so any price move it causes is reversed before the transaction can do anything with it." The market prices collateral from a Uniswap V2 pair's spot reserves, and an attacker can borrow 3,000,000 USDC at 9 bps. Which statement is correct?
MCQ-71A user sells 400 ETH into a constant-product pool holding 40,000 ETH and 100,000,000 USDC (no fee, to keep the arithmetic clean). The aggregator quotes 990,099 USDC and the user sets minAmountOut to 985,148 USDC. A searcher front-runs by selling 100 ETH, the user's transaction executes, then the searcher buys back 100 ETH. What is the outcome?
MCQ-75A treasury sends a 400 ETH swap through a private relay with minOut=0, believing private orderflow cannot be sandwiched. The relay's builder set is the only intermediary; the transaction never appears in the public mempool. It executes 5% below mid. The desk must diagnose the loss and choose the next execution policy. Which diagnosis and next step is correct?
MCQ-68A lending market sets LTV = 75% and liquidation threshold = 80%. A user deposits $10,000 of ETH and borrows the maximum the LTV allows. ETH then falls 3%, leaving the collateral worth $9,700. What is the position's health factor, and is it liquidatable?
MCQ-69A lending market uses a 50% close factor, an 8% liquidation bonus, and an 80% liquidation threshold. A position holds 60 ETH of collateral at $2,000 and $100,000 USDC of debt. A keeper calls liquidate with repayAmount = $100,000; the market clamps the repayment to debt × closeFactor instead of reverting, and pays the bonus in seized collateral. What does the call do?
MCQ-72An Aave-style pool fork uses RAY = 1e27. Alice's scaled balance is 800e18 and the reserve's liquidityIndex is 1.05e27, so balanceOf(alice) returns 800e18 * 1.05e27 / 1e27 = 840e18. The reserve holds 850e18 of the underlying token. The withdraw path is: uint256 shares = amount * liquidityIndex / RAY; _burn(msg.sender, shares); token.transfer(msg.sender, amount); The contract is compiled with Solidity 0.8.20, _burn uses checked arithmetic, and Alice calls withdraw(840e18), her full displayed balance. What happens?
MCQ-73A lending market uses a kink rate model with kink=80%, base=0%, slope1=5%, and slope2=300%. Utilization is currently 93%. What is the borrow APR?
MCQ-74An L2 lending market values USDC collateral at the raw price from a single USDC/USD oracle feed and liquidates any position whose LTV exceeds 0.90. At 03:12 the feed prints $0.87; the $40M USDC-collateralized book sits at LTV 0.85 and would be liquidated at that price. A second oracle aggregating CEX prices reads $0.999, and on-chain USDC/USDT pools with $30M of depth trade at $0.998–$1.001. What should the on-call engineer do?
MCQ-48An Arbitrum lending market uses the ETH/USD Chainlink feed with a 3600s heartbeat. At now=1_700_000_000, latestRoundData returns roundId=18446744073709551616, answer=3400e8, startedAt=1_699_996_300, updatedAt=1_699_996_300, answeredInRound=18446744073709551616, and decimals=8. The market's only check is answer > 0, so it accepted the price and let a borrower keep $4.6M of collateral as if ETH were still $3,400. Which change addresses the cause?
MCQ-49A lending market reads an ETH/USD push feed with a 3600s heartbeat and a 0.5% deviation threshold, plus a 30-minute TWAP. At block N the feed printed $1,180, down 32% from $1,735; the 30-min TWAP was $1,712. At block N+1 the feed printed $1,730 again. In between, 220 accounts were liquidated for $8.1M. The team is adding a circuit breaker. Which breaker behaviour fits this incident?
MCQ-50A USDC vault (6 decimals) implements ERC-4626 with deposit minting shares = assets * totalSupply / totalAssets and redeem returning assets = shares * totalAssets / totalSupply, both using integer floor division. It starts empty (totalSupply = 0, totalAssets = 0). An attacker deposits 1 unit (0.000001 USDC), receiving 1 share, then transfers 1,000,000 USDC directly to the vault address without calling deposit. A victim then calls deposit with 1,000,000 USDC. What happens?
MCQ-44A lending market prices Curve-style LP collateral with pool.get_virtual_price() and lets a user deposit LP and borrow in one transaction. The pool's remove_liquidity decrements its stored balances before the ERC777 transfer out returns, so during the transfer hook the stored balances no longer match the pool's actual token holdings. An attacker flash-loans 20M USDC, mints LP, calls remove_liquidity on part of it, and in the ERC777 hook borrows against the LP they still hold at the mid-callback price of 1.42; the settled price is 1.01. The market must keep pricing in the same transaction as the deposit. Which change actually closes this?
MCQ-61A checkout service signs Permit2 permits server-side and a relayer submits them. The config sets `expiration: 0` with the comment `// 0 = no expiry`. At block.timestamp 1,700,000,000 every `permitTransferFrom` call reverts with `SignatureExpired`. The user's USDC balance is 500e6, the permit amount is 100e6, and `USDC.allowance(user, Permit2)` is already 500e6. What is the correct fix?
MCQ-63A 10,000-piece collection mints with a placeholder image and reveals traits 48 hours later by pointing baseURI at a new IPFS directory. Marketplaces price secondary listings off the revealed traits, and the team's requirement is that a trait shown when a listing is created cannot change afterwards. Which design meets that requirement?
MCQ-86A protocol bridges 100 ETH a day from Ethereum to Arbitrum and serves tokenURI for 12 million reads a month. Today every tokenURI read sends one Chainlink CCIP message to a metadata chain; at a hypothetical $0.0033 per message that is about $39,600 a month, and the treasury is draining. tokenURI must return the latest metadata on every call, metadata must cost under $100 a month, and the ETH bridge must keep working. Which change fixes the root cause?
MCQ-76A treasury desk holds 400 ETH on an optimistic rollup whose challenge window is 7 days. To pay a 400 ETH invoice due on L1 at t = 6 days, it initiates a withdrawal at t = 0; the batch containing that withdrawal is posted to L1 at t = 6 hours. Which outcome is correct?
MCQ-78Your rollup's L1 inbox contract guarantees that any message enqueued on L1 is included in an L2 batch within 24 hours; if the sequencer has not included it by then, the L1 derivation pipeline includes it directly and the sequencer can no longer exclude it. The sequencer is killed at 09:00 Monday. At 09:30 Monday a user enqueues a withdrawal on the L1 inbox. The sequencer restarts at 09:00 Tuesday and resumes producing batches, but it omits the user's message. What happens to the withdrawal?
MCQ-79A rollup's canonical bridge is under review before launch. The threat model treats the L2 RPC endpoint as untrusted, it may return fabricated roots and proofs, and assumes a relayer can resubmit any message it has already seen. Which withdrawal-proving design holds under both?
MCQ-81A rollup posts its 128 kB batches as EIP-4844 blobs and runs a 30-day fault-proof window that its bridge contract does not allow it to shorten. It keeps no copy of batch data off-chain. On day 25 a challenger needs the batch posted on day 1 to disprove a state root, and the rollup asks a consensus node for it. What does the node return?
MCQ-88A rollup posts a state root to L1 every 30 minutes, and its withdrawal contract accepts a withdrawal when the caller supplies a Merkle proof of their leaf against any root posted in the last 24 hours. Batch 4,812's data was published to the DA layer at 13:58 and its root R was posted to L1 at 14:00. Alice fetched the batch data at 13:59 and computed a proof for her leaf. At 14:30 the DA provider went offline and the batch data is no longer retrievable anywhere. Bob deposited in batch 4,812 and never fetched the data. At 15:00, what can each do?
MCQ-83A rollup enforces forced inclusion in its L1 contract: a message enqueued at L1 block B must appear in a batch whose L1 block is at most B + 7200, or that batch fails verification. A user enqueues at block 20,000,000. The sequencer posts batches at L1 blocks 20,006,000, 20,007,000 and 20,007,500; none contains the message, and all three verify on L1. What does this establish?
MCQ-84A rollup posts a state root to L1 every 2 minutes. Its blob sidecars are posted in a batch every 30 minutes, at :00 and :30, covering every root posted since the previous batch. At 11:50 the head root is R(11:50) and the last sidecar batch landed at 11:30. A user's withdrawal proof against R(11:48) fails with 'missing preimage'. Against which root does the newest proof succeed right now?
MCQ-82A zk rollup's bridge holds 9,800 ETH. At 14:00 the sequencer posts batch B with a state root that would release 4,200 ETH to a new address. The prover service has been down since 11:00, so the verifier contract has not accepted a proof for B. The explorer shows the root with 12 confirmations. What should the team do?
MCQ-77A zk-rollup bridge releases L2→L1 withdrawals as soon as the batch's validity-proof verify tx is included in an L1 block. Last month a 2-block reorg dropped a verify tx 40 s after inclusion, and the bridge had already paid out 190 ETH. Measured pipeline: sequencing 2 s; proof generation p50 25 min; verify tx included 12 s after submission; Ethereum finality ~13 min after inclusion. A withdrawal is sequenced at t=0 and its verify tx is included at t=25 min 12 s. The team wants to stop releasing on txs that can still be reorged out. What is the earliest time the bridge may release?
MCQ-87A bridge mints WETH on L2 by locking ETH in a single L1 escrow contract; a withdrawal burns L2 WETH and then releases ETH from escrow. The dashboard reads L2 WETH supply directly from the token contract, sums every contract that can mint that WETH, and reports L1 escrow 480,000 ETH against L2 supply 500,000 ETH. The bridge also runs a burn-and-mint path for a separate native L2 token, nETH, tracked on its own. The team calls the 20,000 difference "deposits still in flight." What does the gap indicate?
MCQ-38A rollup posts each batch as one EIP-4844 blob and commits the batch's state root in the same slot, keeping no sidecar copy of its own and treating Ethereum as its data-availability layer. Its fraud-proof window is 7 days today, and governance is about to raise it to 30 days so a security-council review can finish before a batch finalizes. Batches go out every 12 seconds, one blob each. The extension goes live, a batch posted on day 0 is challenged on day 25, and the team has archived nothing. Which statement is true of that challenge?