ERC-8234 NFT referral relationship authorization standard (Referable NFTs Authorization)
Draft · NFTs & multi-token · created 2026-04-16
A common interface that lets an NFT owner authorize or revoke incoming referral (reference) requests from other NFTs, either through direct on-chain authorization or off-chain signatures.
Why it is needed
Referral-capable NFT designs such as ERC-5521 exist, but a general-purpose authorization layer controlled directly by the owner has not been standardized. Many existing ERC-721 collections cannot add native referral logic without modifying the contract. As a result, there is no common way to verify who authorized a referral relationship between NFTs belonging to different contracts, or when, and each app must build its own authorization logic separately, which lowers interoperability and leaves trust criteria inconsistent.
In depth
Interface and ERC-165 identifier
IAuthorizedReferral inherits from ERC165, and implementations must have supportsInterface return true for type(IAuthorizedReferral).interfaceId. This identifier is the XOR of the selectors of the four functions declared directly in IAuthorizedReferral: isReferralAuthorized, setReferralAuthorization, setReferralAuthorizationBySig, and referralAuthorizationNonce; the inherited supportsInterface function and events are excluded from the calculation.
Validity conditions for an authorization pair
Both contract addresses must be nonzero, have deployed code, and have ERC-721 support confirmed via ERC-165. Existence for both token IDs must be confirmed by an ownerOf call returning a nonzero address. A pair where both the contract address and token ID are identical is invalid. Both setter functions must revert for invalid pairs, and isReferralAuthorized must return false for invalid pairs, unset pairs, revoked pairs, or cases where the recorded owner differs from the current owner.
Direct authorization
The caller of setReferralAuthorization must be one of: the current owner as confirmed by ownerOf, the address returned by getApproved, or an operator for whom isApprovedForAll returns true. These approvals follow the authorization scheme defined by ERC-721, not ERC-5521, and unauthorized calls must revert.
Signature-based authorization (ERC-191)
Anyone can call setReferralAuthorizationBySig. The pair must be valid, the submitted nonce must match the current nonce, block.timestamp must be at or before the deadline, and the signature must follow the specified message construction and recover the current owner. Signatures from approved addresses or operators are not permitted; only ECDSA signatures from externally owned accounts are supported, and since contract wallet signature verification is not standardized, contract owners must use direct authorization.
Message construction and signature verification
The inner hash is computed with abi.encode in the order referredContract, referredTokenId, referringContract, referringTokenId, authorized, nonce, deadline, block.chainid, address(this), and the digest is formed by prepending the ERC-191 version 0x45 prefix. The signature must be exactly 65 bytes (r||s||v), with v equal to 27 or 28. The verifier must reject cases where r is zero or at or above the secp256k1 group order, where s exceeds half the group order, and where the address recovered via ecrecover is zero or differs from the current owner.
Nonce management
The nonce is a sequential uint256 counter bound to the (referredContract, referredTokenId) pair, with an initial value of 0. referralAuthorizationNonce must return 0 even for keys that have never been used. It increments by exactly 1 each time either setter function succeeds, and does not change on failure. It is not reset by ownership changes, revocation, or burn-and-remint, and it does not wrap around. A direct update also increments the nonce, invalidating any signature that was previously signed but not yet submitted.
Ownership changes and revalidation risk
An approval is recorded as consent from the owner at the time it was set, and if the current owner differs from that recorded owner, isReferralAuthorized returns false even if the stored value is true. Signatures are likewise rejected if the recovered signer is not the current owner at execution time. However, an independent registry cannot reliably detect intermediate transfers of an unmodified ERC-721 token, so if the token returns to the recorded owner, a previously stored approval or an unused signature can become valid again, and burning and reminting to the same owner can produce the same effect. This ERC only specifies current-owner verification and does not guarantee permanent invalidation across all transfers.
Proposal status
This proposal was written in April 2026 and is currently in Draft status. Community discussion and revision are still ongoing, so the details may change or adoption may be discontinued.
Things to watch out for
- Signature Front-running and Competition: Anyone can submit a valid signature on another's behalf, so submissions can be front-run or colliding competing updates can occur. Applications must assume this possibility of competition.
- Shared Nonce Contention: The nonce is shared across all approval pairs per referred NFT, so concurrent signatures using the same nonce compete with each other and only one can succeed.
- Approved Address Authority and Revocation Mismatch: An ERC-721 approved address or operator can directly set or revoke approvals and invalidate pending signatures. Also, revoking an ERC-721 approval does not automatically revoke a referral approval that was previously set by that approved address.
- Revalidation on Owner Reversion: Because the current-owner verification approach cannot detect a transfer followed by reversion or a burn followed by reminting, a previous approval or unused signature can unintentionally become valid again. Applications that require permanent transfer-based invalidation need an additional mechanism.
- Registry Trust and Distrust of External Contracts: Approval state can differ between registries, so applications must be explicit about which registry they trust. Implementations should not trust external token contracts, and a claimed ERC-165 support does not guarantee correct ERC-721 behavior.