Chapter 1 : Basics : Data Structures, Linked Lists and Blockchain

Read the chapter notes & take the MCQ test »

Answer : A data structure is a way of organising and storing data so that it can be accessed and changed efficiently. The choice matters because each structure favours different operations – for example, arrays give fast access by index while linked lists give cheap insertion and deletion – so the right choice improves speed and memory use.

Answer : In a linear data structure the elements form a single sequence, e.g. arrays, linked lists, stacks and queues. In a non-linear data structure elements are connected in a hierarchy or network, e.g. trees and graphs.

Answer : A node contains (1) the data value and (2) a pointer (reference) holding the address of the next node. The last node’s pointer is NULL, which marks the end of the list.

Answer : Singly linked list – each node points only to the next node. Doubly linked list – each node points to both the next and the previous node. Circular linked list – the last node points back to the first node instead of NULL.

Answer : A hash pointer stores both the location of a piece of data and the cryptographic hash of that data. It lets you find the data and also verify that it has not been changed, because any change produces a different hash.

Answer : Like a linked list, a blockchain is a sequence of elements (blocks) where each element references another. The difference is that each block references the previous block through its hash, not a memory address, which makes the sequence tamper-evident.

Answer : The genesis block is the first block of a blockchain. It is the only block that has no previous block, so its “previous hash” field is empty or set to zeros. Bitcoin’s genesis block was created on 3 January 2009.

Answer : Changing data in a block changes that block’s hash. The next block still stores the old hash, so the link no longer matches. Every following block would also need to be recomputed, and the altered chain would still be rejected by the honest nodes that hold the original copy.

Answer : In a blockchain each block points backwards to the previous block. In a typical singly linked list each node points forwards to the next node.

Answer : Every full node keeps its own copy so that there is no single point of failure and no single owner. Nodes can independently verify the chain and compare copies, which provides availability and resistance to tampering.

Answer : Append-only means new data can only be added as new blocks at the end of the chain. Existing blocks are never edited or deleted; corrections are made by adding new transactions that record the change.

Answer : A linked list operation happens instantly in local memory. Adding data to a blockchain requires broadcasting transactions, validating signatures, building a block and reaching consensus among many nodes, all of which take time.

Answer : Every blockchain transaction is digitally signed with the sender’s private key, and nodes verify the signature with the public key. A linked list has no built-in way to prove who added or changed a node.

Answer : Yes. On smart-contract platforms such as Ethereum, transactions in a block can deploy contract code or call existing contract functions. Every node executes that code in the same way, so the results become part of the shared state.

Answer : A linked list is controlled by the single program (and person) that owns it. A public blockchain has no central owner; it is maintained jointly by its participants according to the protocol’s consensus rules.
MCQ Answer Key
No.QuestionCorrect Answer
1In a blockchain, each block refers to the previous block using its:B. Cryptographic hash
2Which of the following is a NON-linear data structure?C. Tree
3What is the first block of a blockchain called?D. Genesis block
4Changing data inside an old block causes:A. The block’s hash to change and the link to the next block to break
5Which statement about a linked list is TRUE?B. Its nodes can be updated or removed simply by changing values and pointers
Chapter 2 : What is Blockchain?

Read the chapter notes & take the MCQ test »

Answer : A blockchain is a shared digital ledger replicated across the nodes of a peer-to-peer network. Records are grouped into blocks, each block contains the hash of the previous block, and new blocks are added only after the network reaches consensus.

Answer : DLT is any system in which a ledger is copied and synchronised across multiple participants without a central administrator. A blockchain is a specific kind of DLT that stores the ledger as a chain of hash-linked blocks. Every blockchain is a DLT, but not every DLT uses blocks.

Answer : Typical fields are the previous block hash, a timestamp, the Merkle root of the block’s transactions and, in Proof-of-Work chains, the nonce and difficulty target. Many chains also include a version number.

Answer : Because each block contains the hash of the previous block and the chain is copied across many nodes. Changing a confirmed block would change its hash, break all later links and be rejected by honest nodes, so changes are practically impossible.

Answer : The network itself validates and records transactions using cryptography and consensus. Since confirmed records cannot be altered, participants can rely on the ledger instead of an intermediary such as a bank or auditor; trust is needed mainly at the point where data is entered.

Answer : Transparency means every transaction is publicly visible and verifiable. Pseudonymity means users appear only as addresses rather than real names. So activity is public, but the identity behind an address is not directly revealed.

Answer : The user signs a transaction, broadcasts it to the network, nodes validate it, a miner or validator includes it in a new block, the network agrees on the block through consensus, and every node appends the block to its copy of the chain.

Answer : It is the set of rules that lets independent nodes agree on which transactions are valid and in which order blocks are added, so that all honest nodes end up with the same ledger even when some participants are faulty or dishonest.

Answer : Votes in an election, product inventory and supply-chain records, identity documents or educational certificates, and land or property deeds.

Answer : A block explorer is a website or tool that reads blockchain data and lets anyone search blocks, transactions and addresses. It demonstrates the transparency of public blockchains.

Answer : When a single trusted organisation controls all the data, when data must be frequently edited or deleted, or when very high speed and low cost are essential. In such cases a traditional database is simpler and more efficient.

Answer : So that any node can independently verify the history, so that the network has no single point of failure, and so that no single party can censor or rewrite the records.

Answer : A transaction is confirmed once it has been included in a block that the network has accepted. Each additional block added on top increases confidence that it will not be reversed.

Answer : Cryptographic hash functions protect integrity and link blocks; public-key cryptography and digital signatures prove ownership and authorisation; and consensus mechanisms make it expensive to rewrite history.

Answer : A centralized database has one owner who can create, update and delete records at will. A blockchain is append-only, replicated across many independent nodes and updated only through consensus, so no single party can change it alone.
MCQ Answer Key
No.QuestionCorrect Answer
1Which field links a block to its parent block?C. Previous block hash
2A blockchain is best described as:A. A ledger replicated across a peer-to-peer network
3Which property means confirmed records practically cannot be changed?D. Immutability
4Users on a public blockchain are generally identified by:B. Addresses derived from public keys
5In which situation is a traditional database usually better than a blockchain?C. One trusted organisation controls all data and needs frequent edits
Chapter 3 : Centralized Applications

Read the chapter notes & take the MCQ test »

Answer : A centralized application is software owned and operated by a single organisation. Its code runs on servers controlled by that organisation and its data is kept in a database that the same organisation controls. Examples include typical social-media, video-streaming and online-banking services.

Answer : The front end (client) is the browser or mobile app that the user sees; the back end (server) runs the business logic and APIs; and the database stores the data. All three are controlled by the same organisation.

Answer : Because a single organisation still controls all those servers, the code and the data. Physical distribution of hardware does not remove the single point of control.

Answer : It is a component whose failure stops the whole system. For example, if a company’s central authentication server goes down, no user can log in to its service.

Answer : Users must trust the operator to store data correctly, protect it from breaches, process transactions honestly and not change rules unfairly. Users usually cannot verify any of this themselves.

Answer : High performance and low latency, simple development and maintenance with central control over updates, and clear accountability with customer support. They also make editing or deleting data straightforward.

Answer : Because one organisation controls the platform, it can suspend accounts, block transactions or remove content, either by its own policy or because it is required to by an authority.

Answer : All users’ data is in one place, so a single successful breach can expose millions of records. In a distributed design, there is no single repository holding everything under one set of credentials.

Answer : Yes, the operator can edit or delete records. It is not always bad – it allows correcting mistakes and handling privacy deletion requests – but it means users cannot be certain that history has not been changed.

Answer : The back end receives client requests, applies business rules, performs authentication and authorisation, reads and writes the database and returns responses to the client.

Answer : An internal HR system of a single company and a school’s attendance system. In both, one trusted organisation owns the data and needs fast, flexible updates, so a blockchain would add unnecessary cost.

Answer : In a centralized system a bank or payment company keeps the ledger and approves transfers. In a blockchain system the ledger is replicated across many nodes and transfers are validated by consensus rules instead of a single institution.

Answer : They do not need multiple independent nodes to validate and agree on every change. A single server can accept and commit a change immediately.

Answer : Users cannot inspect how the platform’s code processes their data or decides outcomes. Rules can be changed by the operator without users’ agreement.

Answer : Blockchain was designed to remove the need to trust a single intermediary. By replicating a tamper-evident ledger and using consensus, it removes the single point of control and failure that centralized systems have.
MCQ Answer Key
No.QuestionCorrect Answer
1In a centralized application, who controls the data?B. The single organisation that operates it
2Which of these is a LIMITATION of centralized applications?A. Single point of failure
3A company runs servers in 20 countries under its sole control. The application is:C. Centralized
4Which component of a client-server application shows the user interface?D. Front end (client)
5Why must users “trust” a centralized operator?B. Because users cannot independently verify how data is stored and processed
Chapter 4 : Decentralized Applications (dApps)

Read the chapter notes & take the MCQ test »

Answer : A dApp is an application whose core back-end logic runs as smart contracts on a peer-to-peer blockchain network, so no single node or company controls it. Users usually interact with it through a front end and a wallet.

Answer : Distributed describes where computation happens – across many nodes instead of one. Decentralized describes who controls it – no single node or owner gives orders; all nodes follow shared rules. A system can be distributed but still centrally controlled.

Answer : Smart contracts deployed on a blockchain (the back end) and a front end (user interface) that interacts with those contracts. In practice a wallet is also needed to sign transactions.

Answer : Instead of a username and password, the user connects a wallet. The wallet proves control of an address by signing messages or transactions with the user’s private key.

Answer : Web3.js is a JavaScript library that lets the front end communicate with an Ethereum node using JSON-RPC – for example to read contract data, estimate gas or send signed transactions.

Answer : Storing data on-chain is expensive because every node must store it and every byte costs gas. IPFS stores files off-chain by content hash, and only the small hash is stored on-chain.

Answer : Once a smart contract is deployed, it lives on every node of the network. As long as the blockchain is running, the contract can be called, even if the original developer’s servers are offline.

Answer : Deployed contract code is immutable. Developers must deploy a new contract and migrate users and data, or design an upgrade mechanism (such as a proxy pattern) in advance.

Answer : Each state change is a transaction that every node must execute and store. Gas fees pay for that computation and storage and protect the network from spam.

Answer : Decentralized exchanges (DEXs), lending and borrowing platforms, NFT marketplaces and DAOs (governance applications). Games and identity applications are other examples.

Answer : Valid transactions are processed by a decentralized network following public rules. There is no central operator who can block a particular user or transaction from interacting with the contract.

Answer : No. Many dApp front ends are hosted on ordinary web servers controlled by a team. Only the smart-contract back end is guaranteed to be decentralized; front ends can be decentralized by hosting them on networks such as IPFS.

Answer : Centralized apps offer familiar logins, password recovery and free actions. dApps require users to manage keys, pay fees and wait for confirmations, which many users find harder, although newer wallet technologies are improving this.

Answer : The user, through the private key that controls their address. The dApp contract enforces rules, but no company can move a user’s assets without a valid signature or a rule written into the contract.

Answer : The contract code and every transaction are publicly visible on the blockchain, so anyone can audit how the application works and verify that it follows its stated rules.
MCQ Answer Key
No.QuestionCorrect Answer
1In a dApp, what replaces the traditional back-end server?C. Smart contracts on a blockchain
2How does a user typically authenticate to a dApp?A. By signing with a wallet’s private key
3“No single node instructs other nodes what to do” describes:D. Decentralization
4Why are large files usually stored off-chain (e.g. on IPFS)?B. On-chain storage is very expensive
5Which is a LIMITATION of dApps?C. Difficulty fixing bugs after deployment
Chapter 5 : Distributed Applications and Distributed Systems

Read the chapter notes & take the MCQ test »

Answer : A distributed application is software whose components run on multiple networked computers and coordinate by passing messages to achieve a common goal, while appearing to users as a single application.

