{"eip":4393,"title":"Micropayments for NFTs and Multi Tokens","description":"An interface for tip tokens that allows tipping to holders of NFTs and multi tokens","authors":["Jules Lai (@julesl23)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2021-10-24","requires":[165,721,1155],"discussionsTo":"https://ethereum-magicians.org/t/eip-proposal-micropayments-standard-for-nfts-and-multi-tokens/7366","repo":"ERCs","label":"ERC-4393","officialUrl":"https://eips.ethereum.org/EIPS/eip-4393","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-4393.md","url":"https://eips.huatuo.xyz/eip-4393/","tldr":{"en":"A stagnant interface for tip tokens: users deposit an ERC-20, receive tips, and send them to NFT or multi-token holders, who later withdraw the matching ERC-20 as rewards.","ja":"チップトークンのための、停滞中のインターフェース。ユーザーが ERC-20 を預け入れてチップを受け取り、NFT やマルチトークンの保有者に送ると、保有者は後で対応する ERC-20 を報酬として引き出す。","ko":"팁 토큰을 위한 정체된 인터페이스. 사용자가 ERC-20을 예치하고 팁을 받아 NFT나 멀티 토큰 보유자에게 보내면, 보유자는 나중에 해당하는 ERC-20을 보상으로 인출한다.","zh":"一个处于停滞状态的打赏代币接口：用户存入某种 ERC-20 并获得打赏代币，再把打赏发给 NFT 或多代币持有者，持有者之后提取对应的 ERC-20 作为奖励。"},"tags":["nft","tipping","micropayments","rewards","erc-1155"],"explainers":{"en":{"lang":"en","tldr":"A stagnant interface for tip tokens: users deposit an ERC-20, receive tips, and send them to NFT or multi-token holders, who later withdraw the matching ERC-20 as rewards.","tags":["nft","tipping","micropayments","rewards","erc-1155"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-4393/","markdown":"## What problem does it solve?\n\nSending a small payment to \"whoever holds this NFT\" is awkward: you have to look up the current owner, pay a full transfer's gas for each tip, and there is no shared way for dapps to show who tipped what. For content, games or shared works represented by NFTs, creators also want a fair way to split small payments among several holders.\n\nERC-4393 proposes a minimal `ITipToken` interface so any dapp can offer tipping to [ERC-721](/eip-721/) and [ERC-1155](/eip-1155/) token holders, with batching to keep gas low.\n\n## How it works\n\n1. **Deposit.** A user deposits one specific [ERC-20](/eip-20/) (the *reward token*, fixed per tip-token contract) via `deposit(user, amount)` and is minted tip tokens in exchange. The exchange rate is left to the implementer.\n2. **Approve NFTs.** The tip-token contract enables tipping for an NFT and its holders with `setApprovalForNFT(holders, nft, id, approved)`. This reverts if the NFT contract does not report ERC-721 or ERC-1155 support, or has not approved the tip contract as an operator.\n3. **Tip.** `tip(nft, id, amount)` burns the sender's tip tokens and credits an equivalent value of the deposited ERC-20 to the holder's pending balance. The value is `depositBalance × tipAmount / tipBalance`, so \"free\" tips added to a user only dilute the value of each of their tips.\n4. **Withdraw.** Holders call `withdrawReward(amount)` whenever they like to receive the ERC-20.\n\nFor ERC-1155 tokens with several holders, rewards are split in proportion to each holder's balance of that id, which makes it usable for royalty-style sharing. `tipBatch` sends many tips in one transaction, intended for tips cached offchain and settled together. Events (`Deposit`, `Tip`, `WithdrawReward`, `ApprovalForNFT`, `InitializeTipToken`) are required so the full state can be rebuilt from logs.\n\n## Sample code\n\nA tipping flow from a dapp using ethers v6 (addresses are placeholders):\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, parseUnits } from \"ethers\";\n\nconst abi = [\n  \"function deposit(address user, uint256 amount) payable\",\n  \"function tip(address nft, uint256 id, uint256 amount)\",\n  \"function balanceOf(address user) view returns (uint256)\",\n  \"function rewardPendingOf(address holder) view returns (uint256)\",\n  \"function withdrawReward(uint256 amount) payable\",\n];\nconst signer = new Wallet(process.env.PRIVATE_KEY!, new JsonRpcProvider(process.env.RPC_URL));\nconst tips = new Contract(TIP_TOKEN, abi, signer);\n\n// 1. exchange deposited ERC-20 (approved beforehand) for tip tokens\nawait (await tips.deposit(signer.address, parseUnits(\"10\", 18))).wait();\n\n// 2. tip the holder of NFT #42\nawait (await tips.tip(NFT_CONTRACT, 42n, parseUnits(\"1\", 18))).wait();\n\n// 3. the holder later checks and withdraws their reward\nconst pending: bigint = await tips.rewardPendingOf(HOLDER);\n```\n\n## Things to know\n\n- Status: **Stagnant**. It was not finalized and has little known adoption; treat it as a design reference.\n- Each tip-token contract supports exactly one ERC-20 deposit type; supporting several means deploying several contracts.\n- The spec does not define refunds, where escrowed deposits live, or tip pricing. These are implementation choices that matter a lot for users' funds.\n- The spec text quotes two different ERC-165 interface IDs (`0xE47A7022` in the prose, `0x985A3267` in a code comment); compute the ID from the final interface rather than copying either.\n- Approved holders are not updated automatically when an NFT changes hands; the implementer must track ownership changes.\n"},"ja":{"lang":"ja","tldr":"チップトークンのための、停滞中のインターフェース。ユーザーが ERC-20 を預け入れてチップを受け取り、NFT やマルチトークンの保有者に送ると、保有者は後で対応する ERC-20 を報酬として引き出す。","tags":["nft","tipping","micropayments","rewards","erc-1155"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-4393/","markdown":"## 何を解決するのか\n\n「この NFT を持っている人」に少額を送るのは面倒です。現在の所有者を調べ、チップごとに通常の送金と同じガスを払う必要があり、誰が何にチップを送ったかを dapp が表示するための共通の方法もありません。NFT で表されるコンテンツ、ゲーム、共有の作品では、作り手は少額の支払いを複数の保有者の間で公平に分ける方法も求めます。\n\nERC-4393 は最小限の `ITipToken` インターフェースを提案します。これにより、どの dapp も [ERC-721](/eip-721/) や [ERC-1155](/eip-1155/) のトークン保有者へのチップを提供でき、バッチ処理でガスを低く抑えられます。\n\n## 仕組み\n\n1. **預け入れ。** ユーザーは `deposit(user, amount)` で特定の [ERC-20](/eip-20/)（*報酬トークン*。チップトークンのコントラクトごとに固定）を預け入れ、その見返りにチップトークンをミントされます。交換レートは実装者に委ねられます。\n2. **NFT の承認。** チップトークンのコントラクトは、`setApprovalForNFT(holders, nft, id, approved)` で NFT とその保有者へのチップを有効にします。NFT コントラクトが ERC-721 または ERC-1155 のサポートを報告しない場合、またはチップのコントラクトをオペレーターとして承認していない場合は revert します。\n3. **チップ。** `tip(nft, id, amount)` は送信者のチップトークンをバーンし、預け入れられた ERC-20 の同等の価値を保有者の保留中残高に計上します。その価値は `depositBalance × tipAmount / tipBalance` なので、ユーザーに追加された「無料の」チップは、そのユーザーの各チップの価値を薄めるだけです。\n4. **引き出し。** 保有者は好きなときに `withdrawReward(amount)` を呼び出して ERC-20 を受け取ります。\n\n複数の保有者がいる ERC-1155 トークンでは、報酬はその id の各保有者の残高に比例して分配されるため、ロイヤリティ型の分配にも使えます。`tipBatch` は多数のチップを 1 回のトランザクションで送ります。オフチェーンでキャッシュしたチップをまとめて決済する用途を想定しています。イベント（`Deposit`、`Tip`、`WithdrawReward`、`ApprovalForNFT`、`InitializeTipToken`）は、ログから全体の状態を再構築できるよう必須とされています。\n\n## サンプルコード\n\nethers v6 を使った dapp からのチップの流れ（アドレスはプレースホルダー）:\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, parseUnits } from \"ethers\";\n\nconst abi = [\n  \"function deposit(address user, uint256 amount) payable\",\n  \"function tip(address nft, uint256 id, uint256 amount)\",\n  \"function balanceOf(address user) view returns (uint256)\",\n  \"function rewardPendingOf(address holder) view returns (uint256)\",\n  \"function withdrawReward(uint256 amount) payable\",\n];\nconst signer = new Wallet(process.env.PRIVATE_KEY!, new JsonRpcProvider(process.env.RPC_URL));\nconst tips = new Contract(TIP_TOKEN, abi, signer);\n\n// 1. exchange deposited ERC-20 (approved beforehand) for tip tokens\nawait (await tips.deposit(signer.address, parseUnits(\"10\", 18))).wait();\n\n// 2. tip the holder of NFT #42\nawait (await tips.tip(NFT_CONTRACT, 42n, parseUnits(\"1\", 18))).wait();\n\n// 3. the holder later checks and withdraws their reward\nconst pending: bigint = await tips.rewardPendingOf(HOLDER);\n```\n\n## 知っておくべきこと\n\n- ステータス: **Stagnant**。最終化されておらず、知られている採用もほとんどありません。設計の参考として扱ってください。\n- 各チップトークンのコントラクトがサポートする ERC-20 の預け入れ種別はちょうど 1 つです。複数をサポートするなら、複数のコントラクトをデプロイすることになります。\n- 仕様は、返金、エスクローされた預け入れ資金の置き場所、チップの価格設定を定義していません。これらは実装上の選択で、ユーザーの資金にとって非常に重要です。\n- 仕様の文章は、2 つの異なる ERC-165 インターフェース ID（本文では `0xE47A7022`、コードコメントでは `0x985A3267`）を引用しています。どちらもコピーせず、最終的なインターフェースから ID を計算してください。\n- NFT の持ち主が変わっても、承認済みの保有者は自動では更新されません。実装者が所有権の変更を追跡する必要があります。\n"},"ko":{"lang":"ko","tldr":"팁 토큰을 위한 정체된 인터페이스. 사용자가 ERC-20을 예치하고 팁을 받아 NFT나 멀티 토큰 보유자에게 보내면, 보유자는 나중에 해당하는 ERC-20을 보상으로 인출한다.","tags":["nft","tipping","micropayments","rewards","erc-1155"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-4393/","markdown":"## 어떤 문제를 해결하나요?\n\n\"이 NFT를 가진 사람\"에게 소액을 보내는 일은 번거롭습니다. 현재 소유자를 찾아야 하고, 팁마다 일반 전송 한 번의 가스를 내야 하며, 누가 무엇에 팁을 보냈는지 dapp이 보여 줄 공통된 방법도 없습니다. NFT로 표현되는 콘텐츠, 게임, 공유 작품에서는 창작자도 소액 결제를 여러 보유자에게 공정하게 나누는 방법을 원합니다.\n\nERC-4393은 최소한의 `ITipToken` 인터페이스를 제안합니다. 이를 통해 어떤 dapp이든 [ERC-721](/eip-721/)과 [ERC-1155](/eip-1155/) 토큰 보유자에게 팁 기능을 제공할 수 있고, 배치 처리로 가스를 낮게 유지합니다.\n\n## 어떻게 동작하나요?\n\n1. **예치.** 사용자는 `deposit(user, amount)`로 특정 [ERC-20](/eip-20/)(*보상 토큰*, 팁 토큰 컨트랙트마다 고정)을 예치하고 그 대가로 팁 토큰을 민팅받습니다. 교환 비율은 구현자에게 맡겨져 있습니다.\n2. **NFT 승인.** 팁 토큰 컨트랙트는 `setApprovalForNFT(holders, nft, id, approved)`로 NFT와 그 보유자에 대한 팁을 활성화합니다. NFT 컨트랙트가 ERC-721 또는 ERC-1155 지원을 알리지 않거나 팁 컨트랙트를 오퍼레이터로 승인하지 않았다면 revert됩니다.\n3. **팁.** `tip(nft, id, amount)`는 보낸 사람의 팁 토큰을 소각하고 예치된 ERC-20의 동등한 가치를 보유자의 보류 잔액에 적립합니다. 그 가치는 `depositBalance × tipAmount / tipBalance`이므로, 사용자에게 추가된 \"무료\" 팁은 그 사용자의 각 팁 가치를 희석할 뿐입니다.\n4. **인출.** 보유자는 원할 때 `withdrawReward(amount)`를 호출해 ERC-20을 받습니다.\n\n보유자가 여럿인 ERC-1155 토큰에서는 보상이 그 id에 대한 각 보유자의 잔액에 비례해 나뉘므로, 로열티 방식의 분배에 쓸 수 있습니다. `tipBatch`는 많은 팁을 한 트랜잭션으로 보내며, 오프체인에 캐시해 두었다가 함께 정산하는 팁을 위한 것입니다. 이벤트(`Deposit`, `Tip`, `WithdrawReward`, `ApprovalForNFT`, `InitializeTipToken`)는 로그로부터 전체 상태를 재구성할 수 있도록 필수입니다.\n\n## 샘플 코드\n\nethers v6를 사용하는 dapp에서의 팁 흐름(주소는 자리표시자):\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, parseUnits } from \"ethers\";\n\nconst abi = [\n  \"function deposit(address user, uint256 amount) payable\",\n  \"function tip(address nft, uint256 id, uint256 amount)\",\n  \"function balanceOf(address user) view returns (uint256)\",\n  \"function rewardPendingOf(address holder) view returns (uint256)\",\n  \"function withdrawReward(uint256 amount) payable\",\n];\nconst signer = new Wallet(process.env.PRIVATE_KEY!, new JsonRpcProvider(process.env.RPC_URL));\nconst tips = new Contract(TIP_TOKEN, abi, signer);\n\n// 1. exchange deposited ERC-20 (approved beforehand) for tip tokens\nawait (await tips.deposit(signer.address, parseUnits(\"10\", 18))).wait();\n\n// 2. tip the holder of NFT #42\nawait (await tips.tip(NFT_CONTRACT, 42n, parseUnits(\"1\", 18))).wait();\n\n// 3. the holder later checks and withdraws their reward\nconst pending: bigint = await tips.rewardPendingOf(HOLDER);\n```\n\n## 알아둘 점\n\n- 상태: **Stagnant**. 최종 확정되지 않았고 알려진 채택도 거의 없습니다. 설계 참고 자료로 다루세요.\n- 팁 토큰 컨트랙트 하나는 정확히 하나의 ERC-20 예치 유형만 지원합니다. 여러 개를 지원하려면 여러 컨트랙트를 배포해야 합니다.\n- 스펙은 환불, 에스크로된 예치금이 어디에 있는지, 팁 가격 책정을 정의하지 않습니다. 이는 구현상의 선택이며 사용자 자금에 매우 중요합니다.\n- 스펙 본문은 서로 다른 두 ERC-165 인터페이스 ID(본문에는 `0xE47A7022`, 코드 주석에는 `0x985A3267`)를 인용합니다. 어느 쪽도 복사하지 말고 최종 인터페이스로부터 ID를 계산하세요.\n- NFT 주인이 바뀌어도 승인된 보유자는 자동으로 갱신되지 않습니다. 구현자가 소유권 변경을 추적해야 합니다.\n"},"zh":{"lang":"zh","tldr":"一个处于停滞状态的打赏代币接口：用户存入某种 ERC-20 并获得打赏代币，再把打赏发给 NFT 或多代币持有者，持有者之后提取对应的 ERC-20 作为奖励。","tags":["nft","tipping","micropayments","rewards","erc-1155"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-4393/","markdown":"## 它解决什么问题？\n\n给\"持有这枚 NFT 的人\"发一笔小额付款很麻烦：你得先查出当前所有者，每次打赏都要付一次完整转账的 gas，而且 dapp 之间也没有共同的方式来展示谁打赏了什么。对于用 NFT 表示的内容、游戏或共享作品，创作者还希望有一种公平的方式，在多个持有者之间分配小额付款。\n\nERC-4393 提出了一个最小的 `ITipToken` 接口，使任何 dapp 都能向 [ERC-721](/eip-721/) 和 [ERC-1155](/eip-1155/) 代币持有者提供打赏功能，并通过批处理降低 gas。\n\n## 它如何运作\n\n1. **存入。** 用户通过 `deposit(user, amount)` 存入一种特定的 [ERC-20](/eip-20/)（即*奖励代币*，每个打赏代币合约固定一种），并换得铸造出的打赏代币。兑换比率由实现者自行决定。\n2. **批准 NFT。** 打赏代币合约通过 `setApprovalForNFT(holders, nft, id, approved)` 为某个 NFT 及其持有者启用打赏。如果 NFT 合约没有声明支持 ERC-721 或 ERC-1155，或者没有批准该打赏合约为操作者，则会 revert。\n3. **打赏。** `tip(nft, id, amount)` 销毁发送者的打赏代币，并把等值的已存入 ERC-20 记入持有者的待领取余额。其价值为 `depositBalance × tipAmount / tipBalance`，因此添加给用户的\"免费\"打赏只会稀释该用户每笔打赏的价值。\n4. **提取。** 持有者随时调用 `withdrawReward(amount)` 来领取 ERC-20。\n\n对于有多个持有者的 ERC-1155 代币，奖励按每个持有者对该 id 的余额比例分配，因此可用于版税式的分成。`tipBatch` 在一笔交易中发送许多打赏，用于在链下缓存、再统一结算的打赏。事件（`Deposit`、`Tip`、`WithdrawReward`、`ApprovalForNFT`、`InitializeTipToken`）是必须的，以便能够从日志重建完整状态。\n\n## 示例代码\n\n在 dapp 中使用 ethers v6 的打赏流程（地址为占位符）：\n\n```ts\nimport { Contract, Wallet, JsonRpcProvider, parseUnits } from \"ethers\";\n\nconst abi = [\n  \"function deposit(address user, uint256 amount) payable\",\n  \"function tip(address nft, uint256 id, uint256 amount)\",\n  \"function balanceOf(address user) view returns (uint256)\",\n  \"function rewardPendingOf(address holder) view returns (uint256)\",\n  \"function withdrawReward(uint256 amount) payable\",\n];\nconst signer = new Wallet(process.env.PRIVATE_KEY!, new JsonRpcProvider(process.env.RPC_URL));\nconst tips = new Contract(TIP_TOKEN, abi, signer);\n\n// 1. exchange deposited ERC-20 (approved beforehand) for tip tokens\nawait (await tips.deposit(signer.address, parseUnits(\"10\", 18))).wait();\n\n// 2. tip the holder of NFT #42\nawait (await tips.tip(NFT_CONTRACT, 42n, parseUnits(\"1\", 18))).wait();\n\n// 3. the holder later checks and withdraws their reward\nconst pending: bigint = await tips.rewardPendingOf(HOLDER);\n```\n\n## 需要注意\n\n- 状态：**Stagnant**。它没有最终定稿，已知的采用也很少；请将其视为设计参考。\n- 每个打赏代币合约只支持恰好一种 ERC-20 存入类型；要支持多种，就需要部署多个合约。\n- 规范没有定义退款、托管的存款存放在哪里，以及打赏的定价。这些都是实现层面的选择，对用户资金影响重大。\n- 规范文本引用了两个不同的 ERC-165 接口 ID（正文中为 `0xE47A7022`，代码注释中为 `0x985A3267`）；请根据最终的接口自行计算 ID，不要照抄其中任何一个。\n- 当 NFT 易手时，获批的持有者不会自动更新；实现者必须自行跟踪所有权变更。\n"}}}
