Crypto Jobs Advanced Topics 2 — Questions and Answers
Question 1: In a layer-2 rollup, what distinguishes an optimistic rollup from a zk-rollup?
- Optimistic rollups assume validity and allow fraud-proof challenges, while zk-rollups submit validity proofs (Correct answer)
- Optimistic rollups use zero-knowledge proofs while zk-rollups assume validity
- Both require a 7-day challenge period before finality
- zk-rollups store all data off-chain while optimistic rollups store none
Correct answer: Optimistic rollups assume validity and allow fraud-proof challenges, while zk-rollups submit validity proofs
Optimistic rollups assume transactions are valid and rely on fraud proofs during a challenge window, whereas zk-rollups post cryptographic validity proofs for each batch.
Question 2: A protocol engineer must reduce MEV extraction harming users. Which approach directly addresses this?
- Increasing the gas limit per block
- Implementing encrypted mempools or proposer-builder separation (Correct answer)
- Lowering the block reward
- Removing the nonce field from transactions
Correct answer: Implementing encrypted mempools or proposer-builder separation
Encrypted mempools and proposer-builder separation reduce front-running by hiding transaction details or separating who orders transactions from who proposes blocks.
Question 3: Which statement about a 51% attack on a Proof-of-Work chain is most accurate?
- It lets the attacker steal coins from any wallet directly
- It allows double-spending and transaction censorship but not altering protocol rules (Correct answer)
- It permanently mints new coins beyond the supply cap
- It only affects testnets, never mainnets
Correct answer: It allows double-spending and transaction censorship but not altering protocol rules
Controlling majority hash power enables double-spends and reorg-based censorship but cannot break cryptographic ownership or change consensus rules unilaterally.
Question 4: In smart contract security, what is a reentrancy vulnerability?
- When a contract runs out of gas mid-execution
- When an external call lets a malicious contract re-invoke the function before state updates complete (Correct answer)
- When two users submit the same transaction simultaneously
- When a contract is deployed twice to the same address
Correct answer: When an external call lets a malicious contract re-invoke the function before state updates complete
Reentrancy occurs when an external call allows attacker code to call back into the vulnerable function before its state is updated, as in the DAO hack.
Question 5: What is the primary purpose of a Merkle tree in a blockchain?
- To encrypt user private keys
- To enable efficient and verifiable proof that a transaction is included in a block (Correct answer)
- To set the difficulty target for mining
- To store the entire transaction history in each wallet
Correct answer: To enable efficient and verifiable proof that a transaction is included in a block
Merkle trees let a light client verify a transaction's inclusion using only a small proof path rather than the full block.
Question 6: A DeFi protocol's liquidity pool suffers an oracle manipulation attack. What likely happened?
- The attacker guessed an admin's password
- The attacker used a flash loan to skew a price feed and exploit dependent contracts (Correct answer)
- The attacker mined an empty block
- The attacker reduced the pool's gas fees to zero
Correct answer: The attacker used a flash loan to skew a price feed and exploit dependent contracts
Flash-loan-driven oracle manipulation temporarily distorts an asset price that other contracts trust, enabling profitable exploits.
Question 7: Which best describes the role of a validator in a Proof-of-Stake network?
- They solve computational puzzles to find blocks
- They lock up stake and propose or attest to blocks, risking slashing for misbehavior (Correct answer)
- They manually approve every user withdrawal
- They control the central exchange order book
Correct answer: They lock up stake and propose or attest to blocks, risking slashing for misbehavior
PoS validators stake capital to propose and attest blocks, and can be slashed (lose stake) for malicious or faulty behavior.
In a layer-2 rollup, what distinguishes an optimistic rollup from a zk-rollup?