Answer : Content Delivery Networks (CDNs), cloud services such as Amazon Web Services, and large web platforms such as search engines or video-streaming services that run on thousands of servers.

Answer : No. A cloud application may run on thousands of machines (distributed) but all of them are controlled by one company (centralized control). Decentralization requires that no single party controls the system.

Answer : It is used for both distributed applications and decentralized applications. In blockchain contexts, dApp usually means a decentralized application built on smart contracts.

Answer : Each machine keeps its own clock, and clocks drift apart. There is no single shared time, so the system must use coordination techniques to agree on the order of events – a problem blockchains solve by ordering transactions into blocks.

Answer : Individual machines or network links can fail while the rest of the system keeps working. A distributed system must detect and tolerate these partial failures.

Answer : During a network partition, a distributed data store cannot simultaneously guarantee both consistency (every read sees the latest write) and availability (every request gets a response); it must sacrifice one of them.

Answer : They usually favour availability and partition tolerance, and reach agreement over time as more blocks are added – often described as eventual or probabilistic consistency.

Answer : Replication means keeping copies of the same data on multiple machines. It improves availability (data is still reachable if one machine fails) and fault tolerance. A blockchain replicates its full ledger on every full node.

Answer : Increasing capacity by adding more machines to a system, rather than upgrading a single machine (vertical scaling). Distributed systems are designed to scale horizontally.

Answer : Its data and computation are spread across many nodes (distributed), and those nodes are run by independent participants with no single controlling authority (decentralized).

Answer : By sending messages over a network, for example using remote procedure calls (RPC), HTTP APIs or message queues.

Answer : In a centralized system, failure of the central server stops the whole service. In a distributed system with replication, the remaining nodes continue to serve requests when some nodes fail.

Answer : It means hiding the distribution from users: they see a single coherent system without needing to know where data is stored or which machine serves them.

Answer : It lets independent nodes agree on a single value or order of events even when messages are delayed and some nodes fail or behave maliciously. Blockchains use consensus to agree on the next block.
MCQ Answer Key
No.QuestionCorrect Answer
1Components of a distributed application coordinate mainly by:B. Passing messages over a network
2A cloud service run by one company on 5,000 servers is:A. Distributed but centrally controlled
3According to the CAP theorem, during a network partition a system must choose between:D. Consistency and Availability
4Which statement about a public blockchain is correct?C. It is both distributed and decentralized
5Keeping copies of the same data on multiple machines is called:A. Replication
Chapter 6 : Blockchain History

Read the chapter notes & take the MCQ test »

Answer : Satoshi Nakamoto is the pseudonym of the unknown person or group who wrote the Bitcoin white paper (2008), created the original Bitcoin software and mined the genesis block (2009). Nakamoto also designed the first working blockchain database. The real identity has never been confirmed.

Answer : It was published on 31 October 2008 with the title “Bitcoin: A Peer-to-Peer Electronic Cash System”.

Answer : They proposed a cryptographically secured chain of time-stamped documents in which each new timestamp was linked to previous ones by hashes, so that a document’s timestamp could not be back-dated or tampered with.

Answer : They incorporated Merkle trees, so that many documents could be collected into a single block and timestamped together efficiently.

Answer : Adam Back’s Hashcash (1997), a proof-of-work system originally proposed to limit e-mail spam by requiring computational effort.

Answer : The crisis damaged trust in banks and central intermediaries. Bitcoin offered a way to transfer value directly between people without relying on a bank, and the genesis block even embedded a newspaper headline about a bank bailout.

Answer : The genesis block is the first block of a blockchain. Bitcoin’s genesis block was mined on 3 January 2009.

Answer : No. The white paper describes a chain of blocks secured by proof-of-work. The single word “blockchain” became standard later as the technology gained wider attention.

Answer : Wei Dai’s b-money (1998) and Nick Szabo’s bit gold (designed in 1998). David Chaum’s eCash (DigiCash) is another earlier example.

Answer : On 12 January 2009, Satoshi Nakamoto sent bitcoins to Hal Finney, a computer scientist and early Bitcoin contributor.

Answer : A halving is the scheduled 50% reduction in the block reward, which happens every 210,000 blocks (about four years). The first halving occurred in November 2012, reducing the reward from 50 to 25 BTC.

Answer : Ethereum’s mainnet launched on 30 July 2015. It introduced a general-purpose, Turing-complete platform for smart contracts and decentralized applications.

Answer : On 15 September 2022, Ethereum’s original Proof-of-Work execution chain merged with the Proof-of-Stake Beacon Chain, ending mining on Ethereum and cutting its energy use dramatically.

Answer : After The DAO exploit in 2016, the Ethereum community performed a hard fork to recover the drained funds. Participants who rejected the fork continued the original chain, which became Ethereum Classic.

Answer : 1.0 refers to cryptocurrencies such as Bitcoin; 2.0 refers to smart-contract platforms such as Ethereum; 3.0 is a loose label for large-scale and non-financial applications together with scaling solutions. It is a teaching aid, not an official standard.
MCQ Answer Key
No.QuestionCorrect Answer
1The Bitcoin white paper was published in:C. 2008
2Who described a cryptographically secured chain of time-stamped documents in 1991?A. Stuart Haber and W. Scott Stornetta
3Hashcash (1997), which inspired Bitcoin mining, was proposed by:D. Adam Back
4Ethereum switched from Proof-of-Work to Proof-of-Stake in an event called:B. The Merge
5Which structure, added to time-stamping in 1992, is used to summarise transactions in a block?C. Merkle tree
Chapter 7 : Smart Contracts

Read the chapter notes & take the MCQ test »

Answer : A smart contract is a program stored at an address on a blockchain that executes automatically when its functions are called with valid inputs. Every node runs it identically, so its result becomes part of the shared blockchain state.

Answer : Nick Szabo introduced the concept in the 1990s. He used the analogy of a vending machine, which automatically enforces a simple agreement: pay the right amount and the product is delivered without a human intermediary.

Answer : Vitalik Buterin is a Russian-Canadian programmer and a co-founder of Ethereum. He co-founded Bitcoin Magazine in 2011 and published the Ethereum white paper in 2013, proposing a blockchain designed for general-purpose smart contracts.

Answer : No. A smart contract is code that executes automatically. It may represent an agreement, but whether it is legally binding depends on the laws of the relevant country and on the surrounding legal documents.

Answer : Bytecode is the low-level code produced by compiling a contract; it is what the EVM executes. The ABI (Application Binary Interface) is a JSON description of the contract’s functions and events, used by applications to encode calls and decode results.

Answer : By sending a transaction that has no recipient (“to” is empty) and whose data field contains the contract’s creation bytecode. The network executes it and assigns the new contract an address.

Answer : Every node executes the same contract to verify results. If execution could produce different outputs on different nodes (for example, by using random numbers or the local time), nodes would disagree and consensus would fail.

Answer : A transaction is signed, costs gas and can change contract state; it is recorded on the blockchain. A call is a read-only execution on a node, does not change state, is not recorded and is free for the caller when run off-chain.

Answer : Once deployed, the code at a contract address cannot be edited. Developers achieve upgrades by deploying a new contract and migrating, or by using a proxy pattern that forwards calls to a replaceable implementation contract.

Answer : Contracts can call and build on other deployed contracts, much like building blocks. For example, a lending protocol can use a token contract and a price-feed contract created by other teams.

Answer : Nodes must reach the same result deterministically, and external data may differ between nodes or change over time. External data is therefore brought on-chain by oracles.

Answer : Token issuance (ERC-20), NFTs, decentralized exchanges and lending (DeFi), and escrow or crowdfunding. DAOs and supply-chain tracking are other examples.

Answer : Contracts often control valuable assets, their code is public, and bugs cannot be easily patched after deployment. A single flaw can be exploited by anyone, sometimes causing large irreversible losses.

Answer : Bitcoin Script is intentionally limited and not Turing-complete; it mainly defines conditions for spending coins. Ethereum provides a Turing-complete environment with persistent contract storage for general applications.

Answer : Proof of Authority (PoA), where approved validators produce blocks; Proof of History (PoH), a verifiable time-ordering technique used with PoS on Solana; and Proof of Importance (PoI), used by NEM.
MCQ Answer Key
No.QuestionCorrect Answer
1Which analogy did Nick Szabo use to explain smart contracts?D. A vending machine
2Compiling a Solidity contract produces bytecode and:A. The ABI
3Which statement about a read-only call (e.g. a view function called off-chain) is correct?B. It does not change state and is not recorded on-chain
4Smart contracts need oracles because:C. They cannot directly access off-chain data deterministically
5When did Ethereum’s mainnet, the first major general-purpose smart-contract platform, launch?B. 2015
Chapter 8 : Ethereum

Read the chapter notes & take the MCQ test »

Answer : Ethereum is a decentralized, open-source, programmable blockchain. It has a native currency, Ether (ETH), and a Turing-complete virtual machine (the EVM) that runs smart contracts and decentralized applications.

Answer : Bitcoin focuses on transferring value with a deliberately limited scripting language. Ethereum adds general-purpose programmability, so developers can deploy smart contracts that hold state and implement tokens, exchanges, DAOs and other applications.

Answer : Turing-complete means a system can, in principle, perform any computation given enough resources. Ethereum limits resources with gas: every operation costs gas and each transaction has a gas limit, so execution stops when gas runs out.

Answer : An Ethereum node is a computer running Ethereum client software that connects to other nodes, verifies blocks and transactions according to the protocol and keeps a copy of the blockchain data.

Answer : The execution client (e.g. Geth) executes transactions in the EVM and manages state, while the consensus client (e.g. Lighthouse or Prysm) runs Proof-of-Stake and decides which blocks are canonical. Together they form a complete node.

Answer : Geth (go-ethereum) is an Ethereum execution client written in the Go programming language. It is one of the original and most widely used Ethereum client implementations.

Answer : A full node verifies all blocks and stores the current state plus recent data. An archive node also stores every historical state, which is useful for block explorers and analytics. A light node stores only block headers and requests proofs from full nodes.

Answer : Client diversity means the network runs many independent client implementations. If one client has a bug, nodes using other clients keep the network correct, reducing the risk of a chain split or outage.

Answer : A testnet is a public Ethereum network used for testing, where test ETH has no real value and can be obtained from faucets. Sepolia is the recommended testnet for application developers; older testnets such as Rinkeby and Kovan are deprecated.

Answer : No. Ethereum is pseudonymous, not private. Every transaction and contract interaction is publicly visible; only the link between an address and a real-world identity is not directly recorded.

Answer : Bitcoin uses the UTXO model, where coins are tracked as unspent outputs of earlier transactions. Ethereum uses an account model, where each account has a balance, a nonce and, for contracts, code and storage.

Answer : The EVM executes smart-contract bytecode deterministically. Every node runs the same transactions through the EVM and must reach the same resulting state, which is how the network agrees on contract outcomes.

Answer : Tools such as Hardhat, Foundry (Anvil) or Ganache create a private blockchain on a developer’s machine with instant blocks and pre-funded accounts, allowing fast testing without spending real or test ETH.

Answer : Ethereum uses Proof-of-Stake since The Merge on 15 September 2022. Time is divided into 12-second slots, in each of which a validator may propose a block.

Answer : Valid transactions can be included by any of a large set of independent validators, and deployed contracts cannot be removed by any single party. This makes it very hard to block a particular user or application.
MCQ Answer Key
No.QuestionCorrect Answer
1Which software is an Ethereum EXECUTION client?C. Geth
2Ethereum prevents infinite loops in Turing-complete code mainly through:A. Gas limits
3Which node type stores every historical state of the chain?D. Archive node
4Which of these testnets is currently recommended for Ethereum application developers?B. Sepolia
5Ethereum’s data model is:C. Account-based
Chapter 9 : Ethereum Accounts

