ERC-7015 NFT Creator Attribution Standard (NFT Creator Attribution)
Review · NFTs & multi-token · created 2023-05-11
A standard that uses a cryptographic signature to prove who the actual creator is, rather than assuming it is the wallet that deployed the NFT contract. It verifies the signature at deployment and records it as an event so platforms can correctly display the creator.
Why it is needed
Current NFT platforms treat the wallet that deployed the smart contract as the creator of that NFT. In practice, however, it is often a wallet other than the creator that sends the deployment transaction. This happens frequently when using smart wallet accounts, or in newer deployment patterns where the first collector deploys the NFT contract on the creator's behalf. In these cases, the platform ends up displaying the wrong address as the creator. This standard solves the problem by having the creator sign the information needed to create the NFT in advance, so that no matter which wallet sends the deployment transaction, it can verifiably announce who the true creator is.
In depth
Signature mechanism
The creator's consent is expressed by signing an EIP-712-compatible message. A signature following this standard MUST include all defined fields. The struct being signed can be arbitrary data that defines how the token is created, and it must be hashed in EIP-712-compatible format with an appropriate EIP-712 domain. The source shows an example TokenCreation struct with metadataUri, price, and nonce fields. This standard takes advantage of the fact that a contract address can be computed in advance before deployment, so creators can be correctly attributed whether deployment happens through a factory contract or through an externally owned account (EOA).
The five fields of the CreatorAttribution event
The event must be emitted by the NFT contract during the deployment transaction and must contain all the fields needed to reconstruct the signed digest in order to verify the signature. structHash is a hash of the NFT contract's deployment information (name, symbol, admin, etc.) and corresponds to EIP-712's hashStruct. domainName is the domain name of the contract verifying the signature, and version is that contract's version; both are used in EIP-712 signature verification. creator is the creator's account, and signature is the creator's signature.
Why chainId and verifyingContract are omitted
EIP-712 signatures require a chainId parameter, but it is omitted from the event because it can be inferred from the transaction data. The verifyingContract parameter used for signature verification is also omitted, because this value must always equal the transaction's emitter field. The emitter must be the token itself. In other words, the token contract that emitted the event is itself the contract against which the signature is verified.
Platform verification procedure and attribution rule
A platform can verify the validity of creator attribution by reconstructing the signature digest from the parameters in the event and recovering the signer from the signature parameter. The recovered signer must match the creator recorded in the event. If a CreatorAttribution event exists and the signature verifies correctly, attribution MUST be given to the creator, not to the account that submitted the transaction.
Reference implementation: supports both EOA and smart contract signatures
In the reference ERC7015 abstract contract, _validateSignature reverts with an Invalid_Signature error if the signature is invalid, and if it is valid, emits the event with domainName set to ERC7015 and version set to 1. _isValid uses ERC-1271's isValidSignature and compares it against the magic value for smart contract signature verification if the signer address has code (signer.code.length != 0), and otherwise recovers the signer with ECDSA.recover and checks whether it matches the expected signer. If the signer is the zero address, verification is rejected.
Comparison with ERC-5375
ERC-5375 is a proposal trying to solve the same problem. Off-chain data is better in terms of backward compatibility, but the source explains that since accurate, immutable creator attribution is essential for NFTs, a standardized on-chain method is inherently more trustworthy and secure. Also, ERC-5375 does not support designating a creator for every token within a collection, which is a pattern widely used especially in newer use cases. However, both proposals share the limitation of address-based attribution. They verify that some address consented, but cannot guarantee that the address actually belongs to the creator it is expected to represent, and proving the link between an address and a real-world entity is out of scope.
Cannot be applied to existing NFTs
This standard requires an event to be emitted during the NFT's deployment transaction, so existing NFTs that have already been deployed cannot implement it. This proposal is also currently in Review status. Since it is still under review, its contents may change.
Things to watch out for
- Signature solicitation attack: An attack is possible in which a creator is tricked into unknowingly signing a creator attribution consent message. Creators must therefore always verify that every signed field matches the required value before signing.