Glossary entry
Collection Approval (setApprovalForAll)
Wallets & SecurityThe approval that covers a whole NFT collection instead of one item, why it has no amount or expiry, and why drainer sites want this signature most.
Definition
A collection approval is the permission that lets a contract move every item you own from an entire NFT collection, present and future, rather than one named token. It exists because marketplaces need it: listing several items, or listing one and then another next month, would otherwise require a separate approval and a separate fee each time. The function that grants it on the common Ethereum standards is setApprovalForAll, and the important property is that it takes no quantity and no expiry — it is a switch, and it stays on until it is switched off. That is what makes it the single most valuable signature a drainer site can obtain from an NFT holder: one approval to an attacker's contract covers the collection, works on items acquired long afterwards, and looks in the wallet prompt much like the approval a legitimate marketplace asks for. Read which contract is being granted the right rather than which collection is named, and revoke collection approvals for marketplaces you no longer use.
Next