Unit 4: Ethereum blockchain and Distributed applications - Practice Quiz

CSC307 — Blockchain Architecture And Design-I 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 Ethereum is best described as a blockchain platform that supports which key feature beyond simple value transfer?

introduction to Ethereum as a blockchain platform Easy
A. Physical mail delivery tracking
B. Centralized account storage
C. Smart contracts and programmable logic
D. Only peer-to-peer messaging

2 Who is widely credited as the primary creator of Ethereum?

introduction to Ethereum as a blockchain platform Easy
A. Vitalik Buterin
B. Tim Berners-Lee
C. Satoshi Nakamoto
D. Linus Torvalds

3 What is the native cryptocurrency of the Ethereum platform?

ether Easy
A. Litecoin (LTC)
B. Ripple (XRP)
C. Ether (ETH)
D. Bitcoin (BTC)

4 The smallest denomination of ether is known as:

ether Easy
A. Wei
B. Gwei-cent
C. Finney-bit
D. Satoshi

5 What is the primary role of the Ethereum Virtual Machine (EVM)?

Ethereum virtual machine Easy
A. Routing internet packets
B. Storing user passwords
C. Executing smart contract bytecode
D. Mining physical hardware

6 On the Ethereum network, the resource consumed to run computations on the EVM is called:

Ethereum virtual machine Easy
A. Credit
B. Charge
C. Gas
D. Fuel

7 In Ethereum, which key must always be kept secret by the owner?

keys Easy
A. Session key
B. Public key
C. Private key
D. Network key

8 An Ethereum public key is mathematically derived from the:

keys Easy
A. Private key
B. Gas price
C. Block hash
D. Node ID

9 A standard Ethereum address is how many hexadecimal characters long (excluding the "0x" prefix)?

addresses Easy
A. 40
B. 64
C. 32
D. 20

10 An Ethereum address is typically derived from the last 20 bytes of the hash of the:

addresses Easy
A. Gas limit
B. Private key
C. Public key
D. Transaction nonce

11 Which of the following is required to send a valid Ethereum transaction?

transaction Easy
A. A government license
B. A digital signature from the sender
C. A physical paper form
D. Approval from a central bank

12 What field in an Ethereum transaction prevents the same transaction from being replayed?

transaction Easy
A. Nonce
B. Timestamp
C. Gas price
D. Block hash

13 In Ethereum, a message (internal transaction) is typically generated by a:

message Easy
A. Node joining the network
B. Contract calling another contract
C. Miner selecting blocks
D. User creating a wallet

14 Unlike regular transactions, Ethereum messages are:

message Easy
A. Not stored on the blockchain as standalone entries
B. Broadcast to external exchanges
C. Signed by miners
D. Always rejected by the EVM

15 Which of the following is a well-known Ethereum test network?

Ethereum network Easy
A. Mainframe
B. Sepolia
C. Corechain
D. Testlink

16 Which tool is commonly used as a browser-based Ethereum wallet in the ecosystem?

Ethereum ecosystem Easy
A. Excel
B. Photoshop
C. MetaMask
D. WordPress

17 A distributed application built on Ethereum is commonly abbreviated as:

implementing distributed applications Easy
A. DApp
B. WebApp
C. NetApp
D. SysApp

18 Which language is most commonly used to write Ethereum smart contracts?

implementing distributed applications Easy
A. Solidity
B. Pascal
C. Swift
D. Kotlin

19 In a blockchain document verification DApp, what is usually stored on-chain instead of the full document?

document verification Easy
A. The author's password
B. A scanned image gallery
C. The entire PDF file
D. The document's hash

20 In an Ethereum event registration DApp, smart contract "events" are mainly used to:

event registration Easy
A. Delete blocks from the chain
B. Log and notify front-ends about on-chain actions
C. Mine new ether automatically
D. Encrypt the entire network

21 A developer wants a blockchain that supports Turing-complete smart contracts rather than just value transfers. Why is Ethereum preferred over Bitcoin for this purpose?

introduction to Ethereum as a blockchain platform Medium
A. Ethereum provides a general-purpose programmable execution environment
B. Ethereum uses a faster SHA-256 hashing scheme
C. Ethereum stores no account balances on-chain
D. Ethereum has no concept of transaction fees

22 A team deploys and tests a contract without spending real funds before releasing it on the live chain. Which network should they use?

Ethereum network Medium
A. The Ethereum mainnet
B. The EVM bytecode layer
C. A private key vault
D. A testnet such as Sepolia

