Marketplace Royalty Standards (EIP-2981) 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 Marketplace Royalty Standards (EIP-2981) flashcards as text
A contract wants a flat 5% royalty on all tokens. How should royaltyInfo compute the amount?
Answer: Return salePrice * 500 / 10000
Using basis points, 5% equals 500/10000 of the salePrice.
What is a common pattern for storing the royalty receiver in an EIP-2981 implementation?
Answer: A settable address variable, often the creator or a payout splitter
Implementations store a configurable receiver, frequently a creator wallet or a revenue-splitting contract.
OpenZeppelin's ERC2981 implementation lets you set royalties at which levels?
Answer: A default for the collection and per-token overrides
OpenZeppelin provides _setDefaultRoyalty and _setTokenRoyalty for collection-wide and token-specific values.
In OpenZeppelin's implementation, how is the royalty fraction expressed by default?
Answer: In basis points out of 10000
The default _feeDenominator returns 10000, so fees are set in basis points.
What happens if you call _setTokenRoyalty with a feeNumerator greater than the denominator in OpenZeppelin's ERC2981?
Answer: It reverts because royalty exceeds sale price
OpenZeppelin reverts when the numerator exceeds the denominator to prevent royalties larger than the sale price.
Which interface ID must supportsInterface return true for to claim EIP-2981 compliance?
Answer: The IERC2981 interface ID (0x2a55205a)
Type(IERC2981).interfaceId equals 0x2a55205a, which marketplaces check for royalty support.
To resell royalty payouts among multiple creators, a receiver is often set to what?
Answer: A PaymentSplitter or similar splitter contract
A splitter contract receives the royalty and distributes shares to multiple beneficiaries.