{"eip":3386,"title":"ERC-721 and ERC-1155 to ERC-20 Wrapper","description":"A standard interface for contracts that create generic ERC-20 tokens which derive from a pool of unique ERC-721/ERC-1155 tokens.","authors":["Calvin Koder (@ashrowz)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2021-03-12","requires":[165],"discussionsTo":"https://github.com/ethereum/EIPs/issues/3384","repo":"ERCs","label":"ERC-3386","officialUrl":"https://eips.ethereum.org/EIPS/eip-3386","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-3386.md","url":"https://eips.huatuo.xyz/eip-3386/","tldr":{"en":"A stagnant interface for pools that lock ERC-721 or ERC-1155 tokens and mint fungible ERC-20 tokens against them, which can later be burned to redeem a random or a chosen NFT.","ja":"ERC-721 や ERC-1155 トークンをロックし、それに対して代替可能な ERC-20 トークンをミントするプール向けの、停滞中（Stagnant）のインターフェース。後でそれをバーンして、ランダムな NFT または指定した NFT を引き換えられる。","ko":"ERC-721이나 ERC-1155 토큰을 잠그고 그에 대응해 대체 가능한 ERC-20 토큰을 발행하는 풀을 위한 정체(Stagnant) 상태의 인터페이스. 나중에 이 토큰을 소각해 무작위 NFT 또는 지정한 NFT를 되찾을 수 있다.","zh":"一个停滞（Stagnant）的接口：用于锁定 ERC-721 或 ERC-1155 代币并据此铸造同质化 ERC-20 代币的池，这些代币之后可以销毁，以赎回随机或指定的 NFT。"},"tags":["nft","erc20","wrapper","fractionalization","defi"],"explainers":{"en":{"lang":"en","tldr":"A stagnant interface for pools that lock ERC-721 or ERC-1155 tokens and mint fungible ERC-20 tokens against them, which can later be burned to redeem a random or a chosen NFT.","tags":["nft","erc20","wrapper","fractionalization","defi"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-3386/","markdown":"## What problem does it solve?\n\nNFTs ([ERC-721](/eip-721/)) and multi-tokens ([ERC-1155](/eip-1155/)) move by individual ID, in whole units. That makes them hard to use in the large ecosystem built for [ERC-20](/eip-20/): AMMs, lending markets and index products cannot trade or price \"one NFT from this collection\" generically.\n\nSeveral projects (NFTX, NFT20, wrapped CryptoKitties, wrapped MoonCats are cited in the spec) solved this by putting NFTs into a pool and issuing fungible tokens that represent a claim on *some* item in the pool. Each used its own interface. EIP-3386 proposes one common interface, `IWrapper`, for all of them.\n\n## How it works\n\nThe spec names three roles, which may all be the same contract:\n\n- **Base:** the ERC-721 or ERC-1155 tokens being wrapped.\n- **Pool:** the contract holding the deposited base tokens.\n- **Derivative:** the ERC-20 token minted and burned by the wrapper.\n\n**Minting:** `mint(to, id, amount)` or `batchMint(to, ids, amounts)` pulls base tokens from `msg.sender` into the pool and mints derivative tokens to `to`. Deposited base tokens must not leave the pool except through a burn.\n\n**Burning** comes in two flavors:\n\n- `burn(from, to, amount)` / `batchBurn(...)`: burn derivatives and receive *some* base token; no guarantee which one.\n- `idBurn(from, to, id, amount)` / `batchIdBurn(...)`: burn derivatives to redeem a *specific* ID, which an implementation may price differently.\n\nEach operation emits `MintSingle`, `MintBatch`, `BurnSingle` or `BurnBatch`. For ERC-721, every `amount` is 1. The exchange rate between base and derivative is left to the implementation (fixed, or set by mechanisms such as Dutch auctions). Contracts must also implement [ERC-165](/eip-165/).\n\n## Sample code\n\nThe core of the interface, and a client wrapping one NFT (ethers v6):\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IWrapper /* is ERC165 */ {\n    event MintSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n    event BurnSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n\n    function mint(address _to, uint256 _id, uint256 _amount) external;\n    function burn(address _from, address _to, uint256 _amount) external;\n    function idBurn(address _from, address _to, uint256 _id, uint256 _amount) external;\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(nftAddress, [\"function setApprovalForAll(address,bool)\"], signer);\nconst wrapper = new Contract(wrapperAddress, [\n  \"function mint(address,uint256,uint256)\",\n  \"function idBurn(address,address,uint256,uint256)\",\n], signer);\n\nawait (await nft.setApprovalForAll(wrapperAddress, true)).wait();\nawait (await wrapper.mint(await signer.getAddress(), 42n, 1n)).wait(); // deposit NFT #42, receive ERC-20\n```\n\n## Things to know\n\n- Status is **Stagnant**: it never reached Final, and existing NFT pool protocols use their own interfaces.\n- With a fixed exchange rate, the derivative tracks the **floor** value of the pool; a holder of a rare item loses value by depositing it unless the implementation prices IDs individually.\n- `burn` without an ID gives whatever the pool chooses, so users wanting a specific item must use `idBurn`.\n- The spec does not define a standard way to read the exchange rate or the pool's contents; implementations must document those themselves.\n"},"ja":{"lang":"ja","tldr":"ERC-721 や ERC-1155 トークンをロックし、それに対して代替可能な ERC-20 トークンをミントするプール向けの、停滞中（Stagnant）のインターフェース。後でそれをバーンして、ランダムな NFT または指定した NFT を引き換えられる。","tags":["nft","erc20","wrapper","fractionalization","defi"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-3386/","markdown":"## 何を解決するのか\n\nNFT（[ERC-721](/eip-721/)）とマルチトークン（[ERC-1155](/eip-1155/)）は、個別の ID 単位で、丸ごとの単位で動きます。そのため、[ERC-20](/eip-20/) 向けに築かれた大きなエコシステムでは使いにくくなります。AMM、レンディング市場、インデックス商品は、「このコレクションの NFT を 1 つ」を汎用的に取引したり価格付けしたりできません。\n\nいくつかのプロジェクト（仕様では NFTX、NFT20、wrapped CryptoKitties、wrapped MoonCats が挙げられています）は、NFT をプールに入れ、プール内の*いずれかの*アイテムに対する請求権を表す代替可能トークンを発行することでこれを解決しました。それぞれ独自のインターフェースを使っていました。EIP-3386 は、これらすべてに共通する 1 つのインターフェース `IWrapper` を提案します。\n\n## 仕組み\n\n仕様は 3 つの役割を挙げており、すべて同じコントラクトであってもかまいません。\n\n- **Base：** ラップされる ERC-721 または ERC-1155 トークン。\n- **Pool：** 預けられた Base トークンを保持するコントラクト。\n- **Derivative：** ラッパーがミント・バーンする ERC-20 トークン。\n\n**ミント：** `mint(to, id, amount)` または `batchMint(to, ids, amounts)` は、`msg.sender` から Base トークンをプールに引き取り、`to` に Derivative トークンをミントします。預けられた Base トークンは、バーン以外の方法でプールから出てはなりません。\n\n**バーン**には 2 種類あります。\n\n- `burn(from, to, amount)` / `batchBurn(...)`：Derivative をバーンして、*いずれかの* Base トークンを受け取ります。どれが来るかは保証されません。\n- `idBurn(from, to, id, amount)` / `batchIdBurn(...)`：Derivative をバーンして、*特定の* ID を引き換えます。実装によっては価格が異なる場合があります。\n\n各操作は `MintSingle`、`MintBatch`、`BurnSingle`、`BurnBatch` のいずれかを発行します。ERC-721 の場合、`amount` は常に 1 です。Base と Derivative の交換レートは実装に任されています（固定、またはダッチオークションなどの仕組みで決定）。コントラクトは [ERC-165](/eip-165/) も実装しなければなりません。\n\n## サンプルコード\n\nインターフェースの中核部分と、NFT を 1 つラップするクライアント（ethers v6）:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IWrapper /* is ERC165 */ {\n    event MintSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n    event BurnSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n\n    function mint(address _to, uint256 _id, uint256 _amount) external;\n    function burn(address _from, address _to, uint256 _amount) external;\n    function idBurn(address _from, address _to, uint256 _id, uint256 _amount) external;\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(nftAddress, [\"function setApprovalForAll(address,bool)\"], signer);\nconst wrapper = new Contract(wrapperAddress, [\n  \"function mint(address,uint256,uint256)\",\n  \"function idBurn(address,address,uint256,uint256)\",\n], signer);\n\nawait (await nft.setApprovalForAll(wrapperAddress, true)).wait();\nawait (await wrapper.mint(await signer.getAddress(), 42n, 1n)).wait(); // deposit NFT #42, receive ERC-20\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。Final には到達せず、既存の NFT プールのプロトコルは独自のインターフェースを使っています。\n- 交換レートが固定の場合、Derivative はプールの**フロア**価値に連動します。実装が ID ごとに価格を付けない限り、希少なアイテムの保有者は、それを預けることで価値を失います。\n- ID を指定しない `burn` は、プールが選んだものが返ってきます。そのため、特定のアイテムが欲しいユーザーは `idBurn` を使う必要があります。\n- 仕様は、交換レートやプールの中身を読み取る標準的な方法を定義していません。実装側がそれらを自分で文書化する必要があります。\n"},"ko":{"lang":"ko","tldr":"ERC-721이나 ERC-1155 토큰을 잠그고 그에 대응해 대체 가능한 ERC-20 토큰을 발행하는 풀을 위한 정체(Stagnant) 상태의 인터페이스. 나중에 이 토큰을 소각해 무작위 NFT 또는 지정한 NFT를 되찾을 수 있다.","tags":["nft","erc20","wrapper","fractionalization","defi"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-3386/","markdown":"## 어떤 문제를 해결하나요?\n\nNFT([ERC-721](/eip-721/))와 멀티 토큰([ERC-1155](/eip-1155/))은 개별 ID 단위로, 통째로만 움직입니다. 그래서 [ERC-20](/eip-20/)을 중심으로 만들어진 거대한 생태계에서 쓰기 어렵습니다. AMM, 대출 시장, 인덱스 상품은 \"이 컬렉션의 NFT 하나\"를 범용적으로 거래하거나 가격을 매길 수 없습니다.\n\n여러 프로젝트(명세에는 NFTX, NFT20, wrapped CryptoKitties, wrapped MoonCats가 언급됨)는 NFT를 풀에 넣고, 풀 안의 *어떤* 아이템에 대한 청구권을 나타내는 대체 가능 토큰을 발행하는 방식으로 이 문제를 풀었습니다. 각자 자기만의 인터페이스를 썼습니다. EIP-3386은 이 모두를 위한 공통 인터페이스 `IWrapper` 하나를 제안합니다.\n\n## 어떻게 동작하나요?\n\n명세는 세 가지 역할을 정의하며, 전부 같은 컨트랙트여도 됩니다.\n\n- **Base:** 래핑되는 ERC-721 또는 ERC-1155 토큰.\n- **Pool:** 예치된 Base 토큰을 보관하는 컨트랙트.\n- **Derivative:** 래퍼가 발행하고 소각하는 ERC-20 토큰.\n\n**발행(mint):** `mint(to, id, amount)` 또는 `batchMint(to, ids, amounts)`는 `msg.sender`로부터 Base 토큰을 풀로 가져오고 `to`에게 Derivative 토큰을 발행합니다. 예치된 Base 토큰은 소각을 통하지 않고는 풀을 떠나서는 안 됩니다.\n\n**소각(burn)**에는 두 가지가 있습니다.\n\n- `burn(from, to, amount)` / `batchBurn(...)`: Derivative를 소각하고 *어떤* Base 토큰을 받습니다. 어느 것을 받을지는 보장되지 않습니다.\n- `idBurn(from, to, id, amount)` / `batchIdBurn(...)`: Derivative를 소각해 *특정* ID를 되찾습니다. 구현에 따라 가격이 다를 수 있습니다.\n\n각 동작은 `MintSingle`, `MintBatch`, `BurnSingle`, `BurnBatch` 중 하나를 발생시킵니다. ERC-721에서는 모든 `amount`가 1입니다. Base와 Derivative의 교환 비율은 구현에 맡깁니다(고정이거나 더치 옥션 같은 메커니즘으로 결정). 컨트랙트는 [ERC-165](/eip-165/)도 구현해야 합니다.\n\n## 샘플 코드\n\n인터페이스의 핵심 부분과 NFT 하나를 래핑하는 클라이언트(ethers v6):\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IWrapper /* is ERC165 */ {\n    event MintSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n    event BurnSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n\n    function mint(address _to, uint256 _id, uint256 _amount) external;\n    function burn(address _from, address _to, uint256 _amount) external;\n    function idBurn(address _from, address _to, uint256 _id, uint256 _amount) external;\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(nftAddress, [\"function setApprovalForAll(address,bool)\"], signer);\nconst wrapper = new Contract(wrapperAddress, [\n  \"function mint(address,uint256,uint256)\",\n  \"function idBurn(address,address,uint256,uint256)\",\n], signer);\n\nawait (await nft.setApprovalForAll(wrapperAddress, true)).wait();\nawait (await wrapper.mint(await signer.getAddress(), 42n, 1n)).wait(); // deposit NFT #42, receive ERC-20\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. Final에 도달한 적이 없으며, 기존 NFT 풀 프로토콜은 각자의 인터페이스를 씁니다.\n- 교환 비율이 고정이면 Derivative는 풀의 **플로어(floor)** 가치를 따라갑니다. 구현이 ID별로 가격을 매기지 않는 한, 희귀한 아이템의 보유자는 예치하면 가치를 잃습니다.\n- ID 없는 `burn`은 풀이 고르는 것을 주므로, 특정 아이템을 원하는 사용자는 `idBurn`을 써야 합니다.\n- 명세는 교환 비율이나 풀의 내용을 읽는 표준적인 방법을 정의하지 않으므로, 구현이 직접 문서화해야 합니다.\n"},"zh":{"lang":"zh","tldr":"一个停滞（Stagnant）的接口：用于锁定 ERC-721 或 ERC-1155 代币并据此铸造同质化 ERC-20 代币的池，这些代币之后可以销毁，以赎回随机或指定的 NFT。","tags":["nft","erc20","wrapper","fractionalization","defi"],"related":[20,721,1155,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-3386/","markdown":"## 它解决什么问题？\n\nNFT（[ERC-721](/eip-721/)）和多代币（[ERC-1155](/eip-1155/)）按单个 ID、以整份为单位转移。这使它们很难融入围绕 [ERC-20](/eip-20/) 构建的庞大生态：AMM、借贷市场和指数产品无法以通用方式交易或定价“这个系列中的一枚 NFT”。\n\n一些项目（规范中提到了 NFTX、NFT20、wrapped CryptoKitties、wrapped MoonCats）通过把 NFT 放入池中，并发行代表对池中*某一个*物品之索取权的同质化代币来解决这个问题。每个项目都使用自己的接口。EIP-3386 为它们提出了一个统一的通用接口 `IWrapper`。\n\n## 它如何运作\n\n规范列出三种角色，它们可以全部是同一个合约：\n\n- **Base：**被包装的 ERC-721 或 ERC-1155 代币。\n- **Pool：**持有已存入 Base 代币的合约。\n- **Derivative：**由包装器铸造和销毁的 ERC-20 代币。\n\n**铸造：**`mint(to, id, amount)` 或 `batchMint(to, ids, amounts)` 把 Base 代币从 `msg.sender` 拉入池中，并向 `to` 铸造 Derivative 代币。已存入的 Base 代币除了通过销毁之外，不得离开池。\n\n**销毁**有两种：\n\n- `burn(from, to, amount)` / `batchBurn(...)`：销毁 Derivative 并获得*某一个* Base 代币；不保证是哪一个。\n- `idBurn(from, to, id, amount)` / `batchIdBurn(...)`：销毁 Derivative 以赎回*指定的* ID，实现可以为它定不同的价格。\n\n每个操作都会触发 `MintSingle`、`MintBatch`、`BurnSingle` 或 `BurnBatch`。对于 ERC-721，每个 `amount` 都是 1。Base 与 Derivative 之间的兑换比率由实现自行决定（固定，或由荷兰式拍卖等机制设定）。合约还必须实现 [ERC-165](/eip-165/)。\n\n## 示例代码\n\n接口的核心部分，以及一个包装单个 NFT 的客户端（ethers v6）：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IWrapper /* is ERC165 */ {\n    event MintSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n    event BurnSingle(address indexed _from, address indexed _to, uint256 _id, uint256 _amount, uint256 _value);\n\n    function mint(address _to, uint256 _id, uint256 _amount) external;\n    function burn(address _from, address _to, uint256 _amount) external;\n    function idBurn(address _from, address _to, uint256 _id, uint256 _amount) external;\n}\n```\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(nftAddress, [\"function setApprovalForAll(address,bool)\"], signer);\nconst wrapper = new Contract(wrapperAddress, [\n  \"function mint(address,uint256,uint256)\",\n  \"function idBurn(address,address,uint256,uint256)\",\n], signer);\n\nawait (await nft.setApprovalForAll(wrapperAddress, true)).wait();\nawait (await wrapper.mint(await signer.getAddress(), 42n, 1n)).wait(); // deposit NFT #42, receive ERC-20\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**：它从未达到 Final，现有的 NFT 池协议使用各自的接口。\n- 在固定兑换比率下，Derivative 跟踪的是池的**地板价**价值；除非实现对各个 ID 单独定价，否则稀有物品的持有者把它存入就会损失价值。\n- 不带 ID 的 `burn` 得到的是池所选的任意物品，因此想要特定物品的用户必须使用 `idBurn`。\n- 规范没有定义读取兑换比率或池内容的标准方法；实现必须自行说明这些。\n"}}}
