ERC-8034 · Final · ERC · 2025-10-02
ERC-8034: Referable NFT Royalties
A standalone royalty registry for Referable NFTs (ERC-5521) that splits a sale's royalty among several primary recipients and forwards a share to the NFTs a token references, up to a set depth.
What problem does it solve?
ERC-5521 "Referable NFTs" (rNFTs) let a token record which other NFTs it builds on, forming a directed acyclic graph of references, for example a remix pointing at its source works. The common royalty standard ERC-2981 returns just one recipient and one amount per sale. It cannot express "pay the creator and a collaborator" or "also reward the works this one references".
ERC-8034 adds a royalty contract designed for that graph: multiple recipients at the top level, plus a share that flows to referenced NFTs, with a depth limit to keep it bounded.
How it works
The royalty logic lives in a separate IRNFTRoyalty contract (discoverable via ERC-165) that is keyed by (rNFTContract, tokenId):
setReferenceRoyalty(contract, tokenId, recipients, fractions, referenceDepth)configures primary recipients with fractions in basis points. The primary total is capped at 1000 bps (10 %). Only authorised parties may call it.- A signature overload accepts an EIP-712 signature plus
signeranddeadline, so a relayer or marketplace can submit an update signed by someone holding the configurator role or by the token's current owner. A per-signer, per-token nonce (royaltyNonce) prevents replay. getReferenceRoyaltyInfo(contract, tokenId)returns the configured split in basis points, for display.getReferenceRoyaltyInfo(contract, tokenId, salePrice)returns the amounts in wei for a given sale.- Reference royalties: at each hop through the reference graph, a fixed share (the reference implementation uses 200 bps, 2 %) is carved out and split among the referenced NFTs' owners by weight, or evenly.
referenceDepthlimits how many hops; the spec recommends capping it at 3. - Marketplaces emit
ReferenceRoyaltiesPaidwhen they pay out.
Example from the spec: primary 3 % creator + 2 % collaborator, two referenced NFTs at depth 1 sharing 2 %. On a 100 ETH sale: 3, 2, 1 and 1 ETH.
Sample code
A marketplace paying royalties at settlement:
interface IRNFTRoyalty {
struct RoyaltyInfo { address recipient; uint256 royaltyAmount; }
struct ReferenceRoyalty { RoyaltyInfo[] royaltyInfos; uint256 referenceDepth; }
function getReferenceRoyaltyInfo(address rNFTContract, uint256 tokenId, uint256 salePrice)
external view returns (ReferenceRoyalty memory);
}
function _payRoyalties(IRNFTRoyalty registry, address nft, uint256 id, uint256 price)
internal returns (uint256 paid)
{
IRNFTRoyalty.ReferenceRoyalty memory r = registry.getReferenceRoyaltyInfo(nft, id, price);
for (uint256 i; i < r.royaltyInfos.length; ++i) {
IRNFTRoyalty.RoyaltyInfo memory info = r.royaltyInfos[i];
if (info.royaltyAmount == 0) continue;
paid += info.royaltyAmount;
(bool ok, ) = info.recipient.call{value: info.royaltyAmount}("");
require(ok, "royalty transfer failed");
}
require(paid <= price, "royalties exceed price");
}
Things to know
- Status: Final.
- Royalties remain voluntary: like ERC-2981, nothing forces a marketplace to call the registry or pay.
- It is independent of ERC-2981; a marketplace that only reads ERC-2981 will not see these splits.
- Ownership checks for signed updates use ERC-721
ownerOf, so in practice rNFTs are ERC-721 tokens. - The 10 % cap covers only the primary split; reference shares are governed separately by the forwarded fraction and the depth limit. Paying many recipients in a loop costs gas, which is why depth should stay small.