EIP-2981: Implementing NFT Royalties On-Chain
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.
1
Upload Metadata to IPFS
2
Creating IPFS Repository
3
Start the IPFS daemon
3.1
3.2
4
Add NFT Image to IPFS
4.1
5
Adding Metadata to IPFS
cov_nft.json
.5.1
5.2
5.3
6
Implement NFT Royalties (ERC 2981)
// 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);
}
}
6.1
6.2
COV_nft
implementation. We then set the counter so that each NFT item has a unique ID.6.3
6.4
_setDefaultRoyalty
function, which we create the function that allows us to set the royalty ourselves by calling it.6.5
7
Deploy NFT Royalty Smart Contract
7.1
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.7.2
7.3
setDefaultRoyalty
function has been set, the royalty info can be checked for each NFT sale as shown.8
Verify the NFT Royalty on Opensea
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.