Extend EIP-1155 with rentable usage rights
相关视频
正文
Abstract
This standard is an extension of EIP-1155. It proposes to introduce separable, rentable, and transferable usage rights (in the form of NFT-IDs), enabling the property owner (the only NFT holder) to rent out the NFT to multiple users (ID holders) at the same time for different terms, and be withdrawn by smart contract upon expiration.
The property owner always retains ownership and is able to transfer the NFT to others during the lease.
The proposal also supports the sublease and renewal of the rental so that users can freely transfer the usage rights among each other and extend the lease term. Early return of NFTs can also be achieved by subletting the usage rights back to the property owners.
Motivation
The well-accepted EIP-721 and EIP-1155 standards focused on the ownership of unique assets, quite sensible in the time of NFTs being used primarily as arts and collectibles, or, you can say, as private property rights.
First Step: "Expirable" NFTs
The advent of private ownership in the real world has promoted the vigorous development of the modern economy, and we believe that the usage right will be the first detachable right widely applied in the blockchain ecosystem. As NFTs are increasingly applied in rights, finance, games, and the Metaverse, the value of NFT is no longer simply the proof of ownership, but with limitless practice use scenarios. For example, artists may wish to rent out their artworks to media or audiences within specific periods, and game guilds may wish to rent out game items to new players to reduce their entry costs.
The lease/rental of NFTs in the crypto space is not a new topic, but the implementation of leasing has long relied on over-collateralization, centralized custody, or pure trust, which significantly limits the boom of the leasing market. Therefore, a new type of "expirable" NFTs that can be automatically withdrawn upon expiration through smart contract is proposed, at the technical level, to eliminate those bottlenecks. Based on that, a new leasing model that is decentralized, collateral-free, and operated purely "on-chain" may disrupt the way people trade and use NFTs. Thus, this EIP proposal is here to create "expirable" NFTs compatible with EIP-1155.
Then, Make Everything Transferable
The way we achieve leasing is to separate ownership and usage rights, and beyond that, we focus more on making them freely priced and traded after separation, which is impossible to happen in the traditional financial field. Imagine the below scenarios: i) as a landlord, you can sell your house in rental to others without affecting the tenancy, and your tenants will then pay rent to the new landlord; ii) as a tenant, you can sublet the house to others without the consent of the landlord, and even the one sublets can continue subletting the house until the lease term is close the last tenant can apply for a renewal of the lease. All of this can happen in the blockchain world, and that's the beauty of blockchain. Without permission, without trust, code is the law.
Making ownership and usage rights transferable may further revolutionize the game rules in NFT's field, both in capital allocation and NFT development. Buying NFT ownership is more like investing in stocks, and the price is determined by market expectations of the project; renting the usage right is less speculative, so the price is easier to determine based on supply and demand. The ownership market and the usage-right market will function to meet the needs of target participants and achieve a balance that is conducive to the long-term and stable development of NFT projects. Based on the above, we propose this EIP standard to complement the current EIP scopes and introduce those functions as new standards.
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 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; }
Rationale
Implementing the proposal to create rentable NFTs has two main benefits.
One is that NFTs with multiple usage rights allow NFT property owners to perform the safeRent function and rent out usage rights to multiple users at the same time. For each usage right leased and expires, the property owner can perform the takeBack function to retrieve the usage right.
Another benefit is that the transfer of usage rights can be quite flexible. The user can transfer the usage rights to other users by calling the Sublet function during the lease period, and can also extend the lease period of the usage rights by asking the property owner to perform the Renewal function. It is worth mentioning that if the user sublet the NFT to the property owner, it will realize the early return of NFT before the end of the lease period.
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.
Copyright
Disclaimer of copyright and related rights through CC0.