Read the chapter notes & take the MCQ test »

Answer : An Ethereum account is an entity with an ETH balance that can send and receive transactions. It is identified by a 20-byte address and is either an Externally Owned Account (EOA) or a Contract Account.

Answer : An EOA is an account controlled by a private key held by a user. It has an ETH balance, no code, costs nothing to create and is the only type of account that can originate a transaction.

Answer : A Contract Account is controlled by its deployed EVM code rather than a private key. It has an address, balance, code and storage, and its code runs only when it receives a transaction or a message call.

Answer : nonce, balance, codeHash and storageRoot.

Answer : The nonce counts the transactions sent from the account. Each transaction must use the next nonce, which ensures transactions are processed in order and that the same signed transaction cannot be replayed.

Answer : For a contract account, the nonce counts the number of contracts that this contract has created.

Answer : In wei, the smallest denomination of Ether. 1 ETH equals 10^18 wei.

Answer : codeHash is the hash of the account’s EVM code. For a contract it identifies its bytecode; for an EOA it is the hash of empty code because EOAs have no code.

Answer : storageRoot is the root hash of a Merkle Patricia Trie that stores the account’s storage contents. It is empty for EOAs and changes as contracts write to storage.

Answer : No. A contract executes only when triggered by a transaction from an EOA or by a message call from another contract that was itself triggered by an EOA’s transaction. Every chain of execution starts with an EOA.

Answer : Creating an EOA only requires generating a key pair offline. Creating a contract requires a transaction that executes code and stores bytecode and storage on every node, which consumes network resources paid for with gas.

Answer : Whoever knows the private key can sign transactions for the account and move all of its assets. There is no central authority that can reverse such transfers.

Answer : The public key is derived from the private key using secp256k1 elliptic-curve multiplication, and the address is derived from the public key by Keccak-256 hashing and taking the last 20 bytes.

Answer : Account abstraction is the idea of making user accounts programmable like contracts, enabling features such as social recovery, multi-signature control, batching and gas sponsorship. ERC-4337 and EIP-7702 are two approaches on Ethereum.

Answer : An EOA: the address in a user’s MetaMask or hardware wallet. A contract account: the address of an ERC-20 token contract or a decentralized exchange contract.
MCQ Answer Key
No.QuestionCorrect Answer
1Which account type can ORIGINATE a transaction?B. Externally Owned Account
2Which of the following is NOT one of the four account fields?D. privateKey
3The nonce of an EOA mainly helps to:A. Prevent replay of the same transaction
4A Contract Account is controlled by:C. Its deployed code
5Account balances on Ethereum are stored in:D. wei
Chapter 10 : Ethereum Address

Read the chapter notes & take the MCQ test »

Answer : An Ethereum address is 20 bytes (160 bits). It is written as 40 hexadecimal characters, usually prefixed with 0x, for example 0x3DaA90098798193a000DE8C9A462f9Bf6271baDd.

Answer : Generate a random 256-bit private key; derive the 64-byte public key using secp256k1 elliptic-curve multiplication; hash the public key with Keccak-256; take the last 20 bytes of the hash and prefix it with 0x.

Answer : secp256k1, the same curve used by Bitcoin.

Answer : No. Deriving the public key from the private key and hashing it are one-way operations. Reversing them is computationally infeasible with current technology.

Answer : No. Ethereum adopted Keccak-256 before NIST finalised the SHA-3 standard. The final SHA3-256 uses different padding, so the two functions give different outputs for the same input.

Answer : It is the last 20 bytes of the Keccak-256 hash of the RLP encoding of the creator’s address and the creator’s nonce. Therefore it depends on who deploys the contract and how many transactions/contracts that account has created.

Answer : With CREATE2 the address depends on the creator, a chosen salt and the hash of the initialisation code – not on the nonce. This lets developers know a contract’s address before it is deployed, which is useful for counterfactual deployment and smart-contract wallets.

Answer : EIP-55 defines a mixed-case checksum encoding for addresses. The capitalisation of letters is determined by the Keccak-256 hash of the lower-case address, allowing software to detect most typing errors.

Answer : Hash the lower-case hex address (without 0x) with Keccak-256. For each letter in the address, if the corresponding hex digit of the hash is 8 or greater, write the letter in upper case; otherwise write it in lower case. Digits are unchanged.

Answer : Not for the protocol – lower-case and checksum versions represent the same account. Capitalisation only serves as an error-detection checksum for software that supports EIP-55.

Answer : The zero address is 0x0000000000000000000000000000000000000000. No one has its private key, so funds sent there are effectively burned and cannot be recovered.

Answer : Contract addresses are computed deterministically from deployment data, not from a key pair. A contract is controlled by its code, so it does not need a key.

Answer : Blockchain transactions are irreversible. If funds are sent to a wrong or mistyped address, no central party can return them.

Answer : There are 2^160 possible 20-byte addresses – an astronomically large number, which makes accidental collisions practically impossible.

Answer : An address is the identifier of an account. The account is the record in the Ethereum state (nonce, balance, codeHash, storageRoot) stored under that address.
MCQ Answer Key
No.QuestionCorrect Answer
1An Ethereum EOA address is formed from:B. The last 20 bytes of Keccak-256(public key)
2How many hexadecimal characters follow “0x” in an Ethereum address?C. 40
3The address of a contract created with CREATE depends on:A. The creator’s address and nonce
4EIP-55 is used for:D. Mixed-case address checksums
5Which elliptic curve is used to derive Ethereum public keys?B. secp256k1
Chapter 11 : ETHER (ETH)

Read the chapter notes & take the MCQ test »

Answer : Ether is the native cryptocurrency of the Ethereum network. It is used to pay transaction fees (gas), to stake for securing the network, as collateral in DeFi and as a means of peer-to-peer payment.

Answer : Computation and storage on Ethereum consume shared resources. Charging fees in ETH prevents spam and infinite loops, while rewarding validators in ETH gives them an economic incentive to secure the network honestly.

Answer : The smallest unit is the wei. One ETH equals 10^18 wei.

Answer : One gwei equals 10^9 wei (one-billionth of an ETH). Gas prices are usually small fractions of an ETH, so quoting them in gwei gives convenient numbers such as 20 gwei.

Answer : 0.25 × 10^18 = 250,000,000,000,000,000 wei (2.5 × 10^17 wei).

Answer : 50 gwei = 50 × 10^9 wei = 5 × 10^10 wei = 0.00000005 ETH (5 × 10^-8 ETH).

Answer : The EVM and Solidity work with integers and do not support fractional (floating-point) numbers. Using wei as an integer unit avoids rounding errors.

Answer : gwei is also called shannon (10^9 wei); szabo equals microether (10^12 wei); finney equals milliether (10^15 wei).

Answer : No. Bitcoin is capped at 21 million coins, but ETH has no fixed cap. Its supply depends on issuance to validators minus the base fees that are burned.

Answer : Since EIP-1559 (London upgrade, August 2021), the base fee portion of every transaction fee is permanently destroyed rather than paid to anyone, reducing the ETH supply.

Answer : When network activity is high enough that the amount of ETH burned through base fees exceeds the amount of new ETH issued to validators, the total supply decreases.

Answer : A minimum of 32 ETH must be staked to activate a validator on Ethereum’s Proof-of-Stake network.

Answer : New ETH is issued as rewards to validators for proposing blocks, making correct attestations and participating in sync committees. There is no mining reward after The Merge.

Answer : require(msg.value == 1 ether); – the ether suffix converts 1 to 10^18 wei, and msg.value is the amount sent in wei.

Answer : Staking to run validators, collateral for DeFi loans or stablecoins, and peer-to-peer payments or pricing of NFTs and other on-chain assets.
MCQ Answer Key
No.QuestionCorrect Answer
11 ETH is equal to:D. 10^18 wei
2Gas prices are most commonly quoted in:A. gwei
3Which part of an Ethereum transaction fee is burned since EIP-1559?B. The base fee
4Another name for 10^9 wei (gwei) is:C. shannon
5Which statement about the ETH supply is correct?D. It has no fixed cap; issuance and burning both affect it
Chapter 12 : Ethereum GAS

Read the chapter notes & take the MCQ test »

Answer : Gas is the unit that measures the computational effort required to execute operations on Ethereum. Each EVM operation has a fixed gas cost, and the sender pays for the gas used in ETH.

Answer : Gas pays validators for computation and storage, discourages spam transactions and prevents infinite loops in a Turing-complete system by limiting how much work any transaction can perform.

Answer : A simple transfer of ETH between two accounts uses exactly 21,000 gas.

Answer : The gas limit is the maximum amount of gas the sender allows the transaction to consume. It protects the sender from unexpectedly high costs and caps the computation of the transaction.

Answer : Execution stops, all state changes made by the transaction are reverted, and the gas consumed up to that point is still paid because the network performed the work.

Answer : No. The sender pays only for the gas actually used. Any gas below the limit that was not consumed is not charged.

Answer : It is the maximum total gas that all transactions in one block can use. Ethereum limits blocks by gas rather than by size in bytes.

Answer : The base fee is a per-gas price set automatically by the protocol for each block. It increases when the previous block used more gas than the target and decreases when it used less (by at most 12.5% per block). The base fee is burned.

Answer : The priority fee is an extra amount per gas, chosen by the user, that is paid to the validator who includes the transaction. A higher tip gives the transaction higher priority when blocks are full.

Answer : maxFeePerGas is the highest total price per gas the user is willing to pay. The user is charged base fee + priority fee per gas; if this is lower than the max fee, the difference times gas used is refunded.

Answer : Fee = 50,000 × (30 + 1) = 1,550,000 gwei = 0.00155 ETH. Of this, 1,500,000 gwei is burned and 50,000 gwei goes to the validator.

Answer : Users set a single gasPrice per unit of gas, and the entire fee (gas used × gasPrice) was paid to the miner. Fees were set by a first-price auction, which made them hard to estimate.

Answer : The transaction sender, i.e. the EOA that signs the transaction, pays the gas fee. The contract owner does not pay for other users’ calls (unless a special sponsorship mechanism is used).

Answer : Storage data must be kept permanently by every node in the network, whereas arithmetic uses only temporary computation. Higher gas costs reflect this long-term resource use.

Answer : Minimise storage writes and use memory or calldata for temporary values; avoid unbounded loops; and use events for data needed only off-chain. Using view/pure functions for reads also avoids transaction costs.
MCQ Answer Key
No.QuestionCorrect Answer
1Under EIP-1559, the base fee is:C. Burned
2A transfer uses 21,000 gas with base fee 10 gwei and tip 2 gwei. The total fee is:A. 252,000 gwei
3If a transaction runs out of gas:B. State changes are reverted but gas used is still paid
4Ethereum blocks are limited by:D. Total gas (block gas limit)
5Which value does the USER choose in an EIP-1559 transaction?A. maxPriorityFeePerGas
Chapter 13 : Ethereum Transactions

Read the chapter notes & take the MCQ test »

Answer : An Ethereum transaction is a cryptographically signed instruction sent by an Externally Owned Account that changes the state of the network – for example transferring ETH, deploying a contract or calling a contract function.

Answer : Because executing a transaction is the only way to change Ethereum’s state. Balances, contract storage and new contracts all change only through transactions.

Answer : chainId, nonce, to, value, data (input), gasLimit, maxPriorityFeePerGas, maxFeePerGas, accessList and the signature values (yParity/v, r, s).

Answer : The sender’s public key, and therefore its address, can be recovered mathematically from the ECDSA signature and the signed data. Including a separate from field is unnecessary.

Answer : chainId identifies the network the transaction is meant for (1 for Ethereum Mainnet). Introduced by EIP-155, it prevents a transaction signed for one chain from being replayed on another chain.

Answer : A deployment transaction has an empty to field and carries the contract’s creation bytecode in the data field. A normal transfer has a recipient address and usually an empty data field.

