ERC-5218 NFT license rights management (NFT Rights Management)

Stagnant · NFTs & multi-token · created 2022-07-11

A standard that lets an NFT issuer attach a copyright license for a work to an NFT, allowing the holder to sublicense, transfer, or revoke it.

Why it is needed

An NFT only tracks ownership and does not indicate what work can be used in what way under that NFT. Most NFT projects separately describe usage terms for creative works like images or music in a license document, but this document lives off-chain and is not recorded in the NFT itself. As a result, there is no way to verify what rights a holder actually has, whether they can sublicense those rights to someone else, or whether the rights disappear if conditions are violated. There are stopgap measures such as minting NFTs to represent licenses, but there is no standard for which license connects to which aspect of which NFT, so auditors must investigate each case manually.

What to implement

In depth

Licenses are managed as a tree structure

Each NFT is tied to a single root license, and when its holder creates a sublicense via createLicense, that sublicense's holder can in turn create further sublicenses, so the tree extends recursively. Each license points to its parent via getParentLicenseId, which can be traced back to the root. A root license, having no parent, returns a special identifier such as 0 for parentLicenseId.

Conditions for calling createLicense

createLicense(_tokenId, _parentLicenseId, _licenseHolder, _uri, _revoker) succeeds only if the target NFT exists, and _parentLicenseId is either an active license (when creating a sublicense) or the special identifier while that NFT does not yet have a root license (when creating a root license). Furthermore, only the NFT owner can create the root license, and only the current holder of the parent license can create a sublicense.

revokeLicense and lazy revocation

revokeLicense(_licenseId) only executes if the license is active and the caller is that license's revoker. In the reference implementation, when a parent license is revoked, all sublicenses beneath it also become invalid, but to save gas, active=false is recorded lazily, only for licenses that have actually been explicitly revoked. Because of this, isLicenseActive returns false if any ancestor license has been revoked. If the root license is revoked, the NFT reverts to the creator.

The root license follows the NFT transfer, while sublicenses are transferred directly

When an NFT is transferred via ERC-721's transfer function, the root license's holder also automatically changes to the new NFT owner. Sublicenses, on the other hand, can only be transferred via transferSublicense(_licenseId, _licenseHolder), and the caller must be the current holder of that active sublicense.

License URI and metadata schema

The JSON that getLicenseURI points to is recommended to have a three-layer structure consisting of three fields: legal-code, human-readable, and machine-readable (such as CC REL, which machines can recognize). Since this standard has no function to modify the URI, license content is essentially fixed, and using a decentralized store such as IPFS or an IPFS-style URI that includes a hash is recommended for content verification. If the terms need to change, the approach is to revoke the existing license and create a new one.

Compatibility with ERC-721 and the interface identifier

IERC5218 is an interface that extends IERC721, so a single contract can inherit both ERC-721 and ERC-5218 at once. supportsInterface must return true when called with 0xac7b5ca9.

Transfer of copyright ownership itself is out of scope

While this standard binds a copyright license to the NFT by default, legally transferring the copyright ownership itself requires higher legal requirements, such as a signature. The original text cites, as an example, combining this with ERC-5289 to bundle the license signature and NFT transfer into a single transaction, but this is not a feature of this standard itself.

Currently in Stagnant status

This proposal is in Stagnant status, meaning discussion has stalled and is no longer progressing. It has not been finalized as a standard, so its current status should be checked again before implementation.

Things to watch out for

Original ERC · ← ERCs