Blockchain Developer Decentralized Application (dApp) Architecture 3 β Questions and Answers
Question 1: Why might a dApp frontend be hosted on IPFS rather than a traditional web server?
- To reduce reliance on a single centralized host (Correct answer)
- To make it run faster than CDNs always
- To avoid writing HTML
- To bypass wallet signing
Correct answer: To reduce reliance on a single centralized host
Hosting the frontend on IPFS resists takedowns and aligns with the decentralization goal.
Question 2: What problem does an oracle solve in dApp architecture?
- Bringing off-chain data on-chain (Correct answer)
- Compiling Solidity
- Encrypting transactions
- Generating wallets
Correct answer: Bringing off-chain data on-chain
Oracles like Chainlink feed external data (prices, weather) to contracts that cannot access it natively.
Question 3: In a dApp, what is a common reason to use an off-chain relayer with meta-transactions?
- To let users transact without paying gas directly (Correct answer)
- To mine blocks faster
- To replace the ABI
- To store private keys server-side
Correct answer: To let users transact without paying gas directly
Relayers submit users' signed meta-transactions and pay gas, enabling gasless UX.
Question 4: Which describes the typical data flow when a user clicks 'Submit' in a dApp?
- Frontend builds tx, wallet signs, node broadcasts (Correct answer)
- Server writes to SQL then mines
- Browser mines a block locally
- IPFS validates consensus
Correct answer: Frontend builds tx, wallet signs, node broadcasts
The frontend constructs a transaction, the wallet signs it, and a node propagates it to the network.
Question 5: What is the main architectural risk of relying on a single RPC provider like Infura?
- Reintroduces a centralized dependency/outage point (Correct answer)
- It makes contracts immutable
- It increases gas fees on-chain
- It blocks wallet signing
Correct answer: Reintroduces a centralized dependency/outage point
A single hosted RPC endpoint becomes a centralization and availability bottleneck for the dApp.
Question 6: Why do dApps often emit events from smart contracts?
- To provide a cheap, indexable log of state changes (Correct answer)
- To store full state cheaply
- To encrypt user data
- To trigger consensus
Correct answer: To provide a cheap, indexable log of state changes
Events write to logs that are cheaper than storage and let off-chain indexers track activity.
Question 7: What is a proxy contract pattern primarily used for in dApp architecture?
- Upgradeable contract logic (Correct answer)
- Faster block times
- Wallet recovery
- Frontend caching
Correct answer: Upgradeable contract logic
Proxy patterns separate storage from logic so the implementation can be upgraded while preserving state and address.
Why might a dApp frontend be hosted on IPFS rather than a traditional web server?