Answer : The ABI-encoded call: a 4-byte function selector (derived from the Keccak-256 hash of the function signature) followed by the encoded arguments.

Answer : Type 0 legacy (single gasPrice); type 1 access-list transactions (EIP-2930); type 2 dynamic-fee transactions (EIP-1559 base fee + tip); type 3 blob transactions (EIP-4844, data for rollups); type 4 set-code transactions (EIP-7702, an EOA authorises contract code).

Answer : The mempool is the set of valid, pending transactions that nodes have received but that have not yet been included in a block.

Answer : A receipt records whether the transaction succeeded or failed (status), the gas used, the cumulative gas used in the block, the logs (events) emitted, and a bloom filter for quickly searching those logs.

Answer : Finality means a block can no longer be reverted unless an attacker is willing to have a very large amount of staked ETH destroyed by slashing. On Ethereum, blocks usually become finalized after about two epochs, roughly 13 minutes.

Answer : Only one of them can be included. Validators typically choose the one with the higher fee, which is how users “speed up” or “cancel” a pending transaction.

Answer : A transaction is signed, costs gas, can change state and is recorded in a block. A call (eth_call) is executed locally on a node, does not change state, needs no signature and costs the user nothing.

Answer : Yes. If a transaction reverts or runs out of gas after being included in a block, its state changes are undone but the gas consumed is still paid to compensate the network for the computation.

Answer : The nonce enforces a strict sequence. A transaction with nonce 5 cannot be included until the transaction with nonce 4 from the same account has been included, which prevents replay and ensures predictable ordering.
MCQ Answer Key
No.QuestionCorrect Answer
1Which field is EMPTY in a contract-deployment transaction?C. to
2Which EIP introduced chainId-based replay protection?A. EIP-155
3Blob transactions used mainly by Layer-2 rollups are transaction type:D. 3
4A read-only request to a contract that changes no state is made using:B. eth_call
5Where are pending transactions held before they are included in a block?A. Mempool
Chapter 14 : Consensus Mechanism

Read the chapter notes & take the MCQ test »

Answer : A consensus mechanism is the set of rules and processes by which the nodes of a distributed network validate new entries, agree on their order and keep a single, consistent ledger – even if some nodes are faulty or malicious.

Answer : There is no central authority to decide which transactions are valid or which block comes next. Without consensus, nodes could hold different versions of the ledger and the same coins could be spent twice.

Answer : It is a thought experiment in which several generals must agree on a common plan by sending messages, while some generals are traitors who send conflicting messages. It models how distributed nodes can reach agreement when some participants are unreliable or dishonest.

Answer : BFT is the ability of a distributed system to keep operating correctly even when some nodes fail or act maliciously. Classical BFT protocols can tolerate up to f faulty nodes among 3f + 1 nodes, i.e. fewer than one-third.

Answer : In a Sybil attack one entity creates many fake identities to gain influence. PoW and PoS resist it by tying influence to a scarce resource – computing power or staked coins – so creating many identities does not increase power.

Answer : Safety means honest nodes never finalize conflicting versions of the ledger. Liveness means the network continues to make progress by adding new blocks. A good consensus protocol must provide both.

Answer : In probabilistic finality, used by Bitcoin PoW, a block becomes harder to reverse as more blocks are added on top. Reversal becomes increasingly unlikely but is never mathematically impossible.

Answer : Once a block is finalized it cannot be reverted unless a large fraction of validators violate the protocol. In Ethereum PoS, doing so would cause a large amount of their staked ETH to be slashed.

Answer : Token holders vote to elect a limited number of delegates (block producers). These delegates take turns producing blocks. DPoS is fast but more centralized because only a few producers exist.

Answer : In PoA, a fixed set of known and approved validators produce blocks, staking their identity and reputation. It is efficient and is used in private or consortium networks and some test networks.

Answer : Practical Byzantine Fault Tolerance (Castro and Liskov, 1999) lets a known set of nodes agree through several rounds of message exchange. A decision is committed once more than two-thirds of nodes agree, providing immediate finality, but message overhead limits the number of nodes.

Answer : No. Proof of History is a cryptographic clock that creates a verifiable order of events. Solana uses it together with a Proof-of-Stake-based consensus.

Answer : In permissioned networks, validators are known and limited, so voting protocols are practical and Sybil attacks are not a concern. Public networks allow anyone to join, so they need Sybil-resistant mechanisms based on scarce resources.

Answer : Security (resistance to attacks), decentralization (how many independent parties take part) and performance (throughput and latency). Improving one often affects the others.

Answer : Both are used to choose who creates the next block, both synchronise data and validate transactions across a public network, both provide Sybil resistance through a scarce resource, and both reward honest participants.
MCQ Answer Key
No.QuestionCorrect Answer
1Classical BFT protocols can tolerate up to how many faulty nodes out of 3f + 1?A. f
2The Byzantine Generals Problem was described by:B. Lamport, Shostak and Pease
3Bitcoin’s Proof-of-Work provides which kind of finality?C. Probabilistic
4In which mechanism do token holders VOTE for a small set of block producers?D. Delegated Proof-of-Stake
5A Sybil attack involves:A. Creating many fake identities to gain influence
Chapter 15 : Proof-of-Work (PoW)

Read the chapter notes & take the MCQ test »

Answer : Proof-of-Work is a consensus mechanism in which miners compete to solve a computationally expensive hash puzzle. The first miner to find a valid solution earns the right to add the next block and receive a reward, and other nodes can verify the solution easily.

Answer : Miners must find a block header whose double SHA-256 hash is numerically below the current difficulty target. Because hash outputs are unpredictable, the only method is to try many nonce values until one works.

Answer : The nonce is a field in the block header that miners change on each attempt. Each different nonce produces a completely different block hash, allowing the miner to search for a hash below the target.

Answer : Finding a valid hash may require trillions of attempts, but any node can check a proposed block by computing its hash once and comparing it with the target.

Answer : Every 2,016 blocks, Bitcoin recalculates the difficulty target based on how long those blocks took. If blocks came too fast the puzzle becomes harder, and if too slow it becomes easier, keeping the average block time around 10 minutes.

Answer : The block subsidy (newly created coins in the coinbase transaction) plus all the transaction fees from the transactions included in the block.

Answer : Mining requires large investments in hardware and electricity. A block containing invalid transactions would be rejected by other nodes, so the miner would lose the reward and the cost of the work.

Answer : When competing versions of the chain exist, nodes follow the chain with the most cumulative proof-of-work, commonly called the longest chain. This resolves temporary forks.

Answer : A valid block that is not part of the main chain because another block at the same height ended up on the chain with more work. Its transactions return to the mempool if not already confirmed.

Answer : Recent blocks can still be replaced during a temporary fork or an attack. Each additional block built on top makes reversal less likely, so waiting for confirmations reduces the risk of double spending.

Answer : If an attacker controls more than half of the network’s hash rate, they can secretly build a chain faster than everyone else and then publish it to replace recent blocks. This can reverse their own transactions and enable double spending.

Answer : Mining pools are groups of miners who combine their hash power and share rewards according to contribution. They reduce the variance of income for individual miners, but they also concentrate influence.

Answer : Very high energy consumption, centralization of mining in large pools and industrial facilities, electronic waste from obsolete ASIC hardware and limited transaction throughput.

Answer : An Application-Specific Integrated Circuit is hardware designed only for one task, such as computing SHA-256. ASICs are far more efficient than general computers, which raises the barrier to entry for individual miners.

Answer : Ethereum stopped using Proof-of-Work at The Merge on 15 September 2022 and now uses Proof-of-Stake.
MCQ Answer Key
No.QuestionCorrect Answer
1In PoW, what does a miner change repeatedly to get a different block hash?B. The nonce
2Bitcoin adjusts mining difficulty every:A. 2,016 blocks
3A 51% attack requires control of a majority of the network’s:D. Hash rate
4When two valid blocks are found at the same height, nodes eventually follow the chain with:C. The most cumulative work
5Which is NOT a common criticism of Proof-of-Work?D. Validators can be slashed
Chapter 16 : Proof-of-Stake (PoS)

Read the chapter notes & take the MCQ test »

Answer : Proof-of-Stake is a consensus mechanism in which validators lock up (stake) cryptocurrency as collateral. Validators are chosen to propose and attest to blocks, earn rewards for honest work and lose part of their stake if they act maliciously.

Answer : In every 12-second slot, one validator is selected pseudo-randomly using the RANDAO randomness mechanism, with the probability weighted by its effective balance.

Answer : 32 ETH. Since the Pectra upgrade in 2025, a single validator can have an effective balance of up to 2,048 ETH, but 32 ETH remains the minimum for activation.

Answer : A slot is a 12-second period in which one block may be proposed. An epoch is 32 slots, or 6.4 minutes; during each epoch every active validator attests once.

Answer : An attestation is a validator’s signed vote that indicates which block it considers the head of the chain and which checkpoints it supports for justification and finality.

Answer : Checkpoint blocks at epoch boundaries are justified when validators holding at least two-thirds of the total staked ETH vote for them. When the next checkpoint is also justified, the earlier one becomes finalized, normally after about two epochs.

Answer : Slashing is a severe penalty that destroys part of a validator’s stake and forcibly removes it from the validator set. It is caused by provably malicious actions such as proposing two different blocks for the same slot or signing contradictory attestations.

Answer : Ordinary penalties are small losses for being offline or late with attestations. Slashing is a much larger penalty for provable dishonest behaviour and results in ejection.

Answer : If the chain fails to finalize for more than four epochs, inactive validators gradually lose stake until the active validators again represent two-thirds of the stake, allowing finality to resume.

Answer : The Beacon Chain was Ethereum’s Proof-of-Stake chain, launched on 1 December 2020. It ran in parallel with the PoW chain and became Ethereum’s consensus layer at The Merge in September 2022.

Answer : Validators do not compete by computing hashes. They run ordinary software and sign messages, so the network’s security comes from staked capital rather than electricity consumption.

Answer : In naive PoS, validators could vote on several competing forks at no cost. Ethereum addresses this with slashing: signing conflicting votes is detectable and causes the validator’s stake to be destroyed.

Answer : Solo staking with your own validator, staking-as-a-service with your own 32 ETH, pooled or liquid staking with any amount, and staking through a centralized exchange.

Answer : A token issued by a staking pool that represents a user’s staked ETH and accumulated rewards. It can be traded or used in DeFi while the underlying ETH remains staked.

Answer : New or long-offline nodes should start syncing from a recent, trusted finalized checkpoint rather than from genesis. This protects them from long-range attacks using old validator keys.
MCQ Answer Key
No.QuestionCorrect Answer
1How long is one slot in Ethereum Proof-of-Stake?B. 12 seconds
2Which action causes a validator to be SLASHED?C. Proposing two different blocks in the same slot
3For finality, checkpoints need votes from validators holding at least:D. Two-thirds of the stake
4Ethereum’s Beacon Chain launched on:A. 1 December 2020
5In PoS, validators are chosen mainly based on:B. Staked coins
Chapter 17 : Proof-of-Stake vs Proof-of-Work

Read the chapter notes & take the MCQ test »

Answer : In Proof-of-Stake they are called validators; in Proof-of-Work they are called miners.

Answer : In PoS, a participant must own and stake coins (32 ETH for an Ethereum validator). In PoW, a participant must buy mining hardware and pay for electricity.

Answer : PoS selects a validator pseudo-randomly with probability weighted by stake. PoW selects whichever miner first finds a hash below the difficulty target.

Answer : PoS validators only run software and sign messages, while PoW miners must perform enormous numbers of hash computations. Ethereum’s energy use fell by roughly 99.95% after moving to PoS.

Answer : PoS validators receive newly issued coins for proposing and attesting plus transaction tips. PoW miners receive the block subsidy (new coins) plus transaction fees. Both systems reward through new issuance and fees.

