Whenever an NFT sale occurs in a marketplace, it is up to the marketplace to hold back part of the proceeds of the sale to distribute to the original content creator. But how does the marketplace know how much to hold back and where to send the royalties to? That’s where on-chain Royalties come in.
On-chain royalties are royalty configurations that are baked into the original token contract. They provide a way for marketplaces to ask those contracts what the appropriate royalty amount is and who the royalty recipient should be for any token in that contract.
There are a number of token specs out there, including EIP2981, SuperRare, Rarible and Manifold. While they all do similar things (i.e. provide a royalty amount and recipient address per token), they have slightly different implementations. This makes it difficult for marketplaces to adhere to all the royalty specs, and is problematic for older tokens to add on-chain royalty configurations (i.e. tokens that may have launched on OpenSea with royalties set up off-chain).
The goal of the Royalty Registry is twofold:
The Royalty Registry is composed of two parts: the Royalty Registry and the Royalty Engine. The code can be found here: https://github.com/manifoldxyz/royalty-registry-solidity
The Royalty Registry is an on chain contract that is responsible for storing Royalty configuration overrides. The address for the registry is royaltyregistry.eth (0xad2184fb5dbcfc05d8f056542fb25b04fa32a95d).
It provides the ability for contracts which did not originally support any of the on-chain Royalty specifications to add this functionality to their smart contract. A reference EIP2981 override implementation can be found here: https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/overrides/RoyaltyOverride.sol.
To set an override, you can simply click the 'Configure' section at the top of the page which will guide you through deploying an override contract and configuring it.
If you want to use custom override logic beyond the reference implementation, you will need to deploy an instance of your royalty override contract, set the appropriate royalty values, then call the Royalty Registry’s setRoyaltyLookupAddress function. Only the original contract owner or contract admins can set an override for their contract.
The Royalty Engine is a contract that provides an easy way for any marketplace to look up royalties for any given token contract. If a token contract has set an override in the Royalty Registry, it will use that information. Otherwise, it will attempt to use royalty information from any of the supported specs:
You can use the deployed Royalty Engine at engine-v1.royaltyregistry.eth (0x0385603ab55642cb4dd5de3ae9e306809991804f) or you can fork the engine and include it in your marketplace.
Manifold.xyz built the Royalty Registry in collaboration with Foundation, Nifty Gateway, OpenSea, Rarible and SuperRare. We all believe that it’s important to ensure creators get their fair share of every sale.
All the code is opens sourced and free to for anyone to explore and contribute. The github repositories are:
If your token contract already supports EIP2981 or is a Manifold, Rarible or Zora based contract, you’re all good to go! If you have a token created from Foundation, Rarible or SuperRare, they are supported and you can manage your royalties on their respective websites.
If none of the above apply, not to worry! Simply click 'Configure' at the top of this page to deploy your own on-chain royalty configuration for your old token contracts. Creators whose token contract was provided by another platform may want to contact the platform or contract owner for support with this operation.
If you are a developer and wish to use the Royalty Engine for royalty lookups, the abi is here and the Royalty Engine locations are:
If you would like to access the Royalty Registry directly to build your own lookup engine, the abi is here and the Royalty Registry locations are: