Alert Source Discuss
🚧 Stagnant Standards Track: ERC

ERC-5187: 通过可租赁的使用权扩展 EIP-1155

分离 EIP-1155 的所有权和使用权,允许用户在分配的时间内使用 NFT,并在到期后将其返回给所有者。

Authors DerivStudio (@DerivStudio)
Created 2022-04-17
Discussion Link https://ethereum-magicians.org/t/eip-draft-extending-erc1155-with-rentable-usage-rights/9553/4
Requires EIP-165, EIP-1155

摘要

本标准是 EIP-1155 的扩展。它提议引入可分离、可租赁和可转让的使用权(以 NFT-ID 的形式),使财产所有者(唯一的 NFT 持有者)能够同时将 NFT 出租给多个用户(ID 持有者),租期不同,并在到期后由智能合约收回。

财产所有者始终保留所有权,并能够在租赁期间将 NFT 转让给他人。

该提案还支持转租和续租,以便用户可以在彼此之间自由转让使用权并延长租期。 提前归还 NFT 也可以通过将使用权转租回给财产所有者来实现。

动机

被广泛接受的 EIP-721 和 EIP-1155 标准侧重于独特资产的所有权,在 NFT 主要用作艺术品和收藏品时,或者,你可以说,作为私人财产权时,这是非常明智的。

第一步:“可过期”的 NFT

现实世界中私有制的出现促进了现代经济的蓬勃发展,我们相信使用权将是第一个广泛应用于区块链生态系统的可分离权利。 随着 NFT 越来越多地应用于权利、金融、游戏和元宇宙,NFT 的价值不再仅仅是所有权的证明,而是具有无限的实践应用场景。 例如,艺术家可能希望在特定时期内将其艺术品出租给媒体或观众,并且游戏公会可能希望将游戏物品出租给新玩家以降低他们的入门成本。

NFT 在加密领域的租赁并不是一个新话题,但租赁的实施长期以来依赖于过度抵押、中心化托管或纯粹的信任,这极大地限制了租赁市场的繁荣。 因此,从技术层面提出了一种新型的“可过期”NFT,可以通过智能合约在到期时自动收回,以消除这些瓶颈。 基于此,一种去中心化、无抵押且纯粹“链上”运行的新租赁模式可能会颠覆人们交易和使用 NFT 的方式。 因此,本 EIP 提案旨在创建与 EIP-1155 兼容的“可过期”NFT。

然后,让一切都可以转让

我们实现租赁的方式是分离所有权和使用权,除此之外,我们更侧重于使它们在分离后可以自由定价和交易,这在传统的金融领域是不可能发生的。 想象一下以下场景:i) 作为房东,您可以将出租中的房屋出售给他人,而不会影响租赁,然后您的租户将向新房东支付租金; ii) 作为租户,您可以在未经房东同意的情况下将房屋转租给他人,甚至转租者可以继续转租房屋,直到租赁期临近,最后的租户可以申请续租。 所有这些都可能在区块链世界中发生,这就是区块链之美。 没有许可,没有信任,代码就是法律。

让所有权和使用权可以转让可能会进一步彻底改变 NFT 领域的游戏规则,无论是在资本配置还是 NFT 开发方面。 购买 NFT 所有权更像是投资股票,价格由市场对项目的预期决定; 租赁使用权的投机性较小,因此价格更容易根据供需确定。 所有权市场和使用权市场将发挥作用,以满足目标参与者的需求,并实现有利于 NFT 项目长期稳定发展的平衡。 基于以上,我们提出本 EIP 标准来补充当前的 EIP 范围,并将这些功能作为新标准引入。

规范

本文档中的关键词 “MUST”、“MUST NOT”、“REQUIRED”、“SHALL”、“SHALL NOT”、“SHOULD”、“SHOULD NOT”、“RECOMMENDED”、“MAY” 和 “OPTIONAL” 按照 RFC 2119 中的描述进行解释。