Answer : In PoS, dishonest validators can be slashed – part of their stake is destroyed. In PoW there is no direct confiscation; a dishonest miner only loses the cost of the wasted electricity and hardware time.

Answer : Ethereum PoS offers economic finality after checkpoints are finalized (about 13 minutes). PoW offers probabilistic finality, where each additional confirmation makes reversal less likely but never impossible.

Answer : In PoW, more than 50% of the network’s hash rate. In PoS, a very large share of all staked coins – and attempting the attack would cause much of that stake to be slashed.

Answer : Proof-of-Work, which has secured Bitcoin since 2009.

Answer : In PoS, stake can concentrate in a few large staking pools or exchanges. In PoW, hash power can concentrate in large mining pools and in regions with cheap electricity.

Answer : PoW: Bitcoin and Litecoin (also Dogecoin and Ethereum Classic). PoS: Ethereum (since 2022) and Cardano (also Tezos).

Answer : To reduce energy consumption dramatically, to gain stronger economic security through slashing and finality, and to reduce ETH issuance; it also prepares the network for later scaling upgrades.

Answer : PoS needs an ordinary computer with reliable internet to run node and validator software. PoW needs specialised hardware such as ASICs or powerful GPUs.

Answer : PoS is generally more complex because it must handle validator selection, committees, attestations, finality, penalties, slashing and protection against long-range attacks, whereas PoW relies on a simpler most-work rule.

Answer : No. PoW offers a simple, physically grounded and long-proven security model but uses a lot of energy. PoS is efficient and gives economic finality but is more complex and can concentrate stake. The best choice depends on the network’s goals.
MCQ Answer Key
No.QuestionCorrect Answer
1Participants in PoW are called:C. Miners
2Which mechanism can destroy part of a dishonest participant’s collateral?A. Proof-of-Stake
3Approximately how much did Ethereum’s energy use fall after The Merge?D. About 99.95%
4Which statement about finality is correct?B. PoW finality is probabilistic; Ethereum PoS gives economic finality
5Which of these blockchains still uses Proof-of-Work?C. Bitcoin
Chapter 18 : ERC-20 Token Standard

Read the chapter notes & take the MCQ test »

Answer : ERC-20 is the Ethereum standard interface for fungible tokens. It defines a common set of functions and events that a token contract must implement so that wallets, exchanges and dApps can interact with any compliant token in the same way.

Answer : Fungible means every unit is identical and interchangeable with any other unit of the same kind – one token is always worth exactly the same as another token of that contract, like one rupee coin and another.

Answer : Fabian Vogelsteller proposed it in November 2015; it was published as EIP-20 with Vitalik Buterin as co-author.

Answer : totalSupply(), balanceOf(owner), transfer(to, value), approve(spender, value), allowance(owner, spender) and transferFrom(from, to, value).

Answer : Transfer(from, to, value), emitted on every token transfer, and Approval(owner, spender, value), emitted whenever an allowance is set.

Answer : Because the EVM does not support fractions, balances are stored as integers. decimals tells user interfaces where to place the decimal point; with 18 decimals, 10^18 base units display as 1 token.

Answer : The token owner calls approve(spender, amount) to authorise a spender. Later the spender (often a contract) calls transferFrom(owner, recipient, amount), which moves the tokens and reduces the allowance. This allows contracts to pull tokens on behalf of users.

Answer : It returns the remaining number of tokens that the spender is still permitted to transfer from the owner’s balance using transferFrom.

Answer : By convention, newly created tokens are shown as a Transfer event from the zero address (address(0)) to the receiving account.

Answer : If a user approves an unlimited amount to a contract that is malicious, buggy or later compromised, that contract can transfer all of the user’s tokens without further permission.

Answer : The tokens may become permanently stuck, because the standard has no mechanism for the receiving contract to reject them, and the contract may have no function to send them out.

Answer : No, ETH is the native currency and does not implement the ERC-20 interface. dApps often use Wrapped Ether (WETH), an ERC-20 token backed 1:1 by ETH, to treat ETH like any other token.

Answer : USDC and DAI (stablecoins) and Wrapped Ether (WETH). Many governance tokens are also ERC-20 tokens.

Answer : Wallets, exchanges and other contracts can integrate any compliant token automatically without writing custom code for each one, which encourages interoperability and composability.

Answer : Token contracts often hold large value and cannot easily be changed after deployment. Audited, widely used implementations reduce the risk of subtle bugs such as incorrect allowance handling or overflow errors.
MCQ Answer Key
No.QuestionCorrect Answer
1ERC-20 is a standard for:B. Fungible tokens
2Which function lets a third party move tokens after approval?D. transferFrom
3With decimals = 18, a stored balance of 2 × 10^18 displays as:A. 2 tokens
4Minting new tokens is conventionally shown as a Transfer event from:C. The zero address
5Which of these is an OPTIONAL ERC-20 function?B. symbol
Chapter 19 : Cryptographic Hash Functions

Read the chapter notes & take the MCQ test »

Answer : It is a function that maps input data of any size to a fixed-size output (hash or digest) in a way that is deterministic, fast to compute and practically impossible to reverse or to make two different inputs produce the same output.

Answer : Encryption is reversible: with the correct key, ciphertext can be decrypted back to the original data. Hashing is one-way: there is no key and the original data cannot be recovered from the hash.

Answer : Given only a hash value h, it is computationally infeasible to find any input x such that hash(x) = h. This makes the function one-way.

Answer : Second pre-image resistance: given a specific input x, it is infeasible to find another input y with the same hash. Collision resistance: it is infeasible to find any pair of different inputs with the same hash, both chosen freely by the attacker.

Answer : A tiny change to the input causes a large, unpredictable change in the output – about half of the bits flip. For example, SHA-256 of “Blockchain” and “blockchain” produce completely unrelated hashes even though only one letter’s case changed.

Answer : It means there is no strategy better than trial and error to find an input whose hash falls within a given target range. This ensures Proof-of-Work mining is a fair lottery proportional to computing power.

Answer : 256 bits, which is 32 bytes or 64 hexadecimal characters.

Answer : Bitcoin uses double SHA-256 for block hashes, mining, transaction IDs and Merkle trees, and uses RIPEMD-160 applied after SHA-256 (HASH160) to create shorter address hashes from public keys.

Answer : Ethereum uses Keccak-256 for addresses, function selectors, storage-slot calculation, and block and transaction hashes.

Answer : Ethereum adopted Keccak before NIST finalised FIPS 202. The final SHA-3 standard changed the padding rule, so the two functions produce different outputs for the same input.

Answer : Linking blocks through the previous-block hash, building Merkle trees of transactions, Proof-of-Work mining, deriving addresses from public keys, generating transaction and block IDs, and hashing messages before signing them.

Answer : The hash is small and fixed-size, so signing it is efficient regardless of message length. Because of collision resistance, a signature on the hash securely binds the signer to the full message.

Answer : An attacker might create two different blocks or transactions with the same hash and substitute one for the other, undermining the integrity guarantees of the chain. The system would need to migrate to a stronger hash function.

Answer : Researchers demonstrated a practical SHA-1 collision in 2017, showing it is no longer collision resistant. Modern systems use SHA-256, SHA-3 or Keccak instead.

Answer : Mathematically yes, because there are infinitely many inputs and only 2^256 outputs. However, no collision has ever been found, and finding one is computationally infeasible with current technology.
MCQ Answer Key
No.QuestionCorrect Answer
1Which property makes it infeasible to recover the input from its hash?C. Pre-image resistance
2SHA-256 produces an output of:B. 256 bits
3Ethereum’s primary hash function is:A. Keccak-256
4A one-letter change in the input completely changes the hash. This is called:D. Avalanche effect
5Which statement about hashing and encryption is TRUE?B. Hashing is one-way; encryption is reversible with a key
Chapter 20 : Public-Key Cryptography and Digital Signatures

Read the chapter notes & take the MCQ test »

Answer : It is cryptography that uses a pair of mathematically related keys: a private key kept secret by the owner and a public key that can be shared. Data signed with the private key can be verified by anyone using the public key.

Answer : Symmetric cryptography uses one shared secret key for both operations and is fast but requires secure key exchange. Asymmetric cryptography uses a public/private key pair, solves the key-distribution problem and enables digital signatures, but is slower.

Answer : Both use the secp256k1 elliptic curve for their key pairs and ECDSA signatures.

Answer : The public key is computed as K = k × G by elliptic-curve point multiplication. Reversing this requires solving the elliptic-curve discrete logarithm problem, for which no efficient classical algorithm is known.

Answer : A digital signature is a value produced from a message (usually its hash) and a private key. Anyone with the corresponding public key can verify that the signature was created by the key holder and that the message has not been changed.

Answer : Authentication (it was created by the private-key holder), integrity (the data was not altered after signing) and non-repudiation (the signer cannot later deny having signed).

Answer : The node hashes the transaction data, uses the signature values (v, r, s) to recover the signer’s public key, derives the address from it and checks that this address is the sender with sufficient balance and the correct nonce.

Answer : Public blockchains are meant to be transparent so all nodes can validate transactions. The main need is proving who authorised a transaction, not hiding it, so signatures are the primary use.

Answer : If the same random value is used to sign two different messages, an attacker can solve equations from the two signatures to compute the private key. Deterministic nonce generation (RFC 6979) prevents this.

Answer : The best known attacks on the elliptic-curve discrete logarithm problem are much less efficient than attacks on RSA factoring, so a 256-bit ECC key offers security comparable to a roughly 3072-bit RSA key.

Answer : Schnorr is a signature scheme with simpler mathematics that allows multiple signatures to be combined into one. Bitcoin adopted Schnorr signatures (BIP-340) in the Taproot upgrade activated in 2021.

Answer : BLS signatures can be aggregated: many validators’ signatures on the same data combine into one short signature. This makes it practical for hundreds of thousands of validators to attest each epoch.

Answer : A wallet that requires m of n designated keys to approve a transaction, for example 2-of-3. It reduces the risk of a single lost or stolen key.

Answer : No. Signing adds proof of authorisation and integrity, but the transaction data remains readable by everyone on a public blockchain.

Answer : A large-scale quantum computer running Shor’s algorithm could derive private keys from public keys on elliptic curves. Blockchains would then need to migrate to post-quantum signature schemes, which is an active research area.
MCQ Answer Key
No.QuestionCorrect Answer
1In a key pair, which key must be kept secret?C. Private key
2Which property ensures a signer cannot later deny signing?A. Non-repudiation
3Bitcoin’s Taproot upgrade introduced:D. Schnorr signatures
4Ethereum’s consensus layer uses BLS signatures mainly because they:B. Can be aggregated into one short signature
5Re-using the same random nonce for two ECDSA signatures can:A. Leak the private key
Chapter 21 : Merkle Tree and Simplified Payment Verification

Read the chapter notes & take the MCQ test »

Answer : A Merkle tree is a binary hash tree in which the leaves are hashes of data items (such as transactions) and each internal node is the hash of its two children. The top hash is called the Merkle root.

Answer : Ralph Merkle, who patented the idea in 1979 and published it in a paper on digital signatures in 1987–88.

Answer : The Merkle root is the single hash at the top of the Merkle tree. It is stored in the block header and commits to every transaction in the block.

Answer : Hash every transaction to form the leaves; pair adjacent hashes, concatenate each pair and hash it to form the next level; repeat level by level until one hash, the Merkle root, remains.

Answer : It duplicates the last hash at that level so that it can be paired with itself, and then continues building the tree.

Answer : The leaf hash of that transaction changes, which changes every parent hash on its path up to the root. The Merkle root changes, and therefore the block hash also changes.

Answer : A Merkle proof is the list of sibling hashes along the path from a leaf to the root. With it, anyone can recompute the root and verify that a specific transaction is included in a block, without downloading all transactions.

Answer : About log₂(1,024) = 10 hashes.

