← All NFT Flashcard Decks

Allowlist and Presale Mechanics Flashcards

7 cards from real NFT practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Allowlist and Presale Mechanics flashcards as text
  1. What data structure is most commonly used to implement gas-efficient NFT allowlists on Ethereum?

    Answer: Merkle tree

    Merkle trees represent the entire allowlist with a single 32-byte root stored on-chain, while users provide off-chain proofs to verify membership.

  2. In a Merkle tree allowlist, what must a user provide at mint time to prove they are on the list?

    Answer: A Merkle proof consisting of sibling hashes along the tree path

    A Merkle proof is an array of sibling hashes from the leaf up to the root, enabling anyone to recompute and verify the root without storing the full list on-chain.

  3. Which OpenZeppelin library provides Merkle proof verification for NFT allowlists?

    Answer: @openzeppelin/contracts/utils/cryptography/MerkleProof.sol

    OpenZeppelin's MerkleProof.sol exposes the verify() function that checks whether a given proof correctly maps a leaf to the stored root.

  4. What is the primary gas advantage of Merkle tree allowlists over storing all allowed addresses in an on-chain mapping?

    Answer: Only the 32-byte root is stored on-chain, regardless of how many addresses are allowlisted

    Storing a Merkle root costs one SSTORE (32 bytes), whereas an on-chain mapping requires one storage slot per address, making large allowlists orders of magnitude cheaper with Merkle trees.

  5. How is a Merkle leaf typically generated from an Ethereum address in Solidity for allowlist verification?

    Answer: keccak256(abi.encodePacked(address))

    The standard convention is keccak256(abi.encodePacked(address)), which matches how JavaScript libraries like merkletreejs generate leaves, ensuring proof compatibility.

  6. What does the Merkle root stored in an NFT smart contract cryptographically represent?

    Answer: A commitment to the entire set of allowlisted addresses that changes if any address changes

    The Merkle root is a single hash that acts as a fingerprint of every leaf in the tree; modifying any address in the allowlist produces a completely different root.

  7. How does verification gas cost scale as the allowlist size grows in a Merkle tree implementation?

    Answer: O(log n) — logarithmically with list size, because proof length equals tree depth

    A Merkle proof for a list of N addresses requires log₂(N) hashes, so verification gas grows logarithmically — a list of 1,000,000 addresses needs only ~20 hash operations.