pragma solidity ^0.8.0;

///  Note: the ERC-165 identifier for this interface is 0x6938e358.
 interface IRental /* is IERC165,IERC1155 */ {
    /**
     * @notice This emits when user rent NFT
     * - `id` The id of the current token
     * - `user` The address to rent the NFT usage rights
     * - `amount` The amount of usage rights
     * - `expire` The specified period of time to rent
     **/
    event Rented(uint256 indexed id,address indexed user,uint256 amount,uint256 expire);

    /**
    * MUST trigger on any successful call to `renew(address user,uint256 id)`
    *  - `id` The id of the current token
    *  - `user` The user of the NFT
    *  - `expire` The new specified period of time to rent
    **/
    event Renew(uint256 indexed id,address indexed user,uint256 expire);

    /**
    *  MUST trigger on any successful call to `renew(address user,uint256 id,uint256 expire)`
    *  - `id` The id of the current token
    *  - `from` The current user of the NFT
    *  - `to` The new user
    **/
    event Sublet(uint256 indexed id,address indexed from,address to);

    /**
     * @notice This emits when the NFT owner takes back the usage rights from the tenant (the `user`)
     * - id The id of the current token
     * - user The address to rent the NFT's usage rights
     * - amount Amount of usage rights
     **/
    event TakeBack(uint256 indexed id, address indexed user, uint256 amount);

    /**
     * @notice Function to rent out usage rights
     * - from The address to approve
     * - to The address to rent the NFT usage rights
     * - id The id of the current token
     * - amount The amount of usage rights
     * - expire The specified period of time to rent
     **/
    function safeRent(address from,address to,uint256 id,uint256 amount,uint256 expire) external;

    /**
     * @notice Function to take back usage rights after the end of the tenancy
     * - user The address to rent the NFT's usage rights
     * - tokenId The id of the current token
     **/
    function takeBack(address user,uint256 tokenId) external;

    /**
    * @notice Return the NFT to the address of the NFT property right owner.
    **/
    function propertyRightOf(uint256 id) external view returns (address);

    /**
    * @notice Return the total supply amount of the current token
    **/
    function totalSupply(uint256 id) external view returns (uint256);

    /**
    * @notice Return expire The specified period of time to rent
    **/
    function expireAt(uint256 id,address user) external view returns(uint256);

    /**
    *   extended rental period
    *  - `id` The id of the current token
    *  - `user` The user of the NFT
    *  - `expire` The new specified period of time to rent
    **/
    function renew(address user,uint256 id,uint256 expire)  external;

    /**
    *  transfer of usage right
    *  - `id` The id of the current token
    *  - `user` The user of the NFT
    *  - `expire` The new specified period of time to rent
    **/
    function sublet(address to,uint256 id) external;
}


理由

实施创建可租赁 NFT 的提案有两个主要好处。

一是具有多个使用权的 NFT 允许 NFT 财产所有者执行 safeRent 函数并同时将使用权出租给多个用户。 对于每个已租赁并到期的使用权,财产所有者可以执行 takeBack 函数来取回使用权。

另一个好处是使用权的转让可以非常灵活。 用户可以在租赁期内通过调用 Sublet 函数将使用权转让给其他用户,也可以通过要求财产所有者执行 Renewal 函数来延长使用权的租赁期。 值得一提的是,如果用户将 NFT 转租给财产所有者,则可以在租赁期结束前实现 NFT 的提前归还。

向后兼容性

正如一开始提到的,这是 EIP-1155 的扩展。 因此,它与 EIP-1155 完全向后兼容。

安全考虑

需要讨论。

版权

通过 CC0 放弃版权和相关权利。

Citation

Please cite this document as:

DerivStudio (@DerivStudio), "ERC-5187: 通过可租赁的使用权扩展 EIP-1155 [DRAFT]," Ethereum Improvement Proposals, no. 5187, April 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5187.