23 Which component of the Ethereum ecosystem allows a web application to interact with smart contracts from a browser?

Ethereum ecosystem Medium
A. A proof-of-work nonce generator
B. A Merkle Patricia trie compactor
C. A JavaScript library such as Web3.js connecting to a node
D. A gas refund scheduler

24 In Ethereum, how is a public key mathematically derived from a private key?

keys Medium
A. By encrypting the private key with RSA
B. Through elliptic curve multiplication on the secp256k1 curve
C. By applying Keccak-256 twice to the private key
D. By XOR-ing the private key with the chain ID

25 An Ethereum address is derived by taking which portion of the Keccak-256 hash of the public key?

addresses Medium
A. The last 20 bytes
B. The first 20 bytes
C. The full 32 bytes
D. The middle 16 bytes

26 A user sends a transaction with a gas limit of 21000 and a gas price of 50 Gwei. What is the maximum fee they could pay?

transaction Medium
A. Gwei (0.00105 ETH)
B. Gwei (0.00042 ETH)
C. ETH
D. Gwei total

27 In the EVM, what distinguishes a message (internal call) from a transaction?

message Medium
A. A message is produced by a contract and is not recorded directly on the blockchain
B. A message can only transfer ether, never invoke code
C. A message always requires a private-key signature
D. A message is broadcast to all network peers like a block

28 A contract function requires a payment of 2 ether. How many wei must the caller send?

ether Medium
A. wei
B. wei
C. wei
D. wei

29 What is the primary role of gas in the Ethereum Virtual Machine?

Ethereum virtual machine Medium
A. To meter and bound the computational cost of executing operations
B. To generate the account's public key
C. To encrypt contract storage against external reads
D. To order transactions alphabetically by sender

30 During contract execution, if a transaction runs out of gas, what happens?

Ethereum virtual machine Medium
A. The block is discarded by all validators
B. All gas is refunded and the state is reverted
C. The transaction completes with partial state changes
D. State changes are reverted but the consumed gas is still charged

31 In a typical dApp architecture, where does the trusted, tamper-resistant business logic reside?

implementing distributed applications Medium
A. In a centralized SQL database
B. In smart contracts deployed on the blockchain
C. In the browser's local storage
D. In the user's private key file

32 Why do dApps commonly use IPFS instead of storing large files directly in contract storage?

implementing distributed applications Medium
A. IPFS automatically signs transactions for the user
B. Contract storage cannot hold any binary data
C. On-chain storage is extremely expensive in gas, so only the file hash is stored
D. IPFS mines blocks faster than Ethereum

33 In an event-registration dApp, why are Solidity events emitted rather than returning data directly from a state-changing transaction?

event registration Medium
A. Events are stored in the private key
B. Events bypass the gas accounting system
C. Events execute faster than view functions
D. Transactions cannot return values to off-chain callers, so events log data for front-ends to read

34 An event-registration contract must prevent the same attendee from registering twice. Which approach best enforces this?

event registration Medium
A. Emit an event each time registration is attempted
B. Store all addresses in a public string variable
C. Increase the gas limit for each registration
D. Use a mapping(address => bool) and require it is false before registering

35 A document-verification dApp proves a file is authentic without storing the file on-chain. What is stored instead?

document verification Medium
A. A snapshot image of the document
B. The user's private key
C. A cryptographic hash of the document
D. The full encrypted document body

36 If even a single character in a verified document is altered, what happens when its hash is recomputed and compared to the stored hash?

document verification Medium
A. The contract automatically updates the stored hash
B. Only the file size changes, not the hash
C. The recomputed hash will differ completely, failing verification
D. The hashes will still match since the change is minor

37 A smart-contract call option gives the holder the right, but not the obligation, to buy an asset at a strike price. Which condition would a rational holder exercise it under?

call option Medium
A. When the market price is above the strike price
B. Only after the private key expires
C. When the market price is below the strike price
D. When the market price equals zero

38 Why is an oracle typically required when implementing a financial call option as a smart contract?

call option Medium
A. Oracles generate the option's gas fees
B. The contract needs trusted external price data to settle the option
C. Oracles replace the need for a private key
D. The EVM cannot perform subtraction on its own

39 In an interest-rate swap implemented on-chain, two parties exchange cash flows. What is typically exchanged?

interest plate swap- industrial IOT Medium
A. Full ownership of each other's wallets
B. Private keys between the counterparties
C. A fixed-rate payment stream for a floating-rate payment stream
D. Mining rewards for gas refunds

