Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Royalty Standard (ERC-2981)

ERC-2981 is an Ethereum Request for Comments (ERC) standard that defines a universal interface for non-fungible token (NFT) smart contracts to signal royalty payment information to marketplaces and other platforms.
Chainscore © 2026
definition
NFT PROTOCOL

What is Royalty Standard (ERC-2981)?

A technical deep dive into the Ethereum standard for enforcing creator royalties on secondary market sales.

The Royalty Standard (ERC-2981) is an Ethereum Request for Comments (ERC) that defines a standardized, on-chain method for Non-Fungible Token (NFT) smart contracts to signal royalty payment information to marketplaces and other ecosystem participants. It provides a single, universal function, royaltyInfo(), that returns the recipient address and the royalty amount due for a given token sale price. This solves a critical interoperability problem, as prior to its introduction, marketplaces relied on disparate, often off-chain methods to determine and enforce creator fees, leading to fragmentation and non-payment.

The core mechanism of ERC-2981 is elegantly simple. When a marketplace executes a secondary sale, it calls the royaltyInfo(uint256 tokenId, uint256 salePrice) function on the NFT's smart contract. The contract logic returns two values: the recipient (the Ethereum address to pay) and the royaltyAmount (calculated as a percentage of the salePrice). This amount is then typically sent to the recipient as part of the same transaction. The standard is permissionless and backwards compatible, meaning it can be added to existing NFT contracts via upgrade patterns and does not interfere with other standards like ERC-721 or ERC-1155.

A key design feature is its flexibility. Royalties can be implemented in various ways: as a fixed percentage (e.g., 5% of all sales), a tiered structure based on sale price, or even a custom logic that varies by token ID or other on-chain conditions. However, ERC-2981 is an information standard, not an enforcement standard. It defines how to communicate royalty data, but it does not force marketplaces to pay them. Enforcement ultimately depends on marketplace compliance and, increasingly, on supplemental mechanisms like operator filter registries that restrict trading to compliant platforms.

The adoption of ERC-2981 has become a benchmark for creator-centric NFT ecosystems. Major marketplaces like OpenSea, LooksRare, and Blur have integrated support, querying the standard to display and process royalty payments. For developers and CTOs, implementing ERC-2981 involves adding the royaltyInfo function and associated logic to an NFT's minting contract, often using widely-audited libraries from OpenZeppelin. This provides a clear, on-chain record of the creator's intended compensation, forming a foundational layer for sustainable digital asset economies.

how-it-works
ROYALTY STANDARD

How ERC-2981 Works

A technical breakdown of the ERC-2981 standard's core mechanism for on-chain royalty payments.

ERC-2981, or the NFT Royalty Standard, is an Ethereum Request for Comment (ERC) that defines a standardized, on-chain method for non-fungible token (NFT) smart contracts to communicate royalty payment information to marketplaces and other secondary sale platforms. It introduces a single, mandatory function, royaltyInfo(uint256 tokenId, uint256 salePrice), which returns the recipient address and the royalty amount for a given token and sale price. This function acts as a universal API that any compliant marketplace can query to discover and execute royalty payments automatically, ensuring creators are compensated on secondary sales without relying on off-chain agreements or platform-specific policies.

The core logic resides within the royaltyInfo function. When a marketplace is processing a secondary sale, it calls this function, passing the specific tokenId and the final salePrice. The smart contract's internal logic then calculates the royalty, typically as a percentage of the sale price, and returns the result. For example, a contract might be programmed to send 5% of any sale to the original creator's wallet. This design allows for flexible implementation: royalties can be a fixed percentage, a fixed amount, or determined by complex logic based on the token ID or sale price, all while maintaining a consistent external interface for marketplaces.

A key innovation of ERC-2981 is its support for royalty splits and complex payout structures. The returned recipient address is not limited to a single wallet; it can be a smart contract itself, such as a multi-signature wallet or a custom payment splitter contract. This enables automatic distribution of funds among multiple parties—for instance, splitting royalties between an artist, a co-creator, and a DAO treasury. By encoding this logic on-chain, ERC-2981 removes the need for manual, post-sale distribution and provides a transparent, immutable record of the royalty terms attached to each NFT.

For maximum compatibility, ERC-2981 is designed to be backwards compatible with the widely adopted ERC-721 and ERC-1155 NFT standards. An NFT collection can implement ERC-2981 alongside its core token logic, adding royalty functionality without breaking existing integrations. Furthermore, the standard includes an optional supportsInterface function check, allowing platforms to easily detect if a contract supports royalties. While the standard enforces the reporting of royalties, it does not enforce their payment; it remains the responsibility of the marketplace or exchange to respect the information returned by the contract and forward the funds.

