Decentralized Application Architecture Flashcards
7 cards from real Blockchain Technology practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Decentralized Application Architecture flashcards as text
When designing a dApp, why is it risky to rely on block.timestamp for critical timing logic?
Answer: Validators can slightly manipulate it within a tolerance, so it shouldn't be a precise/secure source
Block timestamps can be nudged slightly by block producers, making them unsuitable for precise or security-critical timing.
What is the architectural purpose of separating concerns into 'on-chain' versus 'off-chain' components?
Answer: To keep trust-critical logic on-chain while moving heavy computation and data off-chain for cost/performance
Only trust-critical state/logic belongs on-chain; expensive work moves off-chain to control cost and improve UX.
Why might a dApp emit indexed event parameters rather than non-indexed ones?
Answer: Indexed parameters become filterable topics, enabling efficient log queries
Indexed event params are stored as topics, letting clients efficiently filter logs by their values.
In a decentralized identity architecture, what does a DID (Decentralized Identifier) typically point to?
Answer: A DID document containing public keys and service endpoints
A DID resolves to a DID document holding public keys and service endpoints for verifiable interactions.
What is the main reason to use a pull-over-push pattern for payments in a dApp contract?
Answer: It avoids failed transfers blocking execution and reduces reentrancy/DoS risk
Letting recipients withdraw (pull) avoids one failing transfer blocking a loop and mitigates reentrancy/DoS issues.
How does a subgraph (The Graph) typically stay synchronized with on-chain state?
Answer: By processing contract events block-by-block according to mapping handlers
A subgraph ingests contract events in order and runs mapping handlers to build its queryable index.
Why do well-architected dApps treat the blockchain as the single source of truth rather than their backend cache?
Answer: On-chain state is authoritative and tamper-resistant, while caches/indexers are derived and can lag
On-chain state is the canonical, trustless record; off-chain indexes are derived views that may be stale.