⚠️ This EIP is not recommended for general use or implementation as it is likely to change.

EIP-5187: Extend EIP-1155 with rentable usage rights Source

Separate ownership and usage rights of EIP-1155 to allow users to use NFTs for an allotted time and return them to owners after expiration.

AuthorDerivStudio
Discussions-Tohttps://ethereum-magicians.org/t/eip-draft-extending-erc1155-with-rentable-usage-rights/9553/4
StatusDraft
TypeStandards Track
CategoryERC
Created2022-04-17
Requires 165, 1155

Abstract

This standard is an extension of EIP-1155. It proposes introducing the concept of independent, multiple, and leasable rights of use to enable NFT to be leased out for different cycles while ownership remains with the owner.

Motivation

The traditional EIP-721 and EIP-1155 focus more on ownership. However, NFTs as digital assets are more prominent in use than ownership. Taking artistic NFTs as an example, NFT artists may wish to rent out the use rights of their works to media companies for an allotted time, or NFT musicians may wish to make their music available to listeners as per playing duration. Therefore, to better serve NFT developers to meet such needs and develop more sophisticated NFT products, we propose directly introducing rentable usage rights to complement the ERC standard.

Specification

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

pragma solidity ^0.8.0;

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

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

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

    /**
     * @notice Function to take back usage rights after the end of the tenancy
     * @param user The address to rent the NFT's usage rights
     * @param 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);
}


Rationale

There are two main benefits to creating this proposal. One is to make it possible to create NFTs with detachable usage rights, of which the transfer of usage rights is separated from the transfer of ownership. The NFT owner can execute the safeRent function to lease out the usage rights to other users and the takeBack function to retrieve the usage rights after the lease expiration.

Backwards Compatibility

As mentioned at the beginning, this is an extension of EIP-1155. Therefore, it is fully backward compatible with EIP-1155.

Security Considerations

Needs discussion.

Disclaimer of copyright and related rights through CC0.

Citation

Please cite this document as:

DerivStudio, "EIP-5187: Extend EIP-1155 with rentable usage rights [DRAFT]," Ethereum Improvement Proposals, no. 5187, April 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5187.