key-features
NFT ROYALTY STANDARD

Key Features of ERC-2981

ERC-2981 is a standardized, on-chain interface for NFT royalties, enabling smart contracts to programmatically report royalty payment information to marketplaces and other ecosystem participants.

01

Standardized Interface

ERC-2981 defines a single, universal function, royaltyInfo(uint256 tokenId, uint256 salePrice), that returns the recipient address and royalty amount for a given NFT sale. This replaces the need for custom, off-chain royalty agreements and enables any marketplace to query this data directly from the NFT's smart contract.

  • Interoperability: Any compliant marketplace can support royalties without custom integration.
  • Backwards Compatibility: Can be implemented alongside other token standards like ERC-721 and ERC-1155.
02

On-Chain Enforcement

Unlike off-chain agreements, ERC-2981 encodes royalty logic directly into the smart contract. This provides a verifiable and immutable record of the creator's royalty terms. The royalty amount is calculated as a percentage of the sale price, ensuring creators are compensated fairly on secondary sales.

  • Transparency: Royalty terms are publicly auditable on the blockchain.
  • Programmatic Payouts: Marketplaces can automate royalty distribution during settlement.
03

Flexible Recipient Designation

The standard allows the royalty recipient to be any Ethereum address, not just the original creator. This enables complex royalty structures, such as:

  • Split Payments: Directing funds to multiple wallets (e.g., artist, co-creator, DAO treasury).
  • Protocol Fees: Allocating a portion to the platform or protocol that minted the NFT.
  • Dynamic Updates: Smart contracts can implement logic to change the recipient based on predefined conditions.
04

Gas-Efficient Design

ERC-2981 is designed as a gas-optimized interface. The royaltyInfo function is a simple view function, meaning it does not modify the blockchain state and can be called without paying gas by off-chain applications. This keeps integration costs low for marketplaces and indexers.

  • No State Changes: Pure read operation for querying royalty data.
  • Minimal Overhead: Adds negligible cost to the NFT's core contract functions.
05

Marketplace Adoption & Optionality

While ERC-2981 provides a standard, its enforcement is optional for marketplaces. A compliant marketplace should call the royaltyInfo function and forward the calculated amount to the designated recipient. However, the standard itself cannot force a marketplace to comply; adoption is driven by ecosystem norms and user demand for creator-friendly platforms.

  • Industry Standard: Widely adopted by major marketplaces like OpenSea and LooksRare.
  • User Choice: Collectors can choose to transact on platforms that respect on-chain royalties.
06

Relationship to ERC-721

ERC-2981 is an extension standard, meaning it is designed to be added to an existing NFT contract. It is most commonly implemented as an interface that an ERC-721 or ERC-1155 contract can inherit and implement. This separation of concerns keeps the core token logic clean while adding specialized royalty functionality.

  • Non-Invasive: Can be added to existing NFT collections via upgradeable proxies.
  • Complementary: Works alongside other extensions like metadata standards (ERC-721Metadata).
code-example
IMPLEMENTATION GUIDE

ERC-2981 Code Example

A practical walkthrough of implementing the NFT royalty standard using Solidity, demonstrating the required interface and core logic.

The core of an ERC-2981 implementation is the royaltyInfo function, which must return the recipient address and royalty amount for a given token sale. A basic implementation stores a default royalty for all tokens in the collection, as shown in the following minimal contract snippet:

solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/interfaces/IERC2981.sol";

contract BasicERC2981 is IERC2981 {
    address private royaltyRecipient;
    uint96 private royaltyBasisPoints; // e.g., 500 = 5%

    function royaltyInfo(uint256 /*tokenId*/, uint256 salePrice)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        royaltyAmount = (salePrice * royaltyBasisPoints) / 10000;
        receiver = royaltyRecipient;
    }
}

This contract imports the official interface, declares storage for the recipient and fee (in basis points), and calculates the royalty as a percentage of the salePrice.

For more advanced use cases, such as token-specific royalties, the implementation must override the function to check a per-token mapping. This allows certain NFTs within a collection to have unique royalty settings, which is common for 1/1 artworks or special editions. The logic typically involves checking a _tokenRoyalties mapping first, and falling back to a default if no specific override exists. It is critical that the function correctly handles the salePrice parameter passed by the marketplace, which should be the final sale price in the native token (e.g., ETH). The returned royaltyAmount must be in the same denomination.