Answer : H(D), the sibling of C, and H(AB), the sibling of H(CD). The verifier computes H(C), then H(CD), then the root, and compares it with the header.

Answer : SPV, described in Section 8 of the Bitcoin white paper, lets a client verify that a transaction is in the blockchain by downloading only block headers and requesting Merkle proofs from full nodes.

Answer : Advantages: very small storage and bandwidth, suitable for mobile devices. Limitations: they do not validate every transaction themselves and rely on full nodes and on the assumption that the most-work chain is valid.

Answer : It is the data structure Ethereum uses to store key-value data. It combines a Patricia (radix) trie, which allows efficient key look-ups and updates, with Merkle hashing, which gives a single root hash that commits to all the data.

Answer : stateRoot (all account states), transactionsRoot (all transactions in the block) and receiptsRoot (all transaction receipts).

Answer : Each contract has its own storage trie (a Merkle Patricia Trie). The root hash of that trie is stored in the account’s storageRoot field, which in turn is part of the global state trie.

Answer : They allow compact proofs of inclusion and integrity, so light clients, cross-chain bridges and Layer-2 systems can verify specific data without processing the entire blockchain.
MCQ Answer Key
No.QuestionCorrect Answer
1The single hash at the top of a Merkle tree is called the:C. Merkle root
2Approximately how many hashes does a Merkle proof need for n transactions?B. log₂(n)
3SPV light clients mainly download:D. Block headers
4Which root in an Ethereum block header commits to all account balances and nonces?A. stateRoot
5SPV is described in which document?C. The Bitcoin white paper
Chapter 22 : Types of Blockchain and Blockchain Architecture

Read the chapter notes & take the MCQ test »

Answer : In a permissionless blockchain anyone can read data, submit transactions and take part in consensus without approval. In a permissioned blockchain an authority or group decides who can join and what each participant is allowed to do.

Answer : A public blockchain is open to everyone and has no single owner; anyone can run a node, transact and participate in consensus. Examples are Bitcoin and Ethereum.

Answer : A private blockchain is controlled by one organisation that decides who can join and validate. It may be used inside a company to keep a tamper-evident audit trail across departments, though often a conventional database is sufficient.

Answer : A consortium (federated) blockchain is governed by a group of organisations that jointly operate the validator nodes. It suits industries such as banking or supply chains where several companies must share data but none should control it alone.

Answer : A hybrid blockchain combines a private, permissioned network for sensitive data with a public blockchain for transparency – for example by publishing hashes or proofs of private records on a public chain.

Answer : Advantage: strong decentralization and censorship resistance. Limitation: lower throughput and higher fees, and all transaction data is public.

Answer : Because a single organisation controls all nodes, users must still trust that organisation. The main blockchain benefit – removing the need to trust one party – is largely lost.

Answer : Infrastructure (hardware), data layer (blocks, hashes, signatures), network layer (peer-to-peer gossip), consensus layer (PoW/PoS/BFT and incentives), execution layer (smart contracts and VM) and application layer (dApps, wallets, APIs).

Answer : The structures that store information securely: blocks and headers, hash links, Merkle trees, transactions and the digital signatures that authorise them.

Answer : Layer 1 is the base blockchain that provides security and final settlement, such as Ethereum. Layer 2 is a network built on top of it to process transactions faster and more cheaply while relying on Layer 1 for security, such as rollups.

Answer : Layer 0 refers to underlying infrastructure and frameworks that allow multiple blockchains to be built and to communicate with each other (interoperability).

Answer : A full node downloads every block and independently verifies every transaction against the protocol rules, then relays valid data to peers. It does not need to trust anyone else’s view of the chain.

Answer : A bootnode is a well-known node whose address is built into client software so that new nodes can connect to it and discover other peers in the network.

Answer : Hyperledger Fabric (hosted by the Linux Foundation’s Hyperledger project) and R3 Corda.

Answer : It uses channels – separate ledgers visible only to authorised organisations – together with a Membership Service Provider that identifies all participants, so data is shared only with permitted members.
MCQ Answer Key
No.QuestionCorrect Answer
1A blockchain jointly governed by several banks is a:C. Consortium blockchain
2In a permissionless blockchain:A. Anyone can join, transact and validate
3Rollups that rely on Ethereum for security are examples of:D. Layer 2
4Peer-to-peer gossip of blocks and transactions belongs to the:B. Network layer
5Which platform is a permissioned enterprise blockchain framework?B. Hyperledger Fabric
Chapter 23 : Bitcoin: How It Works

Read the chapter notes & take the MCQ test »

Answer : A UTXO (Unspent Transaction Output) is an output of a previous Bitcoin transaction that has not yet been spent. Bitcoin tracks ownership as a set of UTXOs rather than as account balances.

Answer : It is the sum of the values of all UTXOs that the wallet’s keys can unlock. There is no single balance field stored on the blockchain.

Answer : A UTXO must be spent completely. If its value is larger than the payment, the sender creates an extra output that returns the remainder to an address they control; this is the change output.

Answer : The fee equals total input value minus total output value. It is not stated explicitly in the transaction, and it is collected by the miner who includes the transaction.

Answer : Inputs total 0.8 BTC and outputs total 0.799 BTC, so the fee is 0.001 BTC (100,000 satoshis).

Answer : Every node keeps track of which outputs are unspent. A UTXO can be consumed only once; any later transaction that tries to spend the same output is invalid and rejected.

Answer : A satoshi is the smallest unit of bitcoin: 1 BTC equals 100,000,000 (10^8) satoshis.

Answer : A locking script, attached to an output, defines the conditions to spend it (for example, a signature matching a public-key hash). An unlocking script, supplied by the spender, provides the data (signature and public key) that satisfies those conditions.

Answer : It deliberately has no loops, so every script finishes quickly and predictably. This keeps validation simple and protects nodes from denial-of-service attacks.

Answer : Legacy P2PKH addresses start with 1, P2SH with 3, native SegWit (P2WPKH) with bc1q and Taproot (P2TR) with bc1p.

Answer : A halving cuts the block subsidy in half every 210,000 blocks (about four years). After the April 2024 halving, the subsidy is 3.125 BTC per block.

Answer : The subsidy starts at 50 BTC and halves every 210,000 blocks. The sum of this geometric series approaches 21 million, and the protocol rules reject blocks that create more than the allowed subsidy.

Answer : SegWit (2017) separated signature data from the transaction data used to compute the transaction ID, fixing transaction malleability and increasing effective block capacity through block weight.

Answer : The Lightning Network is a Layer-2 payment-channel network on top of Bitcoin. Users exchange many off-chain payments quickly and cheaply and settle the net result on the blockchain only when channels are opened or closed.

Answer : After the block subsidy reaches zero (around 2140), miners will be rewarded only by the transaction fees included in the blocks they mine.
MCQ Answer Key
No.QuestionCorrect Answer
1Bitcoin tracks ownership using:B. Unspent Transaction Outputs (UTXOs)
2Inputs total 1.2 BTC, outputs total 1.195 BTC. The fee is:A. 0.005 BTC
3The Bitcoin block subsidy halves every:D. 210,000 blocks
4An address beginning with “bc1p” is a:C. Taproot address
51 BTC equals how many satoshis?B. 10^8
Chapter 24 : Blockchain Wallets

Read the chapter notes & take the MCQ test »

Answer : A wallet stores private keys (or the seed from which they are derived) and uses them to sign transactions. The coins and tokens themselves are recorded on the blockchain, not inside the wallet.

Answer : In a custodial wallet a third party, such as an exchange, holds the private keys on the user’s behalf. In a non-custodial wallet the user holds the keys or seed phrase and has full control and responsibility.

Answer : A hot wallet keeps keys on an internet-connected device, which is convenient but more exposed to attacks. A cold wallet keeps keys offline, for example in a hardware wallet, which is much safer for long-term storage.

Answer : A dedicated physical device that stores private keys offline and signs transactions internally, so the keys never leave the device even when it is connected to a computer.

Answer : A human-readable backup consisting of usually 12 or 24 words from a standard list of 2,048 words. It encodes random entropy and a checksum and can regenerate all keys of the wallet.

Answer : A hierarchical deterministic wallet derives an entire tree of key pairs from a single master seed. Backing up the seed once backs up all current and future accounts.

Answer : A derivation path identifies a specific key within an HD wallet’s key tree, following BIP-44. The first Ethereum account commonly uses m/44'/60'/0'/0/0, where 60 is Ethereum’s registered coin type.

Answer : The passphrase is combined with the seed phrase to produce a completely different master seed. It adds protection if the words are discovered, but if the passphrase is forgotten the funds cannot be recovered.

Answer : A multisig wallet requires m-of-n keys to approve a transaction, for example 2-of-3. It is used by organisations and security-conscious users so that a single lost or stolen key cannot cause loss of funds.

Answer : They can implement programmable rules such as spending limits, social recovery through trusted guardians, batching of transactions and paying gas in tokens – features ordinary EOAs lack.

Answer : Devices and cloud accounts can be hacked or synced to other devices. Anyone who obtains the seed phrase gains full control of every account in the wallet.

Answer : Attackers create fake websites, apps or support messages that trick users into revealing their seed phrase or signing malicious transactions or token approvals.

Answer : Malware on a computer can silently replace a copied address with an attacker’s address. The hardware wallet screen shows the true destination that will be signed.

Answer : It means setting previously granted ERC-20 or NFT allowances back to zero so that contracts no longer have permission to move your tokens, reducing risk if those contracts are malicious or compromised.

Answer : No. There is no central authority on a public blockchain that can reset keys. Without the seed phrase or private key, funds in a non-custodial wallet are permanently inaccessible.
MCQ Answer Key
No.QuestionCorrect Answer
1A wallet primarily stores:C. Private keys
2Which wallet type keeps keys offline?A. Cold wallet
3BIP-39 seed phrases are normally made of:D. 12 or 24 words
4The standard coin type for Ethereum in a BIP-44 path is:B. 60
5Someone claiming to be “wallet support” asks for your seed phrase. You should:C. Never share it – it is a scam
Chapter 25 : Ethereum Virtual Machine (EVM)

Read the chapter notes & take the MCQ test »

Answer : The EVM is the runtime environment, present in every Ethereum node, that executes smart-contract bytecode. It deterministically computes the new state of Ethereum from the current state and the transactions in a block.

Answer : At any time Ethereum has a state (all accounts, balances, code and storage). Each block applies transactions through the EVM’s state-transition function to move from one valid state to the next.

Answer : Every node independently re-executes each transaction. If results could differ between nodes, they would compute different states and could not agree on the blockchain.

Answer : 256 bits. This size fits Keccak-256 hashes and the 256-bit numbers used in elliptic-curve cryptography, which are common in Ethereum operations.

Answer : The stack can hold up to 1,024 items, each 256 bits wide.

Answer : Memory is a temporary byte array that exists only during a single call and is cleared afterwards; it is relatively cheap. Storage is a permanent key–value store of 256-bit slots belonging to a contract and kept by every node; writing to it is the most expensive operation.

Answer : Calldata is the read-only input data sent with a transaction or message call, containing the function selector and encoded arguments.

Answer : Opcodes are the single-byte instructions the EVM executes. Examples: ADD (0x01), SSTORE (0x55) and CALL (0xF1).

Answer : PUSH1 0x03 pushes 3, PUSH1 0x05 pushes 5, and ADD (0x01) pops both and pushes their sum, so the stack ends with 8.

Answer : Take the function signature without spaces, e.g. transfer(address,uint256), hash it with Keccak-256 and keep the first 4 bytes – for this example 0xa9059cbb.

Answer : The Application Binary Interface defines how to encode function calls and arguments into calldata and how to decode return values and event logs, so off-chain applications and other contracts can interact with a contract correctly.

Answer : DELEGATECALL executes another contract’s code in the context of the calling contract, using the caller’s storage, balance and msg.sender. It enables libraries and proxy patterns for upgradeable contracts, but must be used carefully.