40 In an Industrial IoT scenario, how do sensor devices typically interact with an Ethereum smart contract?

interest plate swap- industrial IOT Medium
A. Through an oracle or gateway that relays signed sensor data on-chain
B. By storing the full blockchain on every sensor
C. By directly mining blocks on each device
D. By replacing the EVM with sensor firmware

41 A developer argues that Ethereum is fundamentally different from Bitcoin because it is "Turing-complete." Which consequence of this property is the primary reason Ethereum must impose a gas mechanism?

introduction to Ethereum as a blockchain platform Hard
A. Turing-completeness requires proof-of-stake, so gas enforces staking deposits
B. Turing-completeness increases block size, so gas compresses transaction data
C. Turing-completeness allows arbitrary loops and recursion, so halting cannot be guaranteed and gas bounds execution
D. Turing-completeness enables faster hashing, so gas rewards miners for speed

42 Two full nodes on the Ethereum mainnet temporarily disagree on the canonical chain head after receiving competing blocks at the same height. Under the fork-choice rule used post-Merge, which block becomes canonical?

Ethereum network Hard
A. The block with the lowest hash value below the target
B. The block that was received first by the majority of mining pools
C. The block with the highest cumulative proof-of-work difficulty
D. The block whose branch accumulates the greatest weight of attestations (LMD-GHOST)

43 A dApp team wants trust-minimized access to off-chain price data. Which ecosystem component addresses the "oracle problem," and what trade-off remains inherent to it?

Ethereum ecosystem Hard
A. Decentralized oracle networks; they reduce single-point trust but still introduce an external data-trust assumption
B. IPFS pinning services; they guarantee data correctness but reduce availability
C. ENS resolvers; they verify data authenticity but require centralized registrars
D. Layer-2 rollups; they eliminate data trust but increase gas cost

44 Given an Ethereum private key , the public key is computed as on the secp256k1 curve. Why is recovering from considered computationally infeasible?

keys Hard
A. It requires brute-forcing a 160-bit address space
B. It requires inverting the Keccak-256 hash of
C. It requires solving the elliptic curve discrete logarithm problem
D. It requires factoring a large composite modulus

45 An Ethereum address is derived as the last 20 bytes of . What is the main security implication of truncating the 32-byte hash to 20 bytes?

addresses Hard
A. It makes addresses reversible back to the public key
B. It allows two different private keys to share one public key
C. It reduces collision resistance to roughly work via the birthday bound
D. It weakens the ECDSA signature to work

46 After EIP-1559, a user sets maxFeePerGas = 100 gwei, maxPriorityFeePerGas = 2 gwei, and the block baseFee = 40 gwei. How much does the user pay per gas and how much is burned?

transaction Hard
A. Pays 100 gwei; 40 gwei burned, 60 gwei to validator
B. Pays 40 gwei; all burned, 0 to validator
C. Pays 42 gwei; 40 gwei burned, 2 gwei to validator
D. Pays 42 gwei; 2 gwei burned, 40 gwei to validator

47 A transaction is stuck pending with nonce 5. To replace it, a user submits a new transaction. Which conditions make the replacement valid?

transaction Hard
A. Same nonce 5 with any lower gas price to save fees
B. Nonce 4 with higher gas price to reset the sequence
C. Same nonce 5 with sufficiently higher gas price (typically ≥10% bump)
D. Nonce 6 with the same gas price as the stuck transaction

48 In EVM terminology, how does an internal "message" differ from an external transaction, and what key field is always absent in a message?

message Hard
A. A message is signed by two parties while a transaction is signed by one
B. A message always transfers ether while a transaction never does
C. A message is stored on-chain while a transaction is kept off-chain
D. A message is produced by contract code (e.g., CALL) and carries no cryptographic signature

49 A contract function should receive plain ether transfers. Comparing transfer, send, and a low-level call, which statement reflects current best practice regarding the 2300 gas stipend?

ether Hard
A. Prefer transfer because its 2300 stipend prevents all reentrancy permanently
B. Prefer call with checks because the fixed 2300 stipend of transfer/send can break legitimate recipients after gas repricing
C. Prefer call because it forwards exactly 2300 gas like transfer
D. Prefer send because it reverts automatically on any failure

50 A Solidity contract declares uint8 x = 255; x = x + 1; in a Solidity 0.7.x pragma without SafeMath. What is the resulting value of x and why?