Integrating ERC-2981 with existing NFT contracts like ERC-721 or ERC-1155 requires multiple inheritance. A common pattern is to use OpenZeppelin's base contracts and mixins, such as ERC721 and ERC2981. Developers must also consider gas optimization—storing royalties per token ID is flexible but expensive, while a single global royalty is cheap but inflexible. Furthermore, the standard includes a supportsInterface function; compliant contracts must return true for both the NFT interface ID (0x80ac58cd for ERC-721) and the royalty interface ID (0x2a55205a for ERC-2981) to signal full compatibility to marketplaces and other protocols.

ecosystem-usage
ROYALTY STANDARD (ERC-2981)

Ecosystem Usage & Adoption

ERC-2981 is an Ethereum standard for NFT royalties, defining a universal way for smart contracts to return royalty payment information to marketplaces and other platforms.

01

Core Mechanism

The standard introduces a single, mandatory function: royaltyInfo(uint256 tokenId, uint256 salePrice). This function returns the recipient address and the royalty amount (calculated from the sale price) for a given NFT. This provides a predictable, on-chain data source for platforms to query and execute payments.

  • Standardized Interface: Any marketplace can integrate once to support all ERC-2981 compliant NFTs.
  • Backwards Compatibility: Designed to work alongside existing NFT standards like ERC-721 and ERC-1155.
02

Marketplace Adoption

Major NFT marketplaces have integrated ERC-2981 to automate and enforce creator royalties. This includes platforms like OpenSea, Blur, and LooksRare. Integration typically involves:

  • Querying the royaltyInfo function on every NFT sale.
  • Automatically routing the calculated royalty amount to the designated recipient.
  • Providing a consistent enforcement layer that is not dependent on individual marketplace policy.
03

Implementation Patterns

Royalty logic can be implemented in several ways within a smart contract:

  • Global Royalty: A single recipient and percentage applied to all tokens in the collection.
  • Per-Token Royalty: Royalty details can be set or overridden for individual token IDs, enabling complex scenarios.
  • Tiered Royalties: Logic can be added to change the royalty based on sale price or other on-chain conditions.
  • Override Function: The standard allows for an optional supportsInterface check to signal ERC-2981 compliance.
04

Limitations & Considerations

While a critical step, ERC-2981 is a permissive standard, not an enforcement mechanism. Its limitations include:

  • Optional Enforcement: Marketplaces must choose to query and pay the royalties; the standard itself cannot force payment.
  • Off-Chain Sales: Does not apply to private, off-chain transactions.
  • Gas Overhead: Adds a minimal gas cost for the external call to fetch royalty data.
  • Competing Standards: Some ecosystems or collections use alternative, proprietary royalty systems, creating fragmentation.
05

Related Standards & Extensions

ERC-2981 exists within a broader context of royalty and creator monetization efforts:

  • ERC-721 & ERC-1155: The base NFT standards that ERC-2981 extends.
  • EIP-5516: A proposed standard for splittable royalties, allowing automatic distribution to multiple parties.
  • EIP-7504: A proposed standard for on-chain royalty policies, aiming for more dynamic and enforceable rules.
  • Operator Filter Registry: A separate, controversial mechanism used by some to restrict sales to royalty-enforcing marketplaces.
STANDARDIZATION COMPARISON

ERC-2981 vs. Legacy Royalty Methods

A technical comparison of the standardized on-chain royalty interface against common pre-standardization approaches.

Feature / MechanismERC-2981 (Standard)Custom Registry (Legacy)Metadata-Based (Legacy)

Standard Interface

On-Chain Enforcement

Royalty Recipient Discovery

Direct function call (royaltyInfo)

Query separate registry contract

Off-chain metadata (IPFS, API)

Gas Cost for Marketplace Integration

Low (single call)

Medium (registry + logic)

High (requires off-chain fetch)

Immutable Royalty Logic

Contract-level logic

Registry-level logic

Central server control

Supports Complex Splits

Universal Marketplace Support

Royalty Fee Precision

Basis points (0.01%)

Basis points or custom

Varies (often string)

security-considerations
ERC-2981

Security & Implementation Considerations

While ERC-2981 provides a standardized interface for on-chain royalties, its implementation introduces specific security and design considerations for developers and marketplace operators.

01

Royalty Enforcement is Not Guaranteed

ERC-2981 is a read-only standard; it does not enforce payment. Royalty distribution depends entirely on the marketplace or protocol integrating the standard. This creates a critical trust dependency where a malicious or non-compliant marketplace can bypass payments. Developers must audit marketplace behavior and consider supplementary enforcement mechanisms like transfer hooks or allowlists.

02

Gas Optimization & Recipient Strategy

The royaltyInfo function is called on every sale, so gas efficiency is paramount. Key strategies include:

  • Caching royalty data to avoid repeated storage reads.
  • Using a single, immutable recipient address rather than complex splitter logic within the token contract.
  • Offloading complex royalty splitting to a separate, upgradeable payment processor contract referenced by the token.
