{"eip":4910,"title":"Royalty Bearing NFTs","description":"Extension of ERC-721 to correctly define, process, and pay (hierarchical) onchain NFT royalties.","authors":["Andreas Freund (@Therecanbeonlyone1969)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2022-03-14","requires":[165,721],"discussionsTo":"https://ethereum-magicians.org/t/royalty-bearing-nfts/8453","repo":"ERCs","label":"ERC-4910","officialUrl":"https://eips.ethereum.org/EIPS/eip-4910","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-4910.md","url":"https://eips.huatuo.xyz/eip-4910/","tldr":{"en":"An ERC-721 extension that enforces royalties on-chain: the NFT contract owns every token, takes all sale payments itself and splits them through a tree of royalty accounts that can span originals and their prints.","ja":"ERC-721 の拡張で、ロイヤリティをオンチェーンで強制する。NFT コントラクトがすべてのトークンを所有し、販売代金を自ら受け取り、オリジナルとそのプリントにまたがりうるロイヤリティアカウントのツリーを通じて分配する。","ko":"로열티를 온체인에서 강제하는 ERC-721 확장. NFT 컨트랙트가 모든 토큰을 소유하고, 판매 대금을 직접 받아, 원작과 그 프린트에 걸쳐 있을 수 있는 로열티 계정 트리를 통해 분배한다.","zh":"ERC-721 的扩展，在链上强制执行版税：NFT 合约拥有每一枚代币，自己接收所有销售款项，并通过一棵版税账户树进行分配，这棵树可以跨越原作及其复制品。"},"tags":["nft","royalties","erc721","marketplace","payments"],"explainers":{"en":{"lang":"en","tldr":"An ERC-721 extension that enforces royalties on-chain: the NFT contract owns every token, takes all sale payments itself and splits them through a tree of royalty accounts that can span originals and their prints.","tags":["nft","royalties","erc721","marketplace","payments"],"related":[721,2981,20,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-4910/","markdown":"## What problem does it solve?\n\nRoyalty standards such as [ERC-2981](/eip-2981/) only *report* how much a creator should receive; marketplaces can ignore it, and sellers can trade privately to avoid paying. Royalties also get complicated when works are derived from other works: a print of a painting, a song sampled in another song, distribution through chains of affiliates. Each level may owe something to the one above.\n\nERC-4910 tries to make royalties unavoidable and hierarchical by moving the whole sale, payment and royalty distribution process into the NFT contract itself.\n\n## How it works\n\n- **The contract owns every NFT.** At mint, `owner` is set to the NFT contract and the real holder is the *approved* address. This keeps it ERC-721 compatible while letting the contract control every transfer.\n- **Royalty Accounts (RAs).** Each token gets an RA made of sub-accounts with percentage splits that must always sum to 100 %. A sub-account can be an individual or another RA, which forms a **royalty tree** linking a child (print) to its parent. Distribution walks the tree one layer at a time up to the root.\n- **Buyers pay the contract, never the seller.**\n  - Direct sale: the seller calls `listNFT(tokenIds, price, tokenType)`. The buyer approves an ERC-20 and calls `executePayment(...)` with `trxnType = 0`, or sends ETH to a payable `fallback` with the encoded data.\n  - Exchange-mediated sale (`trxnType = 1`): the payment is registered first, then the exchange calls `safeTransferFrom` with trade data in `_data`.\n- **Only one transfer path.** `transferFrom` and `safeTransferFrom` without data MUST be disabled; the remaining `safeTransferFrom(from, to, tokenId, data)` validates the payment, credits every sub-account, and only then transfers.\n- **Pull payouts.** Balances accumulate in sub-accounts and are withdrawn with `royaltyPayOut(tokenId, subaccount, payoutAccount, amount)` (non-reentrant). `reversePayment` refunds a buyer if a sale fails or is abandoned.\n- Other functions: `mint(to, NFTToken[], tokenType)`, `getRoyaltyAccount`, `updateRoyaltyAccount` (strict rules: a holder can only give away part of their own split), `deleteRoyaltyAccount` (only when the token and all relatives are burned and balances are zero), `removeNFTListing`.\n\n## Sample code\n\nBuying a listed NFT with an ERC-20 (ethers v6). The function signatures follow the spec; check your implementation's exact ABI:\n\n```ts\nimport { Contract, parseUnits } from \"ethers\";\n\nconst nft = new Contract(nftAddr, [\n  \"function executePayment(address receiver, address seller, uint256[] tokenIds, uint256 payment, string tokenType, int256 trxnType) returns (bool)\",\n], buyer);\nconst dai = new Contract(daiAddr, [\"function approve(address,uint256) returns (bool)\"], buyer);\n\nconst price = parseUnits(\"100\", 18);\nawait (await dai.approve(nftAddr, price)).wait();           // 1. allow the NFT contract to pull\nawait (await nft.executePayment(\n  await buyer.getAddress(), seller, [42n], price, \"DAI\", 0n // 2. direct sale\n)).wait();\n```\n\n## Things to know\n\n- Status: **Final**, but it is a heavy, opinionated design. Because the contract owns all tokens and blocks plain transfers, these NFTs do not behave like normal ERC-721s on most marketplaces and wallets.\n- Royalties still cannot stop off-chain deals such as selling a private key, or trading a smart-contract wallet that holds the NFT. The spec suggests blocking contract holders unless whitelisted.\n- Deep or wide royalty trees can exceed gas limits. Creators should cap generations, sub-accounts, prints per print and listing size.\n- The function signatures in the spec contain typos (e.g. `uint 256[]`); treat the reference implementation as the source of truth and get an audit.\n"},"ja":{"lang":"ja","tldr":"ERC-721 の拡張で、ロイヤリティをオンチェーンで強制する。NFT コントラクトがすべてのトークンを所有し、販売代金を自ら受け取り、オリジナルとそのプリントにまたがりうるロイヤリティアカウントのツリーを通じて分配する。","tags":["nft","royalties","erc721","marketplace","payments"],"related":[721,2981,20,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-4910/","markdown":"## 何を解決するのか\n\n[ERC-2981](/eip-2981/) のようなロイヤリティ標準は、クリエイターが受け取るべき金額を*通知*するだけです。マーケットプレイスはこれを無視でき、売り手は支払いを避けるために私的に取引できます。作品が他の作品から派生する場合もロイヤリティは複雑になります。絵画のプリント、別の曲にサンプリングされた曲、アフィリエイトの連鎖を通じた流通などです。各レベルが上位のレベルに対して何かを支払う必要があるかもしれません。\n\nERC-4910 は、販売・支払い・ロイヤリティ分配のプロセス全体を NFT コントラクト自体に移すことで、ロイヤリティを回避不能かつ階層的なものにしようとします。\n\n## 仕組み\n\n- **コントラクトがすべての NFT を所有します。** ミント時に `owner` は NFT コントラクトに設定され、実際の保有者は*承認された*アドレスになります。これにより ERC-721 との互換性を保ちつつ、コントラクトがすべての転送を制御できます。\n- **ロイヤリティアカウント（RA）。** 各トークンには、割合による分配を持つサブアカウントで構成された RA が与えられ、その合計は常に 100 % でなければなりません。サブアカウントは個人でも別の RA でもよく、これが子（プリント）を親に結びつける**ロイヤリティツリー**を形成します。分配はツリーを 1 層ずつルートまでたどって行われます。\n- **買い手が支払う相手はコントラクトであり、売り手ではありません。**\n  - 直接販売: 売り手が `listNFT(tokenIds, price, tokenType)` を呼びます。買い手は ERC-20 を approve して `trxnType = 0` で `executePayment(...)` を呼ぶか、エンコードしたデータとともに ETH を payable な `fallback` に送ります。\n  - 取引所を介した販売（`trxnType = 1`）: まず支払いが登録され、その後取引所が `_data` に取引データを入れて `safeTransferFrom` を呼びます。\n- **転送経路は 1 つだけです。** `transferFrom` と、データなしの `safeTransferFrom` は無効化しなければなりません（MUST）。残る `safeTransferFrom(from, to, tokenId, data)` が支払いを検証し、すべてのサブアカウントに入金し、その後で初めて転送します。\n- **プル型の支払い。** 残高はサブアカウントに蓄積され、`royaltyPayOut(tokenId, subaccount, payoutAccount, amount)`（再入不可）で引き出します。`reversePayment` は、販売が失敗または放棄された場合に買い手へ返金します。\n- その他の関数: `mint(to, NFTToken[], tokenType)`、`getRoyaltyAccount`、`updateRoyaltyAccount`（厳格なルールあり: 保有者は自分の取り分の一部しか譲渡できません）、`deleteRoyaltyAccount`（トークンと関係するすべてのトークンがバーンされ、残高がゼロの場合のみ）、`removeNFTListing`。\n\n## サンプルコード\n\n出品された NFT を ERC-20 で購入する例（ethers v6）。関数シグネチャは仕様に従っています。実装の正確な ABI は確認してください。\n\n```ts\nimport { Contract, parseUnits } from \"ethers\";\n\nconst nft = new Contract(nftAddr, [\n  \"function executePayment(address receiver, address seller, uint256[] tokenIds, uint256 payment, string tokenType, int256 trxnType) returns (bool)\",\n], buyer);\nconst dai = new Contract(daiAddr, [\"function approve(address,uint256) returns (bool)\"], buyer);\n\nconst price = parseUnits(\"100\", 18);\nawait (await dai.approve(nftAddr, price)).wait();           // 1. allow the NFT contract to pull\nawait (await nft.executePayment(\n  await buyer.getAddress(), seller, [42n], price, \"DAI\", 0n // 2. direct sale\n)).wait();\n```\n\n## 知っておくべきこと\n\n- ステータス: **Final** ですが、重くて主張の強い設計です。コントラクトがすべてのトークンを所有し、通常の転送をブロックするため、これらの NFT はほとんどのマーケットプレイスやウォレットで通常の ERC-721 のようには動作しません。\n- ロイヤリティでも、秘密鍵の売却や、NFT を保有するスマートコントラクトウォレットの取引といったオフチェーンの取引は止められません。仕様では、ホワイトリストに載っていない限りコントラクトの保有者をブロックすることを提案しています。\n- 深い、または幅の広いロイヤリティツリーは、ガスリミットを超える可能性があります。クリエイターは、世代数、サブアカウント数、プリントごとのプリント数、出品サイズに上限を設けるべきです。\n- 仕様の関数シグネチャには誤記があります（例: `uint 256[]`）。リファレンス実装を正としてください。また監査を受けてください。\n"},"ko":{"lang":"ko","tldr":"로열티를 온체인에서 강제하는 ERC-721 확장. NFT 컨트랙트가 모든 토큰을 소유하고, 판매 대금을 직접 받아, 원작과 그 프린트에 걸쳐 있을 수 있는 로열티 계정 트리를 통해 분배한다.","tags":["nft","royalties","erc721","marketplace","payments"],"related":[721,2981,20,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-4910/","markdown":"## 어떤 문제를 해결하나요?\n\n[ERC-2981](/eip-2981/) 같은 로열티 표준은 창작자가 받아야 할 금액을 *알려줄* 뿐입니다. 마켓플레이스는 이를 무시할 수 있고, 판매자는 지불을 피하려고 비공개로 거래할 수 있습니다. 작품이 다른 작품에서 파생될 때도 로열티는 복잡해집니다. 그림의 프린트, 다른 곡에 샘플링된 노래, 제휴사 사슬을 통한 유통 등이 그렇습니다. 각 단계가 위 단계에 일부를 지불해야 할 수 있습니다.\n\nERC-4910은 판매, 결제, 로열티 분배 과정 전체를 NFT 컨트랙트 자체로 옮겨서 로열티를 피할 수 없고 계층적인 것으로 만들려 합니다.\n\n## 어떻게 동작하나요?\n\n- **컨트랙트가 모든 NFT를 소유합니다.** 민팅 시 `owner`는 NFT 컨트랙트로 설정되고 실제 보유자는 *승인된* 주소가 됩니다. 이렇게 하면 ERC-721과 호환되면서 컨트랙트가 모든 전송을 통제할 수 있습니다.\n- **로열티 계정(RA).** 각 토큰에는 비율로 나뉜 하위 계정들로 이루어진 RA가 주어지며, 비율의 합은 항상 100 %여야 합니다. 하위 계정은 개인일 수도, 다른 RA일 수도 있어서 자식(프린트)을 부모와 연결하는 **로열티 트리**를 이룹니다. 분배는 트리를 한 층씩 루트까지 거슬러 올라가며 이루어집니다.\n- **구매자는 판매자가 아니라 컨트랙트에 지불합니다.**\n  - 직접 판매: 판매자가 `listNFT(tokenIds, price, tokenType)`를 호출합니다. 구매자는 ERC-20을 approve하고 `trxnType = 0`으로 `executePayment(...)`를 호출하거나, 인코딩된 데이터와 함께 ETH를 payable `fallback`에 보냅니다.\n  - 거래소를 거친 판매(`trxnType = 1`): 먼저 결제가 등록되고, 그다음 거래소가 `_data`에 거래 데이터를 담아 `safeTransferFrom`을 호출합니다.\n- **전송 경로는 하나뿐입니다.** `transferFrom`과 데이터 없는 `safeTransferFrom`은 반드시(MUST) 비활성화해야 합니다. 남은 `safeTransferFrom(from, to, tokenId, data)`가 결제를 검증하고, 모든 하위 계정에 입금한 다음에야 전송합니다.\n- **풀(pull) 방식 지급.** 잔액은 하위 계정에 쌓이고 `royaltyPayOut(tokenId, subaccount, payoutAccount, amount)`(재진입 불가)로 인출합니다. `reversePayment`는 판매가 실패하거나 중단되면 구매자에게 환불합니다.\n- 기타 함수: `mint(to, NFTToken[], tokenType)`, `getRoyaltyAccount`, `updateRoyaltyAccount`(엄격한 규칙: 보유자는 자신의 몫 중 일부만 넘겨줄 수 있음), `deleteRoyaltyAccount`(토큰과 모든 관련 토큰이 소각되고 잔액이 0일 때만), `removeNFTListing`.\n\n## 샘플 코드\n\n상장된 NFT를 ERC-20으로 구매하기(ethers v6). 함수 시그니처는 스펙을 따릅니다. 사용하는 구현의 정확한 ABI를 확인하세요.\n\n```ts\nimport { Contract, parseUnits } from \"ethers\";\n\nconst nft = new Contract(nftAddr, [\n  \"function executePayment(address receiver, address seller, uint256[] tokenIds, uint256 payment, string tokenType, int256 trxnType) returns (bool)\",\n], buyer);\nconst dai = new Contract(daiAddr, [\"function approve(address,uint256) returns (bool)\"], buyer);\n\nconst price = parseUnits(\"100\", 18);\nawait (await dai.approve(nftAddr, price)).wait();           // 1. allow the NFT contract to pull\nawait (await nft.executePayment(\n  await buyer.getAddress(), seller, [42n], price, \"DAI\", 0n // 2. direct sale\n)).wait();\n```\n\n## 알아둘 점\n\n- 상태: **Final**이지만 무겁고 주관이 강한 설계입니다. 컨트랙트가 모든 토큰을 소유하고 일반 전송을 막기 때문에, 이 NFT들은 대부분의 마켓플레이스와 지갑에서 일반 ERC-721처럼 동작하지 않습니다.\n- 로열티로도 개인키를 파는 것이나 NFT를 보유한 스마트 컨트랙트 지갑을 거래하는 것 같은 오프체인 거래는 막을 수 없습니다. 스펙은 화이트리스트에 없는 컨트랙트 보유자를 차단할 것을 제안합니다.\n- 깊거나 넓은 로열티 트리는 가스 한도를 초과할 수 있습니다. 창작자는 세대 수, 하위 계정 수, 프린트당 프린트 수, 리스팅 크기에 상한을 두어야 합니다.\n- 스펙의 함수 시그니처에는 오타가 있습니다(예: `uint 256[]`). 레퍼런스 구현을 기준으로 삼고 감사를 받으세요.\n"},"zh":{"lang":"zh","tldr":"ERC-721 的扩展，在链上强制执行版税：NFT 合约拥有每一枚代币，自己接收所有销售款项，并通过一棵版税账户树进行分配，这棵树可以跨越原作及其复制品。","tags":["nft","royalties","erc721","marketplace","payments"],"related":[721,2981,20,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-4910/","markdown":"## 它解决什么问题？\n\n[ERC-2981](/eip-2981/) 之类的版税标准只是*报告*创作者应得多少；市场可以无视它，卖家也可以私下交易以逃避付款。当作品由其他作品衍生时，版税还会变得复杂：一幅画的复制品、被另一首歌采样的歌曲、通过多级分销商的发行。每一层都可能要向上一层付费。\n\nERC-4910 试图把整个销售、支付和版税分配流程移入 NFT 合约本身，使版税无法回避并具有层级结构。\n\n## 它如何运作\n\n- **合约拥有每一枚 NFT。** 铸造时，`owner` 被设为 NFT 合约，真正的持有者是*被授权*（approved）的地址。这样既保持了 ERC-721 兼容，又让合约能控制每一次转移。\n- **版税账户（RA）。** 每枚代币都有一个 RA，由按百分比分成的子账户组成，各比例之和必须始终为 100 %。子账户可以是个人，也可以是另一个 RA，由此形成把子项（复制品）与父项相连的**版税树**。分配时逐层沿树向上直到根。\n- **买家向合约付款，而不是向卖家付款。**\n  - 直接销售：卖家调用 `listNFT(tokenIds, price, tokenType)`。买家授权一个 ERC-20 并以 `trxnType = 0` 调用 `executePayment(...)`，或者携带编码后的数据向 payable 的 `fallback` 发送 ETH。\n  - 交易所撮合的销售（`trxnType = 1`）：先登记付款，然后交易所调用 `safeTransferFrom`，并在 `_data` 中携带交易数据。\n- **只有一条转移路径。** `transferFrom` 和不带数据的 `safeTransferFrom` 必须（MUST）被禁用；剩下的 `safeTransferFrom(from, to, tokenId, data)` 会验证付款、给每个子账户记账，最后才执行转移。\n- **提取式（pull）支付。** 余额累积在子账户中，通过 `royaltyPayOut(tokenId, subaccount, payoutAccount, amount)`（不可重入）提取。如果销售失败或被放弃，`reversePayment` 会向买家退款。\n- 其他函数：`mint(to, NFTToken[], tokenType)`、`getRoyaltyAccount`、`updateRoyaltyAccount`（规则严格：持有者只能让出自己那份分成的一部分）、`deleteRoyaltyAccount`（仅当该代币及所有相关代币都已销毁且余额为零时）、`removeNFTListing`。\n\n## 示例代码\n\n用 ERC-20 购买已上架的 NFT（ethers v6）。函数签名遵循规范；请核对你的实现的确切 ABI：\n\n```ts\nimport { Contract, parseUnits } from \"ethers\";\n\nconst nft = new Contract(nftAddr, [\n  \"function executePayment(address receiver, address seller, uint256[] tokenIds, uint256 payment, string tokenType, int256 trxnType) returns (bool)\",\n], buyer);\nconst dai = new Contract(daiAddr, [\"function approve(address,uint256) returns (bool)\"], buyer);\n\nconst price = parseUnits(\"100\", 18);\nawait (await dai.approve(nftAddr, price)).wait();           // 1. allow the NFT contract to pull\nawait (await nft.executePayment(\n  await buyer.getAddress(), seller, [42n], price, \"DAI\", 0n // 2. direct sale\n)).wait();\n```\n\n## 需要注意\n\n- 状态：**Final**，但这是一个沉重且带有强烈主张的设计。由于合约拥有所有代币并阻止普通转账，这些 NFT 在大多数市场和钱包上的表现与普通 ERC-721 不同。\n- 版税仍然无法阻止链下交易，例如出售私钥，或交易持有该 NFT 的智能合约钱包。规范建议除非在白名单中，否则阻止合约持有者。\n- 过深或过宽的版税树可能超出 gas 限制。创作者应对代数、子账户数、每个复制品可再复制的数量以及上架规模设置上限。\n- 规范中的函数签名含有笔误（例如 `uint 256[]`）；请以参考实现为准，并进行审计。\n"}}}
