{"eip":7565,"title":"Perpetual Contract NFTs as Collateral","description":"Lock financial assets as NFTs and use them as collateral for borrowing funds in DeFi, facilitating liquidity provision.","authors":["Hyoungsung Kim (@HyoungsungKim) \u003chyougnsung@keti.re.kr\u003e","Yong-Suk Park \u003cyspark@keti.re.kr\u003e","Hyun-Sik Kim \u003chskim@keti.re.kr\u003e"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2023-11-27","requires":[721,4907],"discussionsTo":"https://ethereum-magicians.org/t/erc-7565-proposal-perpetual-contract-nft-for-defi-composability/16790","repo":"ERCs","label":"ERC-7565","officialUrl":"https://eips.ethereum.org/EIPS/eip-7565","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7565.md","url":"https://eips.huatuo.xyz/eip-7565/","tldr":{"en":"Lets holders of NFTs that represent locked DeFi positions (LP tokens, staking locks) borrow against them, using ERC-4907's 'user' role to mark the NFT as pledged while the owner keeps the position and its rewards.","ja":"ロックされた DeFi ポジション（LP トークン、ステーキングのロック）を表す NFT の保有者が、それを担保に借入できるようにする。ERC-4907 の「user」ロールを使って NFT に担保設定済みの印を付け、オーナーはポジションとその報酬を保持し続ける。","ko":"잠긴 DeFi 포지션(LP 토큰, 스테이킹 락)을 나타내는 NFT의 보유자가 이를 담보로 대출받을 수 있게 한다. ERC-4907의 'user' 역할로 NFT가 담보로 잡혔음을 표시하고, 소유자는 포지션과 그 보상을 계속 유지한다.","zh":"让持有代表锁定 DeFi 头寸（LP 代币、质押锁仓）的 NFT 的人可以以其为抵押借款，利用 ERC-4907 的\"user\"角色把 NFT 标记为已质押，而所有者仍保有头寸及其奖励。"},"tags":["nft","defi","collateral","lending","erc4907"],"explainers":{"en":{"lang":"en","tldr":"Lets holders of NFTs that represent locked DeFi positions (LP tokens, staking locks) borrow against them, using ERC-4907's 'user' role to mark the NFT as pledged while the owner keeps the position and its rewards.","tags":["nft","defi","collateral","lending","erc4907"],"related":[721,4907],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7565/","markdown":"## What problem does it solve?\n\nMany DeFi protocols hand you an NFT when you lock assets: an AMM liquidity position, a time-locked stake, a vote-escrow lock. The assets keep earning fees, interest or voting power, but they are illiquid. If you need cash, you have to withdraw, which loses those benefits and drains liquidity from the pool (raising slippage for everyone else).\n\nERC-7565 proposes treating such NFTs as \"perpetual contract NFTs\" that can be pledged as collateral for a loan. You get liquidity while the underlying position stays locked and productive. The idea comes from the authors' 2022 IEEE Access paper.\n\n## How it works\n\nThe standard builds on [ERC-721](/eip-721/) and the rental extension [ERC-4907](/eip-4907/), which separates an NFT's **owner** from a time-limited **user**.\n\n- `collateralize(tokenId, loanAmount, interestRate, loanDuration)`: the owner (or an approved operator) pledges the NFT. In the reference implementation the lending contract sets itself as the ERC-4907 `user` for `loanDuration`, and records the loan terms. Emits `Collateralized`.\n- `repayLoan(tokenId, repayAmount)`: the borrower repays. Once the balance reaches zero the `user` is cleared and the NFT is free again. Emits `LoanRepaid`.\n- `Defaulted(tokenId, lender)` must be emitted if a loan defaults and the NFT goes to the lender.\n- Read helpers: `getLoanTerms`, `viewRepayAmount` (principal plus interest so far), `currentOwner`.\n\nThe reference `viewRepayAmount` pro-rates interest by whole hours elapsed, capped at the loan duration, and rounds up. Repaying halfway through the term therefore costs about half the interest.\n\n## Sample code\n\nInterface from the spec:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IPerpetualContractNFT {\n    event Collateralized(uint256 indexed tokenId, address indexed owner, uint256 loanAmount, uint256 interestRate, uint256 loanDuration);\n    event LoanRepaid(uint256 indexed tokenId, address indexed owner);\n    event Defaulted(uint256 indexed tokenId, address indexed lender);\n\n    function collateralize(uint256 tokenId, uint256 loanAmount, uint256 interestRate, uint64 loanDuration) external;\n    function repayLoan(uint256 tokenId, uint256 repayAmount) external;\n    function getLoanTerms(uint256 tokenId) external view returns (uint256 loanAmount, uint256 interestRate, uint256 loanDuration, uint256 loanDueDate);\n    function currentOwner(uint256 tokenId) external view returns (address);\n    function viewRepayAmount(uint256 tokenId) external view returns (uint256);\n}\n```\n\nBorrow, then repay in full (ethers v6):\n\n```ts\nimport { parseEther } from \"ethers\";\n\nawait nft.collateralize(1n, parseEther(\"1\"), 5n, 7n * 24n * 3600n); // 1 ETH, 5 %, 7 days\nconsole.log(await nft.userOf(1n));          // lending contract while the loan is open\n\nconst due = await nft.viewRepayAmount(1n);\nawait nft.repayLoan(1n, due);\nconsole.log(await nft.userOf(1n));          // zero address once repaid\n```\n\n## Things to know\n\n- Status is **Draft**, and the Security Considerations section is still empty.\n- The interface records loan terms but does not specify how funds are actually lent or repaid, how the loan amount relates to the value of the locked asset, or how liquidation works. The reference code leaves default handling and fund transfers as \"further logic\".\n- Using ERC-4907's `user` role as the lock is a convention of the reference implementation. A lender must make sure the owner cannot simply transfer or withdraw the underlying position while the loan is open.\n"},"ja":{"lang":"ja","tldr":"ロックされた DeFi ポジション（LP トークン、ステーキングのロック）を表す NFT の保有者が、それを担保に借入できるようにする。ERC-4907 の「user」ロールを使って NFT に担保設定済みの印を付け、オーナーはポジションとその報酬を保持し続ける。","tags":["nft","defi","collateral","lending","erc4907"],"related":[721,4907],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7565/","markdown":"## 何を解決するのか\n\n多くの DeFi プロトコルは、資産をロックすると NFT を渡してくれます。AMM の流動性ポジション、期間ロックのステーク、vote-escrow のロックなどです。資産は手数料、利息、議決権を生み続けますが、流動性はありません。現金が必要になったら引き出すしかなく、そうするとそれらの利益を失い、プールから流動性が抜けます（他の全員のスリッページが拡大します）。\n\nERC-7565 は、そうした NFT を、融資の担保に差し入れられる「パーペチュアル・コントラクト NFT」として扱うことを提案します。基礎となるポジションはロックされたまま収益を生み続け、その間に流動性を得られます。このアイデアは、著者らの 2022 年の IEEE Access 論文に由来します。\n\n## 仕組み\n\nこの標準は [ERC-721](/eip-721/) と、NFT の**オーナー**と期限付きの **user** を分離するレンタル拡張 [ERC-4907](/eip-4907/) を土台としています。\n\n- `collateralize(tokenId, loanAmount, interestRate, loanDuration)`: オーナー（または承認されたオペレーター）が NFT を担保に差し入れます。リファレンス実装では、貸付コントラクトが `loanDuration` の間、自身を ERC-4907 の `user` に設定し、貸付条件を記録します。`Collateralized` を発行します。\n- `repayLoan(tokenId, repayAmount)`: 借り手が返済します。残高がゼロになると `user` がクリアされ、NFT は再び自由になります。`LoanRepaid` を発行します。\n- 貸付がデフォルトして NFT が貸し手に渡る場合は、`Defaulted(tokenId, lender)` を発行しなければなりません。\n- 読み取り用ヘルパー: `getLoanTerms`、`viewRepayAmount`（元本とこれまでの利息）、`currentOwner`。\n\nリファレンスの `viewRepayAmount` は、利息を経過した時間（1 時間単位）で按分し、貸付期間を上限として、切り上げます。そのため、期間の半分で返済すれば、利息もおよそ半分で済みます。\n\n## サンプルコード\n\n仕様のインターフェース:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IPerpetualContractNFT {\n    event Collateralized(uint256 indexed tokenId, address indexed owner, uint256 loanAmount, uint256 interestRate, uint256 loanDuration);\n    event LoanRepaid(uint256 indexed tokenId, address indexed owner);\n    event Defaulted(uint256 indexed tokenId, address indexed lender);\n\n    function collateralize(uint256 tokenId, uint256 loanAmount, uint256 interestRate, uint64 loanDuration) external;\n    function repayLoan(uint256 tokenId, uint256 repayAmount) external;\n    function getLoanTerms(uint256 tokenId) external view returns (uint256 loanAmount, uint256 interestRate, uint256 loanDuration, uint256 loanDueDate);\n    function currentOwner(uint256 tokenId) external view returns (address);\n    function viewRepayAmount(uint256 tokenId) external view returns (uint256);\n}\n```\n\n借入と全額返済（ethers v6）:\n\n```ts\nimport { parseEther } from \"ethers\";\n\nawait nft.collateralize(1n, parseEther(\"1\"), 5n, 7n * 24n * 3600n); // 1 ETH, 5 %, 7 days\nconsole.log(await nft.userOf(1n));          // lending contract while the loan is open\n\nconst due = await nft.viewRepayAmount(1n);\nawait nft.repayLoan(1n, due);\nconsole.log(await nft.userOf(1n));          // zero address once repaid\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** で、Security Considerations のセクションはまだ空です。\n- インターフェースは貸付条件を記録しますが、資金が実際にどう貸し借りされ返済されるか、貸付額がロックされた資産の価値とどう関係するか、清算がどう機能するかは規定していません。リファレンスコードは、デフォルトの処理と資金移動を「さらなるロジック」として残しています。\n- ロックとして ERC-4907 の `user` ロールを使うのは、リファレンス実装の慣習です。貸し手は、貸付中にオーナーが基礎となるポジションを単純に転送したり引き出したりできないようにしなければなりません。\n"},"ko":{"lang":"ko","tldr":"잠긴 DeFi 포지션(LP 토큰, 스테이킹 락)을 나타내는 NFT의 보유자가 이를 담보로 대출받을 수 있게 한다. ERC-4907의 'user' 역할로 NFT가 담보로 잡혔음을 표시하고, 소유자는 포지션과 그 보상을 계속 유지한다.","tags":["nft","defi","collateral","lending","erc4907"],"related":[721,4907],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7565/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 DeFi 프로토콜은 자산을 잠그면 NFT를 줍니다. AMM 유동성 포지션, 기간이 잠긴 스테이크, vote-escrow 락 등입니다. 자산은 계속 수수료, 이자, 투표권을 만들어 내지만 유동성은 없습니다. 현금이 필요하면 인출해야 하는데, 그러면 그 혜택을 잃고 풀에서 유동성이 빠져나갑니다(다른 모든 사람의 슬리피지가 커집니다).\n\nERC-7565는 이런 NFT를 대출 담보로 잡힐 수 있는 \"영구 컨트랙트 NFT(perpetual contract NFT)\"로 취급하자고 제안합니다. 기반 포지션은 잠긴 채 계속 수익을 내는 동안 유동성을 얻을 수 있습니다. 이 아이디어는 저자들의 2022년 IEEE Access 논문에서 나왔습니다.\n\n## 어떻게 동작하나요?\n\n이 표준은 [ERC-721](/eip-721/)과, NFT의 **소유자**와 기간이 제한된 **user**를 분리하는 대여 확장 [ERC-4907](/eip-4907/)을 기반으로 합니다.\n\n- `collateralize(tokenId, loanAmount, interestRate, loanDuration)`: 소유자(또는 승인된 오퍼레이터)가 NFT를 담보로 잡힙니다. 레퍼런스 구현에서는 대출 컨트랙트가 `loanDuration` 동안 자신을 ERC-4907의 `user`로 설정하고 대출 조건을 기록합니다. `Collateralized`를 발생시킵니다.\n- `repayLoan(tokenId, repayAmount)`: 차입자가 상환합니다. 잔액이 0이 되면 `user`가 해제되고 NFT는 다시 자유로워집니다. `LoanRepaid`를 발생시킵니다.\n- 대출이 채무 불이행되어 NFT가 대여자에게 넘어가면 `Defaulted(tokenId, lender)`를 반드시 발생시켜야 합니다.\n- 읽기 헬퍼: `getLoanTerms`, `viewRepayAmount`(원금과 현재까지의 이자), `currentOwner`.\n\n레퍼런스의 `viewRepayAmount`는 이자를 경과한 시간(정수 시간 단위)에 비례해 계산하고, 대출 기간을 상한으로 하며, 올림합니다. 따라서 기간의 절반 시점에 상환하면 이자도 대략 절반이 듭니다.\n\n## 샘플 코드\n\n명세의 인터페이스:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IPerpetualContractNFT {\n    event Collateralized(uint256 indexed tokenId, address indexed owner, uint256 loanAmount, uint256 interestRate, uint256 loanDuration);\n    event LoanRepaid(uint256 indexed tokenId, address indexed owner);\n    event Defaulted(uint256 indexed tokenId, address indexed lender);\n\n    function collateralize(uint256 tokenId, uint256 loanAmount, uint256 interestRate, uint64 loanDuration) external;\n    function repayLoan(uint256 tokenId, uint256 repayAmount) external;\n    function getLoanTerms(uint256 tokenId) external view returns (uint256 loanAmount, uint256 interestRate, uint256 loanDuration, uint256 loanDueDate);\n    function currentOwner(uint256 tokenId) external view returns (address);\n    function viewRepayAmount(uint256 tokenId) external view returns (uint256);\n}\n```\n\n대출받고 전액 상환하기(ethers v6):\n\n```ts\nimport { parseEther } from \"ethers\";\n\nawait nft.collateralize(1n, parseEther(\"1\"), 5n, 7n * 24n * 3600n); // 1 ETH, 5 %, 7 days\nconsole.log(await nft.userOf(1n));          // lending contract while the loan is open\n\nconst due = await nft.viewRepayAmount(1n);\nawait nft.repayLoan(1n, due);\nconsole.log(await nft.userOf(1n));          // zero address once repaid\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**이며 Security Considerations 섹션은 아직 비어 있습니다.\n- 인터페이스는 대출 조건을 기록하지만, 자금이 실제로 어떻게 대출되고 상환되는지, 대출 금액이 잠긴 자산의 가치와 어떤 관계인지, 청산이 어떻게 동작하는지는 명시하지 않습니다. 레퍼런스 코드는 채무 불이행 처리와 자금 이동을 \"추가 로직\"으로 남겨 둡니다.\n- 잠금으로 ERC-4907의 `user` 역할을 쓰는 것은 레퍼런스 구현의 관례입니다. 대여자는 대출이 열려 있는 동안 소유자가 기반 포지션을 그냥 전송하거나 인출할 수 없도록 해야 합니다.\n"},"zh":{"lang":"zh","tldr":"让持有代表锁定 DeFi 头寸（LP 代币、质押锁仓）的 NFT 的人可以以其为抵押借款，利用 ERC-4907 的\"user\"角色把 NFT 标记为已质押，而所有者仍保有头寸及其奖励。","tags":["nft","defi","collateral","lending","erc4907"],"related":[721,4907],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7565/","markdown":"## 它解决什么问题？\n\n许多 DeFi 协议在你锁定资产时会给你一个 NFT：AMM 流动性头寸、有时间锁的质押、投票托管（vote-escrow）锁仓。这些资产继续赚取手续费、利息或投票权，但缺乏流动性。如果你需要现金，就必须提取，这会失去那些收益，并抽走池子的流动性（给其他所有人抬高滑点）。\n\nERC-7565 提议把这类 NFT 视为可以作为贷款抵押品质押的\"永续合约 NFT\"（perpetual contract NFT）。在底层头寸保持锁定并继续产生收益的同时，你可以获得流动性。这个想法来自作者 2022 年发表的 IEEE Access 论文。\n\n## 它如何运作\n\n该标准建立在 [ERC-721](/eip-721/) 和租赁扩展 [ERC-4907](/eip-4907/) 之上，后者把 NFT 的**所有者**与有时限的 **user** 分开。\n\n- `collateralize(tokenId, loanAmount, interestRate, loanDuration)`：所有者（或被授权的操作员）质押该 NFT。在参考实现中，借贷合约在 `loanDuration` 期间把自己设为 ERC-4907 的 `user`，并记录贷款条款。触发 `Collateralized`。\n- `repayLoan(tokenId, repayAmount)`：借款人还款。余额归零后，`user` 被清除，NFT 重新自由。触发 `LoanRepaid`。\n- 如果贷款违约且 NFT 归贷款人所有，则必须触发 `Defaulted(tokenId, lender)`。\n- 读取辅助函数：`getLoanTerms`、`viewRepayAmount`（本金加截至目前的利息）、`currentOwner`。\n\n参考实现中的 `viewRepayAmount` 按已过去的整小时数按比例计算利息，以贷款期限为上限，并向上取整。因此在期限过半时还款，大约只需支付一半的利息。\n\n## 示例代码\n\n规范中的接口：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IPerpetualContractNFT {\n    event Collateralized(uint256 indexed tokenId, address indexed owner, uint256 loanAmount, uint256 interestRate, uint256 loanDuration);\n    event LoanRepaid(uint256 indexed tokenId, address indexed owner);\n    event Defaulted(uint256 indexed tokenId, address indexed lender);\n\n    function collateralize(uint256 tokenId, uint256 loanAmount, uint256 interestRate, uint64 loanDuration) external;\n    function repayLoan(uint256 tokenId, uint256 repayAmount) external;\n    function getLoanTerms(uint256 tokenId) external view returns (uint256 loanAmount, uint256 interestRate, uint256 loanDuration, uint256 loanDueDate);\n    function currentOwner(uint256 tokenId) external view returns (address);\n    function viewRepayAmount(uint256 tokenId) external view returns (uint256);\n}\n```\n\n借款，然后全额还款（ethers v6）：\n\n```ts\nimport { parseEther } from \"ethers\";\n\nawait nft.collateralize(1n, parseEther(\"1\"), 5n, 7n * 24n * 3600n); // 1 ETH, 5 %, 7 days\nconsole.log(await nft.userOf(1n));          // lending contract while the loan is open\n\nconst due = await nft.viewRepayAmount(1n);\nawait nft.repayLoan(1n, due);\nconsole.log(await nft.userOf(1n));          // zero address once repaid\n```\n\n## 需要注意\n\n- 状态为 **Draft**，Security Considerations 一节仍然是空的。\n- 该接口记录贷款条款，但没有规定资金实际如何借出和偿还、贷款金额与锁定资产价值的关系，也没有规定清算如何运作。参考代码把违约处理和资金转移留作\"进一步的逻辑\"。\n- 把 ERC-4907 的 `user` 角色用作锁定，是参考实现的一种约定。贷款人必须确保在贷款存续期间，所有者不能直接转移或提取底层头寸。\n"}}}