Answer : Logs are stored in transaction receipts for off-chain consumers and are not part of the state that the EVM can access during execution. Data needed later by contracts must be kept in storage.

Answer : REVERT stops execution, undoes all state changes made in the current call and returns an error message, while refunding remaining gas (gas used up to that point is still charged).

Answer : Blockchains or Layer-2 networks that implement the EVM, so Ethereum smart contracts and tools work on them with little or no change. Examples include Arbitrum and BNB Smart Chain.
MCQ Answer Key
No.QuestionCorrect Answer
1Which EVM data area is PERMANENT and most expensive to write?D. Storage
2The function selector for transfer(address,uint256) is:A. 0xa9059cbb
3The EVM word size is:C. 256 bits
4Which opcode runs another contract’s code using the CALLER’s storage?B. DELEGATECALL
5Bytecode 60 03 60 05 01 leaves which value on the stack?A. 8
Chapter 26 : Blockchain Security: Double Spending, Attacks and Forks

Read the chapter notes & take the MCQ test »

Answer : It is the risk that the same digital money is spent more than once, because digital data can be copied. A payment system must ensure each unit of value can be used only once.

Answer : All nodes agree, through consensus, on one ordered history of transactions. Once a UTXO is spent or an account nonce is used, any conflicting transaction is invalid and rejected.

Answer : Unconfirmed or very recent transactions can still be replaced by a conflicting transaction or a chain reorganisation. Waiting for several confirmations (PoW) or finality (PoS) makes reversal impractical.

Answer : An attacker with majority hash power (or a large share of stake) can reorder or censor recent transactions and double-spend their own coins. They cannot create coins out of nothing, change protocol rules or spend other people’s coins without their private keys.

Answer : An attacker isolates a target node by controlling all of its peer connections, so the node sees only the attacker’s version of the network. This can be used to double-spend against the victim or waste its mining power.

Answer : A mining strategy where a miner withholds newly found blocks and releases them strategically to cause honest miners to waste work, earning a larger share of rewards than its share of hash power.

Answer : A malicious contract repeatedly calls back into a vulnerable contract before the vulnerable contract updates its state, for example withdrawing the same balance many times. It was used in the 2016 DAO exploit.

Answer : A function should first check all conditions, then update its own state (effects), and only then interact with external contracts or send ETH. Updating state before external calls prevents reentrancy.

Answer : From version 0.8.0, arithmetic operations are checked by default; an overflow or underflow causes the transaction to revert instead of silently wrapping around.

Answer : tx.origin is the EOA that started the transaction, not the immediate caller. A malicious contract called by the victim could pass a tx.origin check and act on the victim’s behalf. msg.sender should be used instead.

Answer : Front-running occurs when someone sees a pending transaction in the public mempool and gets their own transaction included before it, often to profit from a predictable price change. Value extracted this way is called MEV (Maximal Extractable Value).

Answer : A soft fork tightens the protocol rules in a backward-compatible way: blocks valid under the new rules are also valid for old nodes. Bitcoin’s SegWit and Taproot upgrades were soft forks.

Answer : A hard fork changes the rules in a way that is not backward-compatible; old nodes reject the new blocks. If part of the community does not upgrade, the chain splits permanently, as with Ethereum and Ethereum Classic in 2016.

Answer : In 2017 part of the Bitcoin community disagreed about how to scale Bitcoin and created a hard fork with larger blocks, resulting in a separate chain called Bitcoin Cash.

Answer : Thorough automated testing, independent security audits, use of well-tested libraries and patterns (such as Checks-Effects-Interactions and reentrancy guards), and bug-bounty programmes; formal verification is used for critical contracts.
MCQ Answer Key
No.QuestionCorrect Answer
1Creating many fake nodes to gain influence is called a:B. Sybil attack
2Which pattern prevents reentrancy?A. Checks-Effects-Interactions
3A backward-compatible upgrade that tightens rules is a:C. Soft fork
4Ethereum Classic resulted from:D. A hard fork after the 2016 DAO exploit
5An attacker with 51% of hash power CANNOT:C. Spend coins from other people’s addresses without their keys
Chapter 27 : NFTs: ERC-721 and ERC-1155

Read the chapter notes & take the MCQ test »

Answer : An NFT is a unique blockchain token identified by its contract address and token ID. Unlike fungible tokens, one NFT cannot be exchanged one-for-one with another because each represents something distinct.

Answer : Fungible tokens are interchangeable units of equal value, such as ERC-20 stablecoins. Non-fungible tokens are unique, such as an ERC-721 token representing a specific piece of digital art or a numbered event ticket.

Answer : ownerOf(tokenId) returns the address that currently owns the specified token.

Answer : safeTransferFrom checks that if the recipient is a contract, it implements the ERC-721 receiver interface; otherwise the transfer reverts. This prevents NFTs from being locked in contracts that cannot handle them. transferFrom performs no such check.

Answer : It lets an owner approve an operator, such as a marketplace contract, to manage all of the owner’s tokens in that contract. It is convenient but must be granted only to trusted contracts.

Answer : tokenURI(tokenId), part of the ERC-721 metadata extension, returns a URI pointing to a JSON metadata file describing the token, typically containing a name, description, image link and attributes.

Answer : ERC-165 provides supportsInterface, which lets wallets, marketplaces and other contracts query whether a contract implements ERC-721 (and its extensions) before interacting with it.

Answer : ERC-1155 is the multi-token standard that lets a single contract manage many token types – fungible, non-fungible and semi-fungible – with balances tracked per account and token ID, and supports batch transfers.

Answer : A game can keep all its currencies and items in one contract and transfer many item types in one batch transaction, reducing deployment and gas costs.

Answer : TransferSingle for transfers of one token type and TransferBatch for transfers of multiple token types in one operation.

Answer : The server could go offline or the file could be changed, so the NFT might later point to missing or different content. Content-addressed storage such as IPFS or on-chain storage reduces this risk.

Answer : Not automatically. The buyer owns the token; rights to the underlying work depend on the licence or legal terms provided by the creator.

Answer : ERC-2981 is the NFT Royalty Standard. It defines royaltyInfo(tokenId, salePrice), which returns the royalty receiver and amount. Marketplaces can use it, but the standard does not force payment.

Answer : By the combination of the contract address and the token ID within that contract.

Answer : Event tickets, in-game items, membership or access passes, and certificates or tokenized ownership records for real-world assets.
MCQ Answer Key
No.QuestionCorrect Answer
1Which standard is designed for unique, non-fungible tokens?B. ERC-721
2Which ERC-721 function returns the owner of a token?D. ownerOf
3Which standard supports batch transfers of multiple token types in one call?A. ERC-1155
4NFT images are most commonly stored:C. Off-chain, referenced by a tokenURI
5ERC-2981 deals with:D. NFT royalty information
Chapter 28 : Blockchain Oracles

Read the chapter notes & take the MCQ test »

Answer : A blockchain oracle is a service that delivers external (off-chain) data to smart contracts, or sends on-chain events to external systems, so that contracts can react to real-world information.

Answer : Every node must execute a contract and get the same result. External data can differ between nodes or change over time, which would break deterministic execution and consensus.

Answer : It is the challenge that a decentralized smart contract is only as reliable as the external data it receives. If one centralized oracle supplies that data, it becomes a trusted third party and a single point of failure.

Answer : Inbound oracles bring off-chain data, such as prices or weather, onto the blockchain. Outbound oracles send information from the blockchain to off-chain systems, for example triggering a payment or a physical device.

Answer : A hardware oracle reports data from physical devices such as sensors, RFID tags or IoT devices – for example a temperature sensor confirming that a vaccine shipment stayed cold.

Answer : An oracle that performs computation off-chain, because it is too expensive or needs secret inputs, and returns the result with proof – for example generating verifiable random numbers (VRF) for games or lotteries.

Answer : It uses many independent node operators and multiple data sources and aggregates their answers (for example by taking the median), so a few faulty or malicious participants cannot control the result.

Answer : In the push model, the oracle regularly writes updates to an on-chain contract. In the pull model, the application requests a signed data report when needed and verifies it on-chain during its own transaction.

Answer : An attacker can temporarily move the price of a thin pool, for example with a large flash loan, and exploit contracts that trust that momentary price within the same transaction.

Answer : A Time-Weighted Average Price averages prices over a period of time. It is much harder and more expensive to manipulate than an instantaneous spot price.

Answer : If an oracle stops updating, the stored value becomes stale. Using outdated prices could allow unfair liquidations or trades, so contracts should reject data older than a defined limit.

Answer : DeFi lending that needs asset prices for collateral, parametric crop insurance that pays out based on weather data, and prediction markets that settle on sports or election results.

Answer : Oracle nodes sign their reports with private keys. The on-chain contract verifies the signatures, ensuring the data came from authorised nodes and was not altered in transit.

Answer : Centralized oracles are simple, fast and cheap but require trust in one provider. Decentralized oracles are more robust and trust-minimised but are more complex and costly to operate.

Answer : Determinism. Because all nodes must reach identical results, contracts can only use data available on-chain, which is why oracles must bring external data in.
MCQ Answer Key
No.QuestionCorrect Answer
1The main purpose of a blockchain oracle is to:B. Bring off-chain data to smart contracts
2An oracle that triggers an off-chain action from an on-chain event is:C. Outbound
3Which technique reduces price-manipulation risk?D. Using a time-weighted average price from aggregated sources
4A temperature sensor reporting shipment conditions is an example of a:A. Hardware oracle
5The “oracle problem” refers to:B. A contract being only as trustworthy as its external data source
Chapter 29 : Decentralized Finance (DeFi) and DAOs

Read the chapter notes & take the MCQ test »

Answer : DeFi is the set of financial services – trading, lending, borrowing, saving and payments – implemented as smart contracts on public blockchains, available to anyone with a wallet without relying on banks or brokers.

Answer : DeFi uses smart contracts instead of institutions as intermediaries; it is open 24×7 to anyone with a wallet rather than requiring accounts and business hours; and users usually keep custody of their own assets while all code and transactions are publicly visible.

Answer : A stablecoin is a token designed to keep a stable value, usually pegged to a fiat currency such as the US dollar. Types: fiat-backed (reserves held by an issuer), crypto-collateralised (over-collateralised by crypto in contracts) and algorithmic (maintained by supply rules).

Answer : A DEX is a smart-contract-based exchange where users swap tokens directly from their own wallets without depositing funds with a central operator.

Answer : An AMM is a type of DEX that prices trades using a mathematical formula applied to token reserves in a liquidity pool, instead of matching buy and sell orders in an order book.

Answer : In a pool of two tokens with reserves x and y, every trade must keep the product x × y equal to the constant k (before fees). Adding one token increases its reserve, so the reserve of the other token must decrease, which determines how much the trader receives.

Answer : k = 200,000. After the trade the ETH reserve is 11, so the USDC reserve becomes 200,000 ÷ 11 ≈ 18,181.82. The trader receives about 20,000 − 18,181.82 = 1,818.18 USDC.

Answer : It is the difference between the expected price and the actual execution price caused by the trade itself moving the pool’s reserves. Larger trades relative to pool size cause greater price impact.

Answer : They earn a share of the trading fees in the pool, represented by LP tokens. They face impermanent loss, where price changes leave them with less value than simply holding the tokens.

Answer : Borrowers are pseudonymous and there is no credit check or legal recovery process. Requiring collateral worth more than the loan protects lenders; if collateral value falls too far, it is automatically liquidated.

Answer : An uncollateralised loan that must be borrowed and repaid within the same transaction. If it is not repaid by the end of the transaction, the entire transaction reverts as if it never happened.

Answer : A Decentralized Autonomous Organisation is an organisation whose rules and treasury are encoded in smart contracts and whose decisions are made collectively by members, usually governance-token holders, through voting.

