โ† All Blockchain Technology Flashcard Decks

Smart Contract Fundamentals 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 Smart Contract Fundamentals flashcards as text
  1. What is 'contract upgradeability' and which pattern is most commonly used to achieve it?

    Answer: Delegating calls to a swappable logic contract via a persistent proxy; the proxy pattern

    The proxy pattern keeps a stable address and storage while delegating logic calls to an implementation contract that can be swapped, enabling upgrades without migrating state.

  2. Which type of oracle attack manipulates price feeds to exploit DeFi smart contracts?

    Answer: Flash loan price manipulation

    Attackers use flash loans to temporarily skew on-chain price feeds, tricking smart contracts into executing trades at artificially inflated or deflated prices within a single block.

  3. What is 'slippage' in the context of automated market maker (AMM) smart contracts?

    Answer: The difference between expected and executed trade price due to pool ratio changes

    Slippage occurs because a trade moves the AMM's token ratio, causing the final execution price to differ from the quoted price at submission.

  4. In Solidity, what is the difference between 'memory' and 'storage' data locations?

    Answer: storage is persistent on-chain; memory is temporary and cleared after each call

    storage variables persist permanently on the blockchain while memory variables exist only for the duration of a function call and are discarded afterward.

  5. What is a 'multisig wallet' smart contract, and what problem does it solve?

    Answer: A contract requiring M-of-N key holders to approve a transaction before execution

    A multisig wallet requires a threshold number of predefined signatories to co-sign transactions, eliminating single-point-of-failure risk for high-value funds.

  6. What is the role of 'events' in Solidity smart contracts?

    Answer: They emit indexed logs stored on-chain that off-chain apps can efficiently query

    Solidity events write log entries to the blockchain that are cheaper than storage and can be efficiently filtered by off-chain services like The Graph or ethers.js.

  7. Which vulnerability occurs when a Solidity integer wraps around its maximum or minimum value?

    Answer: Integer overflow/underflow

    Before Solidity 0.8.0, arithmetic could silently wrap around (e.g., uint8(255) + 1 == 0), allowing attackers to bypass balance checks.