Royalties, in a general sense, refer to a form of compensation or payment that creators receive for the ongoing use or distribution of their work. This concept is not unique to the digital world but has been a fundamental part of various creative industries for decades. Whether it's musicians earning royalties from their songs being played on the radio, authors receiving royalties from book sales, or artists benefiting from royalties when their artwork is reproduced, the underlying principle remains the same. Royalties provide creators with a fair share of the value generated by their creations over time.
Now, within the dynamic landscape of Web3 and the rise of NFTs (Non-Fungible Tokens), this concept of royalties has taken on a new and transformative dimension. EIP-2981, or Ethereum Improvement Proposal 2981, is at the forefront of this shift. It introduces the concept of NFT royalties, a groundbreaking development that redefines how we understand and manage ownership of digital assets in the digital age.
In this article, we will explore the broader significance of royalties as a concept and economic model. We will then delve into how EIP-2981 and NFT royalties are reshaping the landscape of digital ownership and creator compensation and also how it’s implemented, revolutionizing the way we perceive and trade digital assets.
Overview of EIP-2981
EIP-2981 represents a pivotal advancement in the NFT ecosystem. It aims to address a fundamental issue: the absence of an automated mechanism for creators to earn royalties when their NFTs are resold. This proposal seeks to standardize the inclusion of royalties within NFT contracts, simplifying the process for creators to benefit from the resale of their digital assets.
EIP-2981 introduces a standardized method for specifying royalties within NFT contracts. Creators can define a percentage cut they wish to receive from each subsequent resale of their NFTs, and this percentage is embedded within the NFT's metadata. It also allows for the distribution of royalties to multiple recipients, including collaborators, licensors, or other stakeholders. The Ethereum blockchain automatically enforces royalty payments upon the resale of an NFT, ensuring that creators receive their intended royalties without relying on trust or intermediaries. Additionally, by standardizing royalties, EIP-2981 promotes interoperability across various NFT marketplaces and platforms, enabling seamless trading of NFTs with royalties.
The Significance of NFT Royalties in the Marketplace
The introduction of NFT royalties via EIP-2981 carries profound implications for creators, collectors, and the NFT marketplace at large. What is the significance?
NFT royalties empower creators with a continuous income stream, aligning their success with the long-term value of their creations.
This incentivizes creators to produce higher-quality and more innovative content, fostering a thriving and competitive marketplace.
Collectors gain confidence in their purchases, knowing that creators and stakeholders benefit from resales, promoting a stable NFT market.
Royalties offer legal clarity, ensuring creators' rights through smart contract enforcement and reducing disputes and litigation risks.
NFT platforms adopting EIP-2981 and supporting royalties attract more creators and collectors, increasing liquidity and asset diversity.
Understanding NFT Royalties
NFT royalties represent a crucial innovation within the world of digital assets and blockchain technology. In this section, we'll delve deeper into the concept of NFT royalties, examining the need for their existence, key differences compared to traditional royalty systems, and how they operate in practice. But before we go in-depth, let’s understand what NFT royalty is in simple terms.
Imagine you're a talented artist, and you create a beautiful painting. You decide to sell a digital version of your painting as a special kind of digital item called an NFT. This NFT proves that your painting is unique and authentic in the digital world.
Now, when you sell your NFT to someone, you can also decide that every time it gets resold to another person in the future, you should still get a little bit of money from that sale. This ongoing money that you earn whenever your NFT changes hands is called a "royalty."
NFT royalties are like a way for artists, musicians, or creators to keep earning money when different people buy and sell their digital creations over time. It's a way for them to benefit even after their initial sale.
The Need for NFT Royalties
The need for NFT royalties arises from the unique characteristics of these digital assets. Unlike physical art or traditional intellectual property, digital creations can be easily duplicated and shared without the creator's consent or financial benefit. NFTs introduced a way to establish true ownership of digital assets, but the resale of these assets remained a challenge for creators. NFT royalties address this issue by ensuring creators receive a share of the proceeds whenever their NFTs are resold. This continuous income stream empowers creators, incentivizes innovation, and adds a layer of fairness to the NFT marketplace.
Key Differences from Traditional Royalty Systems
NFT royalties differ significantly from traditional royalty systems in several key ways:
Automation: NFT royalties are automated through smart contracts on blockchain networks like Ethereum. When an NFT is resold, the smart contract automatically executes the royalty payment, eliminating the need for intermediaries and reducing the risk of non-payment or disputes.
Transparency: Blockchain technology provides a transparent and immutable ledger of all transactions. This transparency ensures that creators can track the resale of their NFTs and verify that they are receiving the correct royalties.
Fractional Ownership: NFT royalties can be split among multiple recipients, such as collaborators or licensors. This allows for more flexible and equitable revenue-sharing arrangements compared to traditional royalties.
Global Reach: NFT royalties operate on a global scale. Creators can receive royalties from NFT sales across the world without the complexities associated with international royalty collection in traditional systems.
How NFT Royalties Operate
Royalty Definition: When a creator mints an NFT, they specify the royalty percentage they wish to receive upon each resale. This percentage is embedded within the NFT's metadata, making it an inherent part of the token.
Listing on Marketplaces: The NFT, with its defined royalty, is listed for sale on various NFT marketplaces. When someone purchases the NFT, the royalty percentage is communicated to the buyer.
Resale: If the buyer decides to resell the NFT in the future, the smart contract governing the NFT automatically calculates and transfers the specified royalty percentage to the creator's wallet. This occurs during the resale transaction, ensuring that the creator receives their royalty without the need for manual intervention.
Multiple Recipients: NFT royalties can also be split among multiple recipients. Smart contracts enable creators to define how royalties are distributed, whether to themselves, collaborators, or other stakeholders, ensuring a fair distribution of earnings.
Implementation of NFT Royalties
For this guide, we will be utilizing Solidity programming language and the Remix IDE for the walkthrough. However, before we delve into the code, let’s upload our NFT metadata to IPFS.
Step 1: Upload metadata to IPFS
To follow along with this guide, please refer to the IPFS documentation for instructions on how to install the IPFS CLI on your operating system. Once you've successfully installed it, we'll proceed with the following steps to host our image and metadata.
Step 2: Creating IPFS Repository
Make use of this command to initialize the IPFS repository.
ipfs init
Step 3: Start the IPFS daemon
The IPFS daemon allows one to initialize the IPFS cloudbench from the browser. To achieve that, you can make use of this command.
ipfs daemon
After the command has been executed, we should see something similar to this.
Let’s make use of the webUI url provided by the IPFS daemon. We should see something very similar to what is shown below.
Step 4: Add NFT Image to IPFS
We’ll add the image from the interface provided by our browser, as shown.
To get the image CID, we can navigate to the file section and copy the image CID as shown.
Oops! That was a lot, but our image is just a dummy without metadata (description of the image).
Step 5: Adding Metadata to IPFS
Change directory to your Desktop. Then Create a JSON file using the command shown. In our case, it’s cov_nft.json
.
cd Desktop touch cov_nft.json
Make use of this to update the metadata.
{ "name": "Cov_NFT", "description": "Cov_ NFT for royalties implementation.", "image": "<https://ipfs.io/ipfs/> Qmaa3AJ×FTuJaizEVHEF2si8WAt3qxD1J5HabiaaTcgPEV?filename-mintS20picture.png" }
Next, we can add the image metadata to IPFS.
Once it’s uploaded to IPFS, we should see something similar to this:
Step 6: Implement NFT Royalties (ERC 2981)
For this implementation, we’ll make use of the Remix IDE https://remix.ethereum.org/ to implement the NFT Royalty.
Create a file on remix, name it NFTRoyalty, and populate it with the code below.
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Cov_NFT is ERC721Royalty, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor() ERC721("Cov_NFT", "COV") { } function mint() external payable { require(_tokenIdCounter.current() < 100, "You can mint anymore!"); uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(msg.sender, tokenId); } function setDefaultRoyalty(address receiver, uint96 fee) external onlyowner{ _setDefaultRoyalty(receiver, fee); } function _baseURI() internal pure override returns (string memory) { return "<https://ipfs.io/ipfs/QmRGzgdDcGzKokhmtyNrHAwBatebDsnPXxBZR9RE2eDWpd?filename=cov_nft>"; } function Withdraw_funds() external onlyOwner { payable(owner()).transfer(address(this).balance); } }
Let’s break down the code:
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Cov_NFT is ERC721Royalty, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor() ERC721("Cov_NFT", "COV") { } }
We import the necessary modules from Open Zeppelin and inherit them in our contract which includes the ERC 721 Royalty contract for our COV_nft
implementation. We then set the counter so that each NFT item has a unique ID.
function mint() external payable { require(_tokenIdCounter.current() < 100, "You can mint anymore!"); uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(msg.sender, tokenId); }
This is the mint function for this NFT royalty contract, which has a mint limit and increments the ID after each item is minted. Additionally, we've made this function payable, but there is no specific minting price.
function setDefaultRoyalty(address receiver, uint96 fee) external onlyOwner{ _setDefaultRoyalty(receiver, fee); }
The OpenZeppelin (OZ) contract provides a _setDefaultRoyalty
function, which we create the function that allows us to set the royalty ourselves by calling it.
function _baseURI() internal pure override returns (string memory) { return "<https://ipfs.io/ipfs/QmRGzgdDcGzKokhmtyNrHAwBatebDsnPxxBZR9RE2eDWpd?filename=cov_nft>"; }
We then make use of the metadata URI uploaded to IPFS in the code using the base URI function.
function Withdraw_funds() external onlyOwner { payable(owner()).transfer(address(this).balance); }
Lastly, we implement the withdraw function.
Step 7: Deploy NFT Royalty Smart Contract
In this step, we will deploy our smart contract to the Sepolia testnet. However, it's important to note that we have the flexibility to deploy it to any of our selected blockchain networks and are not restricted to the Sepolia testnet.
After the contract has been deployed we can start interacting with the contract.
Note: For marketplaces such as Opensea, Rarible, and the like, the only two required functions are supportsInterface
and royaltyInfo
. The supportsInterface()
function informs the marketplace that this contract complies with the EIP-2981 standard. It should return true when the following ID is provided: 0x2a55205a as provided in the EIP-2981 doc: https://eips.ethereum.org/EIPS/eip-2981.
As shown, the contract returns true which complies with the EIP-2981 standard. To achieve this, simply click on the supportsInterface and enter 0x2a55205a.
The setDefaultRoyalty accepts two parameters, which are the NFT owner address, in this case, the deployer address, and the percentage fee for each NFT sale. In this interaction, we make use of the contract deployer address and 250, which is the royalty amount in bips times 100 in the ‘fee’ params (i.e. we input 250, which means 2.5%).
Now let’s check the NFTRoyalInfo.
Once the setDefaultRoyalty
function has been set, the royalty info can be checked for each NFT sale as shown.
Step 8: Verify the NFT Royalty on Opensea
To view our NFT minted token on Opensea, visit this URL:
https://testnets.opensea.io/collection/cov-nft
We've effectively crafted a full-fledged NFT collection that adheres to the EIP-2981 standard and successfully launched it on a testnet.
Challenges with Implementing NFT Royalties
One of the foremost challenges is enforcing royalties across various platforms and secondary markets. The decentralized nature of blockchain technology means that NFTs can be bought, sold, and traded on different marketplaces, often making it difficult to track and distribute royalties effectively.
Another challenge is the need for standardized royalty models and smart contract standards. Without universal guidelines, creators and developers must navigate a fragmented landscape of royalty structures, leading to confusion and disputes.
Furthermore, the transparency and security of royalty payments must be addressed. Smart contracts can automate royalty distribution, but vulnerabilities and coding errors may result in missed payments or unauthorized access.
Predictions for the Ongoing Evolution of NFT Royalty Models
As the NFT space continues to evolve at a rapid pace, we can anticipate several trends in NFT royalty models:
Blockchain Agnosticism: Cross-chain solutions will gain prominence, allowing NFTs to seamlessly move between different blockchains, expanding their reach and ensuring royalty enforcement across ecosystems.
Standardization: Industry-wide standards for royalty structures and smart contracts are likely to emerge, reducing confusion and disputes among creators, collectors, and marketplaces.
Improved Transparency: Enhanced transparency tools and analytics platforms will provide creators with real-time insights into their NFT sales and royalties, boosting trust and accountability.
Conclusion
The world of NFTs has ushered in a new era of digital ownership and creativity. However, it's not all smooth sailing, especially when it comes to implementing NFT royalties. These royalties, which ensure creators receive a portion of the proceeds each time their NFT changes hands, have introduced unique challenges to the blockchain and digital art landscape.
While challenges persist in the world of NFT royalties, innovative solutions are on the horizon. As blockchain technology matures and the NFT ecosystem evolves, we can expect a more streamlined, efficient, and equitable landscape for creators and collectors alike. The ongoing evolution of NFT royalty models promises to shape the future of digital ownership and the creative economy.