Answer : A member creates a proposal; token holders vote with power proportional to their tokens or delegated votes; if quorum and majority are met, the decision is often queued behind a timelock and then executed automatically by the governance contract.

Answer : Low voter participation, concentration of voting power among a few large holders, and smart-contract or governance attacks; unclear legal status in many jurisdictions is another challenge.

Answer : Smart-contract bugs and exploits, oracle manipulation, liquidation of volatile collateral, stablecoin de-pegging; scams such as rug pulls and changing regulations are further risks.
MCQ Answer Key
No.QuestionCorrect Answer
1In a constant-product AMM, the invariant is:B. x × y = k
2A loan that must be repaid within the same transaction is a:A. Flash loan
3DAI is an example of a:C. Crypto-collateralised stablecoin
4In most DAOs, voting power is based on:D. Governance tokens held or delegated
5Liquidity providers may receive less value than simply holding tokens due to:A. Impermanent loss
Chapter 30 : Blockchain Scalability and Layer-2 Solutions

Read the chapter notes & take the MCQ test »

Answer : Every full node must download, verify and store every transaction. To keep nodes affordable for many participants, block size and frequency are limited, which caps the number of transactions per second.

Answer : It is the observation that it is difficult for a blockchain to simultaneously maximise decentralization, security and scalability; improving one often weakens another.

Answer : Larger blocks require more bandwidth, storage and processing power, so fewer people can run full nodes. This reduces decentralization and can weaken security.

Answer : Layer-1 scaling changes the base blockchain protocol itself, such as adding blob space or sharding. Layer-2 scaling processes transactions off the main chain and posts compressed data or proofs back to Layer-1, inheriting its security.

Answer : A rollup is a Layer-2 solution that executes many transactions off-chain, then posts their data and a summary of the new state to the Layer-1 chain, so Layer-1 can secure and verify them.

Answer : They assume batches are valid but allow anyone to submit a fraud proof during a challenge window. If fraud is proven, the invalid batch is reverted and the dishonest party is penalised.

Answer : Funds can be released to Layer-1 only after the challenge period – commonly about seven days – has passed without a successful fraud proof.

Answer : ZK rollups post a cryptographic validity proof with each batch, which Layer-1 verifies immediately. There is no need for a challenge period, but generating proofs is computationally intensive.

Answer : A state channel lets participants lock funds on-chain, exchange many signed updates off-chain and settle only the final state on-chain. Bitcoin’s Lightning Network is a network of payment channels.

Answer : A sidechain has its own consensus and validators. Its security does not come from the main chain, so if the sidechain validators misbehave, Layer-1 cannot protect users’ funds.

Answer : Data availability means the transaction data of a rollup batch is published so anyone can reconstruct the state and verify or challenge it. Without it, users could not prove fraud or withdraw safely.

Answer : EIP-4844, activated in the Dencun upgrade in March 2024, introduced blob-carrying transactions that provide large, cheap, temporarily stored data space for rollups, lowering their costs. It is also called proto-danksharding.

Answer : Blob data is kept by consensus nodes for a limited period of about 18 days, long enough for rollups to be verified and challenged, after which it can be pruned.

Answer : A bridge moves assets or messages between chains, often by locking tokens on one chain and minting representations on another. Bridges hold large pooled funds and complex logic, making them attractive targets for attacks.

Answer : Sharding splits the work of a blockchain so that not every node must process or store all data. Ethereum’s current approach focuses on data sharding (danksharding) to provide more data space for rollups.
MCQ Answer Key
No.QuestionCorrect Answer
1Which three properties make up the scalability trilemma?B. Decentralization, security, scalability
2Optimistic rollups rely on:A. Fraud proofs during a challenge window
3Which Layer-2 type posts a validity proof with each batch?C. ZK rollup
4The Lightning Network is an example of:D. State (payment) channels
5EIP-4844 blob transactions mainly reduce costs for:A. Rollups posting data to Ethereum
Chapter 31 : Blockchain Applications Beyond Cryptocurrency

Read the chapter notes & take the MCQ test »

Answer : Each participant records hand-overs and conditions of goods on a shared, tamper-evident ledger. This makes it easier to trace origin, detect counterfeits and resolve disputes between companies that do not fully trust each other.

Answer : Health data is highly sensitive and blockchain data is replicated and practically permanent. Storing it on-chain could violate privacy laws and cannot be deleted. Instead, records stay off-chain and only hashes, access logs or permissions are recorded on-chain.

Answer : Employers can verify a certificate’s authenticity instantly by checking its record or hash on the blockchain, without contacting the issuing institution, and forged certificates are easy to detect.

Answer : A model in which individuals hold their own digital identity credentials (such as verifiable credentials) in a wallet, control who sees them and can prove specific facts – for example, being over 18 – without revealing unnecessary personal data.

Answer : It provides a transparent, tamper-evident history of property ownership and transfers, making it harder to forge titles or sell the same land twice and speeding up verification.

Answer : An insurance smart contract that automatically pays out when an oracle reports that a predefined event has occurred, such as a flight delay or rainfall below a threshold, without a manual claims process.

Answer : Households with solar panels can sell surplus electricity to neighbours, with meter readings recorded and payments settled automatically by smart contracts.

Answer : Immutability and transparency: records of spending or registries cannot be quietly altered, and authorised parties or the public can audit them.

Answer : Do multiple parties need to share and write data? Do they not fully trust each other? Is there no acceptable trusted third party? Is a tamper-evident permanent history needed? Can the data be verified on entry or supplied by a reliable oracle?

Answer : When a single trusted organisation controls the data, when records must frequently be edited or deleted, or when very high performance and low cost are essential.

Answer : A blockchain guarantees that data is not changed after it is recorded, but it cannot guarantee the data was true when entered. Incorrect or fraudulent input remains incorrect – permanently.

Answer : Scalability and transaction costs, privacy of on-chain data, and regulatory uncertainty; interoperability and user experience are further challenges.

Answer : Creators can record a hash of their work with a timestamp to prove it existed at a certain time, register ownership through tokens and use smart contracts to automate licensing or royalty payments.

Answer : Different organisations may use different blockchain platforms and existing IT systems. Connecting them securely requires standards, bridges or integration layers, which add complexity.

Answer : The W3C Verifiable Credentials Data Model, which defines a standard format for tamper-evident credentials that can be issued, held and verified, often together with blockchain-based identifiers.
MCQ Answer Key
No.QuestionCorrect Answer
1Which property makes blockchain useful for detecting forged certificates?B. Tamper-evident, verifiable records
2Sensitive patient data should usually be:C. Kept off-chain, with hashes or access logs on-chain
3A smart contract that pays automatically when an oracle reports a flight delay is an example of:A. Parametric insurance
4In which case is a traditional database usually the better choice?D. One trusted organisation controls all data and edits it often
5“Garbage in, garbage out” means a blockchain:B. Cannot guarantee that entered data was true
Solidity & Smart-Contract Interview Questions

Answer : Solidity is a statically typed, contract-oriented, high-level programming language for writing smart contracts that run on the Ethereum Virtual Machine (EVM). Its syntax was influenced by C++, Python and JavaScript.

Answer : Contracts with state variables and functions, inheritance (including multiple inheritance), libraries, interfaces, user-defined types (structs and enums), modifiers, events, custom errors and built-in overflow checks (since version 0.8).

Answer : Smart contracts and the back ends of decentralized applications on Ethereum and other EVM-compatible chains – for example tokens (ERC-20), NFTs (ERC-721/1155), voting and DAO systems, crowdfunding, decentralized exchanges and lending platforms.

Answer : Solidity is designed specifically for the EVM. Code runs on every node of a blockchain, every operation costs gas, deployed code is immutable, state is stored permanently on-chain, and there is no direct access to files, network or system time. General-purpose languages run on a single machine without these constraints.

Answer : The Solidity compiler (solc) translates human-readable Solidity code into EVM bytecode – a sequence of low-level opcodes. This bytecode is what is stored on the blockchain and executed by the EVM on every node.

Answer : An enum is a user-defined type with a fixed set of named values, e.g. enum Status { Pending, Active, Closed }. It must have at least one member, it can be explicitly converted to and from integer types (the conversion is range-checked at run time and reverts if out of range), but there is no implicit conversion.

Answer : The EVM is the sandboxed, deterministic runtime environment present in every Ethereum node that executes contract bytecode. It is a 256-bit stack machine; it isolates contract code from the host computer so that every node reaches the same result.

Answer : A library is reusable code deployed once and used by contracts. Libraries with only internal functions are embedded (inlined) into the calling contract at compile time; libraries with public/external functions are deployed separately with their own address and linked, and their code runs in the caller’s context via DELEGATECALL.

Answer : It lets the nodes of a blockchain agree on which transactions are valid and in what order blocks are added, so all honest nodes keep the same ledger and unauthorised changes are rejected – without relying on a central authority.

Answer : Ethereum is an open-source, decentralized, programmable blockchain secured by Proof-of-Stake. Its native currency is Ether (ETH) and it runs smart contracts on the EVM, enabling decentralized applications that are not controlled by any single entity.

Answer : Blockchain is the underlying technology – a replicated, hash-linked ledger. Bitcoin is a specific blockchain and cryptocurrency focused on peer-to-peer money, using Proof-of-Work and limited scripting. Ethereum is a different blockchain designed as a programmable platform for smart contracts, using Proof-of-Stake and the native currency ETH.

Answer : Automatic, trust-minimised execution; transparent and verifiable code; tamper-resistant state; composability with other contracts; and global, 24×7 availability without intermediaries. These benefits come with responsibilities such as careful security review, because deployed code is hard to change.

Answer : Development and testing frameworks such as Hardhat and Foundry, the browser-based Remix IDE, linters such as Solhint, static analysers such as Slither, and testnets such as Sepolia. (Truffle and Ganache, used in older tutorials, have been sunset by their maintainer.)

Answer : Yes – for, while and do-while loops are supported, including iterating over arrays. However, loops over data that can grow without limit are dangerous: every iteration costs gas, and a loop that exceeds the block gas limit will always fail, which can permanently block a function.

Answer : A view function reads but does not modify contract state; a pure function neither reads nor modifies state. Since Solidity 0.5.0 the old constant keyword for functions is no longer allowed and view/pure are used instead. When called off-chain they cost no gas.

Answer : State variables declared at contract level are stored in the contract’s persistent storage on the blockchain. They keep their values between transactions and can be changed by the contract’s functions (unless declared constant or immutable). Writing to storage is the most expensive operation in terms of gas.

Answer : Normally an SPDX licence identifier comment (e.g. // SPDX-License-Identifier: MIT) followed by the version pragma (e.g. pragma solidity ^0.8.20;). The pragma tells the compiler which versions may compile the file, avoiding incompatibilities between compiler versions.

Answer : The Application Binary Interface is a JSON description of a contract’s public interface – function names, parameter and return types, events and errors. It tells off-chain code and other contracts how to encode calls and decode results, but does not contain the implementation.

Answer : Solidity is a statically typed, contract-oriented (object-oriented-style) high-level language with curly-brace syntax that will look familiar to developers who know JavaScript, C++ or Java.

Answer : eth_call executes a read-only call locally on a node – it changes no state, needs no signature, costs nothing and returns a value. eth_sendRawTransaction (or eth_sendTransaction for node-managed accounts) submits a signed transaction that can change state, costs gas, is recorded on-chain and returns a transaction hash rather than the function’s return value.

References: Solidity Team. (n.d.). Solidity Documentation. · Solidity Team. (n.d.). Security Considerations. Solidity Documentation. · ethereum.org. (n.d.). Introduction to smart contracts. Ethereum Developer Documentation. · ethereum.org. (n.d.). Ethereum Virtual Machine (EVM). Ethereum Developer Documentation. · Antonopoulos, A. M., & Wood, G. (2018). Mastering Ethereum: Building Smart Contracts and DApps. O’Reilly Media.