03

Handling Upgradability & Immutability

Royalty parameters (recipient, basis points) may need to change. Design patterns to consider:

  • Immutable Contracts: Simple and secure, but inflexible.
  • Ownable Upgradeable: Allows admin changes but introduces centralization risk.
  • Decentralized Governance: Uses a DAO or token vote for changes, adding complexity.
  • Reference Contracts: Store royalty info in a separate, upgradeable contract that tokens query.
04

Frontrunning & Oracle Manipulation

If royaltyInfo uses an oracle or on-chain data (e.g., a dynamic price feed), it is vulnerable to manipulation. A malicious actor could frontrun a sale transaction to alter the data the function reads, potentially setting royalties to zero or diverting them. Implementations should use commit-reveal schemes or trusted, decentralized oracles for any dynamic data.

06

Cross-Chain & Layer 2 Considerations

Royalty logic must be adapted for multi-chain deployments and Layer 2s.

  • Bridged Assets: Royalty enforcement often breaks for bridged NFT representations on other chains.
  • L2 Gas Costs: While cheaper, the same optimization principles apply.
  • Canonical Information: Determine if royalty data lives on L1 (canonical) or is replicated on each L2, which affects synchronization and upgrade paths.
evolution
EVOLUTION & CONTEXT

Royalty Standard (ERC-2981)

An exploration of the technical standard that enables native, on-chain royalty enforcement for non-fungible tokens (NFTs) on the Ethereum blockchain and its EVM-compatible counterparts.

ERC-2981 is an Ethereum Request for Comments (ERC) standard that defines a universal, on-chain method for non-fungible tokens (NFTs) to declare royalty payment information. It provides a smart contract interface—a royaltyInfo function—that returns the recipient address and the royalty amount due for a given sale price, enabling marketplaces and other platforms to programmatically discover and pay creator fees. This standard was created to address the fragmented and often broken royalty enforcement landscape that emerged in the early NFT ecosystem, where reliance on off-chain metadata or platform-specific policies led to inconsistent payments and creator revenue loss.

The standard's development was a direct response to the limitations of its predecessor, ERC-721, which lacked any native royalty specification. Prior to ERC-2981, royalties were typically enforced through a combination of mutable metadata, centralized marketplace policies, and bespoke contract logic, creating a system vulnerable to circumvention on secondary markets that chose not to honor them. By embedding royalty logic directly into the token's smart contract, ERC-2981 aims to make royalty payments a permissionless and verifiable feature of the asset itself, moving away from trust-based, off-chain agreements.

Technically, the royaltyInfo(uint256 _tokenId, uint256 _salePrice) function returns two values: the receiver (the address to pay) and the royaltyAmount (the fee to pay, calculated from the _salePrice). This amount is typically expressed as a fraction of the sale price using a basis points system (e.g., 500 basis points = 5%). A key design principle is backwards compatibility; it can be implemented as an extension to existing ERC-721 and ERC-1155 contracts, allowing older collections to upgrade and new collections to build it in from inception.

While ERC-2981 establishes a critical on-chain signal, its effectiveness depends on marketplace adoption. A marketplace must integrate support for querying the royaltyInfo function and routing the calculated payment to the designated recipient. It does not, however, enforce payment at the protocol level; a marketplace can technically ignore the signal. This has led to the development of more complex, enforcement-focused mechanisms like operator filter registries, which are often used in conjunction with ERC-2981 to restrict sales to compliant marketplaces.

The standard's impact extends beyond simple fee collection. It provides a foundational layer for complex royalty structures, enabling splits between multiple recipients (e.g., creator, platform, charity) and dynamic royalties that can change based on the token ID or sale conditions. As the dominant on-chain royalty standard, ERC-2981 has been widely adopted across major EVM chains including Polygon, Arbitrum, and Optimism, becoming a cornerstone for sustainable creator economies in web3.

ERC-2981

Frequently Asked Questions (FAQ)

Common questions about the ERC-2981 standard for NFT royalties, covering its purpose, implementation, and impact on the ecosystem.

ERC-2981 is an Ethereum Request for Comment standard that defines a universal interface for non-fungible tokens (NFTs) to signal royalty payment information. It works by adding a single, mandatory function, royaltyInfo(uint256 tokenId, uint256 salePrice), to a smart contract. This function returns the recipient address and the royalty amount (calculated from the sale price) that should be paid on secondary sales. By providing a standardized, on-chain method to query this data, it enables marketplaces, aggregators, and other platforms to programmatically discover and enforce creator royalties without relying on off-chain metadata or centralized registries.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team