Ethereum virtual machine Hard
A. , because the increment is discarded on overflow
B. The transaction reverts, because overflow is checked by default
C. , because the EVM uses modular arithmetic and the result wraps modulo
D. , because uint8 is silently promoted to uint16

51 Why does the EVM charge dramatically more gas for SSTORE (storage) than for operations on MSTORE (memory) within a single transaction?

Ethereum virtual machine Hard
A. Storage is encrypted per node while memory is plaintext
B. Memory is written to disk while storage stays in RAM
C. Storage uses 256-bit words while memory uses 8-bit words
D. Storage persists across transactions in global state, imposing lasting cost on all nodes; memory is cleared after execution

52 A contract uses delegatecall to a library. In the called code, which execution context values refer to the calling contract rather than the library?

Ethereum virtual machine Hard
A. storage, msg.sender, and msg.value all remain those of the calling contract
B. Only msg.sender changes to the library address
C. All context switches entirely to the library's own account
D. storage points to the library while msg.sender stays the caller

53 A dApp stores large user files on-chain by writing bytes to contract storage. An architect flags this as an anti-pattern. What is the correct remedy and the reason?

implementing distributed applications Hard
A. Store the file in memory arrays, since memory is permanent and cheaper
B. Split the file across many transactions, since per-transaction gas limits reset storage cost
C. Compress the file with Keccak-256 before storing, since hashing reduces byte count
D. Store the file on IPFS and keep only its content hash on-chain, since on-chain storage is prohibitively expensive and bloats state

54 Consider a withdrawal function that sends ether before setting the user's balance to zero. Which attack does this enable and what is the standard mitigation?

implementing distributed applications Hard
A. Replay attack; include a chain ID in the signature
B. Reentrancy; apply the checks-effects-interactions pattern (update state before external call)
C. Front-running; add a commit-reveal scheme to hide amounts
D. Integer overflow; wrap arithmetic in SafeMath

55 An event-registration dApp emits Registered(address indexed user, uint256 timestamp). A frontend needs to efficiently query all registrations by a specific user. Which design choice makes this feasible and why?

event registration Hard
A. Indexing the user parameter stores it in a filterable log topic, enabling efficient off-chain queries
B. Marking the event payable allows it to be searched by value
C. Storing the event in contract storage instead of logs makes it queryable
D. Indexing timestamp lets nodes sort registrations chronologically on-chain

56 A developer wants to use emitted events as the authoritative source of a contract's current state (e.g., "is user X registered now?"). Why is relying solely on events risky?

event registration Hard
A. Events are deleted after 256 blocks, so old registrations vanish
B. Events consume more gas than storage reads, making them slower
C. Events are not readable by contracts and only reflect historical actions, so current state must come from storage
D. Events can be forged by any node without consensus

57 A document-verification contract stores Keccak256(document) on-chain. A user later proves authenticity by submitting the original document. Why does this scheme NOT guarantee the document existed before the on-chain record?

document verification Hard
A. Storing the hash encrypts the document, hiding its creation date
B. Keccak-256 is reversible, so attackers can backdate the hash
C. The hash only proves integrity and timestamp of recording, not prior existence, unless an external trusted timestamp is anchored
D. The blockchain stores no block timestamps, so ordering is unknown

58 To verify a document belongs to a large registered set without storing all hashes on-chain, which structure lets a contract validate membership with a compact proof?

document verification Hard
A. A bloom filter stored entirely in contract storage
B. A plain dynamic array scanned linearly during verification
C. A Merkle tree, storing only the root on-chain and verifying a Merkle proof per document
D. A linked list, traversing all nodes to find the document

59 A smart contract implements a European call option on an ERC-20 asset with strike . At expiry the oracle price is . The holder should rationally exercise only when which condition holds, and the contract must guard against what?

call option Hard
A. Exercise anytime before expiry; the contract must guard against American-style early assignment
B. Exercise when ; the contract must guard against premium underpayment
C. Exercise when ; the contract must guard against reentrancy on the strike
D. Exercise when ; the contract must guard against oracle manipulation of the settlement price

60 An interest-rate swap smart contract settles floating-vs-fixed payments using IoT/industrial sensor-fed rate data pushed by field devices. Which combined risk must the design mitigate most carefully?

interest plate swap- industrial IOT Hard
A. Compromised or spoofed IoT data feeds corrupting settlement, requiring authenticated multi-source oracle aggregation
B. Excessive block size from sensor data, requiring on-chain compression
C. Loss of Turing-completeness, requiring external computation
D. Private key reuse across validators, requiring longer addresses