Episode 6 — Scaling Reliability Microservices Web3 / 6.10 — Web3 Basics

6.10 — Exercise Questions: Web3 Basics

Practice questions for all five subtopics in Section 6.10. Mix of conceptual, comparison, and design questions.

How to use this material (instructions)

  1. Read lessons in orderREADME.md, then 6.10.a -> 6.10.e.
  2. Answer closed-book first — then compare to the matching lesson.
  3. Try building — use ethers.js and a testnet to experiment hands-on.
  4. Interview prep6.10-Interview-Questions.md.
  5. Quick review6.10-Quick-Revision.md.

6.10.a — Understanding Web3 (Q1-Q10)

Q1. Define Web3 in one sentence. How does it differ from the current internet (Web2)?

Q2. List the four core principles of Web3. Give a one-sentence explanation and one concrete example for each.

Q3. Compare Web1, Web2, and Web3 across these dimensions: content creation, data ownership, identity, payments, and trust model.

Q4. A startup says "we're building a Web3 social media platform." What specific problems with Web2 social media would Web3 solve? What new problems would it introduce?

Q5. Name three Web3 use cases that have achieved genuine product-market fit and three that are still largely experimental. Justify your categorization.

Q6. Explain the difference between "decentralized" and "permissionless." Can a system be one without the other? Give examples.

Q7. A skeptic says "Web3 is a solution looking for a problem." Construct the strongest argument FOR this claim and the strongest argument AGAINST it.

Q8. How does Web3 authentication (wallet-based) differ from Web2 authentication (username/password + OAuth)? What are the UX implications?

Q9. Name five skills that transfer directly from backend web development to Web3 development, and five new skills you would need to learn.

Q10. What does "trustless" actually mean in Web3? Does it mean you trust nothing at all? Explain the nuances.


6.10.b — Blockchain Fundamentals (Q11-Q20)

Q11. Define blockchain in your own words. Why is "distributed, immutable, append-only ledger" the standard definition?

Q12. Explain how cryptographic hashing makes blockchains tamper-evident. What would happen if you tried to change a transaction in block #100 of a chain that is currently at block #200?

Q13. Compare Proof of Work and Proof of Stake across these dimensions: energy consumption, security model, attack cost, decentralization, and finality.

Q14. What is a Merkle tree? Why does it matter for blockchains? If a block contains 1 million transactions, how many hash operations are needed to verify one specific transaction?

Q15. Explain the difference between "distributed" and "decentralized." Is Google's server infrastructure distributed? Is it decentralized?

Q16. Compare public and private blockchains. When would a company choose a private blockchain over a public one?

Q17. Calculation: If Ethereum produces a block every 12 seconds and each block can hold ~200 transactions, what is the maximum TPS? How does this compare to Visa's ~65,000 TPS?

Q18. What are gas fees? Why do they exist? What happens to gas fees on Ethereum after EIP-1559?

Q19. You need to verify that a transaction happened on Ethereum. Describe the steps you would take using Etherscan. What information would the transaction receipt show you?

Q20. Design: Write pseudocode for a simple blockchain that supports adding blocks and validating the chain. What are the minimum fields each block needs?


6.10.c — Decentralized Applications (Q21-Q30)

Q21. Draw (or describe) the architecture of a traditional web app vs a DApp. Label each layer (frontend, backend, database, auth, storage).

Q22. What are the three core components of a DApp? Which component replaces the traditional backend server?

Q23. Explain how MetaMask wallet connection works step-by-step. What JavaScript library would you use to implement it?

Q24. Compare ethers.js and Web3.js across: bundle size, API design, TypeScript support, and current recommendation. Which would you choose for a new project and why?

Q25. In ethers.js, what is the difference between a Provider, a Signer, and a Contract instance? When do you need each?

Q26. Why is reading blockchain data free but writing costs gas? How does this fundamental asymmetry affect DApp architecture?

Q27. What is IPFS? Why do DApps use it instead of storing files directly on the blockchain? Calculate the approximate cost of storing 1 MB on Ethereum mainnet.

Q28. Name four categories of DApps and give one popular example for each. Which category has the highest adoption?

Q29. List five advantages and five disadvantages of DApps compared to traditional web applications. For each disadvantage, suggest a mitigation strategy.

Q30. Code exercise: Write JavaScript code using ethers.js that: (a) connects to Ethereum mainnet, (b) reads the current block number, (c) gets the ETH balance of a specific address, and (d) reads the name and symbol of the USDC token contract.


6.10.d — Smart Contracts (Q31-Q40)

