โ† All Blockchain Technology Flashcard Decks

Token Standards and NFTs 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 Token Standards and NFTs flashcards as text
  1. Which ERC-20 function approves a spender to transfer tokens on the owner's behalf?

    Answer: approve

    approve(spender, amount) authorizes a spender to move up to amount tokens via transferFrom.

  2. What known issue affects the classic ERC-20 approve function when changing a non-zero allowance?

    Answer: The approve race condition (front-running) double-spend risk

    Changing an existing allowance can be front-run, letting a spender use both old and new allowances.

  3. Which standard adds gasless approvals to ERC-20 tokens via off-chain signatures (permit)?

    Answer: ERC-2612

    ERC-2612 introduces permit, allowing approvals through signed messages without a separate on-chain transaction.

  4. What does the ERC-20 decimals function represent?

    Answer: The number of decimal places used to display token amounts

    decimals indicates how to scale the smallest unit; e.g., 18 decimals means 1 token = 10^18 base units.

  5. Why can sending ERC-20 tokens directly to a contract not expecting them cause loss?

    Answer: Plain transfer has no callback, so the contract may not register the deposit

    ERC-20 transfer does not notify the recipient contract, so tokens can be stranded if the contract isn't designed to handle them.

  6. Which standard, ERC-777, adds hooks that notify contracts on token sends and receives?

    Answer: ERC-777

    ERC-777 introduces tokensReceived/tokensToSend hooks via ERC-1820 to react to transfers.

  7. What security concern do ERC-777 receive hooks introduce that plain ERC-20 does not?

    Answer: Reentrancy via the callback during transfer

    Because hooks hand control to the recipient mid-transfer, they can enable reentrancy attacks if unguarded.