Q31. What is a smart contract? Explain the vending machine analogy. What makes smart contracts "smart"?

Q32. List the main Solidity data types (at least 6) and explain when you would use each. Why is mapping the most commonly used data structure?

Q33. What is the difference between public, external, internal, and private function visibility in Solidity? Which one is slightly cheaper in gas and why?

Q34. Explain Solidity modifiers with a code example. How are they similar to Express middleware?

Q35. Describe the smart contract lifecycle from writing to deployment. What is the ABI and why does the frontend need it?

Q36. What is the EVM? Why must it be deterministic? What can smart contracts NOT do because of this requirement?

Q37. Explain the reentrancy attack using the "Vulnerable Vault" example. Why does the Checks-Effects-Interactions pattern prevent it?

Q38. Compare ERC-20 and ERC-721 token standards. What are the key functions each must implement? Why does the approve/transferFrom pattern exist in ERC-20?

Q39. Name three gas optimization techniques for Solidity. Why is reading/writing to storage so much more expensive than memory operations?

Q40. Code exercise: Write ethers.js code that reads the total supply, symbol, and decimals of any ERC-20 token given its contract address. Then calculate the total supply in human-readable format.


6.10.e — Cryptocurrencies (Q41-Q53)

Q41. What is the difference between a coin and a token? Give three examples of each.

Q42. Compare Bitcoin and Ethereum across: purpose, consensus mechanism, supply model, smart contract capability, and transaction speed.

Q43. What is the ERC-20 standard? List all the functions and events it requires. Why is standardization important for the token ecosystem?

Q44. Explain the three types of stablecoins (fiat-backed, crypto-collateralized, algorithmic) with examples. What are the trust assumptions for each?

Q45. Compare hot wallets and cold wallets. When would you recommend each? What happens if you lose your seed phrase?

Q46. Compare CEXs and DEXs across: custody, KYC requirements, trading mechanism, fees, and token availability. When would you use each?

Q47. Explain DeFi lending using Aave as an example. What is "overcollateralization" and why is it necessary?

Q48. What is tokenomics? Name four key factors that determine a token's economic design. Why do team tokens typically have vesting schedules?

Q49. Calculation: If Ethereum gas price is 25 gwei and a simple ETH transfer costs 21,000 gas, what is the transaction fee in ETH? If ETH = $3,000, what is the fee in USD?

Q50. Your company wants to accept cryptocurrency payments. Compare implementing crypto payments vs Stripe. What are the technical requirements, advantages, and challenges?

Q51. Explain the current regulatory landscape for crypto in the US and EU. What does MiCA regulate? Why should developers care about regulation?

Q52. What is yield farming? Explain the concept, the potential rewards, and at least three risks involved.

Q53. Design exercise: Design a simple DeFi protocol that allows users to deposit USDC and earn interest. Describe the smart contract structure, the interest rate mechanism, and how users would interact with it via a frontend.


Answer Hints

QHint
Q3Web1: read / company / email / credit card / trust server. Web2: read-write / platform / social login / PayPal / trust platform. Web3: read-write-own / user / wallet / crypto / trust code.
Q10"Trustless" means you trust CODE and MATH instead of people/companies. You still trust the protocol design, compiler, and node operators.
Q14Merkle tree verification needs ~log2(N) hashes. For 1M transactions: log2(1,000,000) ≈ 20 hash operations.
Q17200 tx/block / 12 sec ≈ 16.7 TPS. Visa: 65,000 TPS. Ethereum is ~3,900x slower. Layer 2s close the gap.
Q27Ethereum storage costs ~20,000 gas per 32 bytes. 1 MB = ~32,000 slots × 20,000 gas × 30 gwei ≈ 19.2 ETH ≈ $57,600 at $3,000/ETH.
Q33external is slightly cheaper than public for functions only called externally because it reads calldata directly instead of copying to memory.
Q38ERC-20 = fungible (like currency). ERC-721 = non-fungible (unique items). approve/transferFrom exists because contracts cannot "pull" tokens from your wallet without explicit permission.
Q44Fiat-backed: trust the issuer (Circle). Crypto-collateralized: trust the smart contract (MakerDAO). Algorithmic: trust the mechanism (most have failed).
Q4921,000 gas × 25 gwei = 525,000 gwei = 0.000525 ETH × $3,000 = $1.575
Q52Yield farming: provide liquidity → earn fees + tokens. Risks: impermanent loss, smart contract bugs, token devaluation, rug pulls, regulatory risk.

<- Back to 6.10 — Web3 Basics (README)