The NFT rental market Double Protocol has launched the rentable NFT standard "EIP-4907," which has been approved
Author: GoPlus Security
The rental NFT proposal EIP-4907 has been approved, and more NFTs using ERC4907 will be launched in the future. Let's take a look at the official demo implementation.
Image from @DoubleProtocol, the initiator of 4907.
First, as an NFT, 4907 will still inherit from other NFT standards, such as ERC721, possessing all the functions and characteristics of 721, while also having its own features. The most typical is that this NFT protocol has two roles: User and Owner. The user data is also bound to a usage expiration time.
If you want to transfer the usage rights of this NFT to a user, the owner or an approved account can directly call setUser(), specifying the User address and the expiration time, generating an UpdateUser log.
Anyone can call the userOf() method to see who the User of a certain NFT is, and userExpires() to check the usage rights expiration time.
The demo also overrides the parent class 721's _beforeTokenTransfer() method, which is called when transferring the NFT owner. It first calls the parent class's function of the same name, then executes its own necessary logic. In this demo, if the transfer object is not the original Owner and there is a User currently renting, it will erase that User's usage rights and generate the corresponding UpdateUser() log.
Summary
This standard achieves the separation of NFT ownership and usage rights through a dual-role setup and introduces the automatic recovery of usage rights upon expiration. The application of the "ERC-4907" standard will greatly reduce the development and integration costs of renting Utility NFTs such as games, metaverses, and membership cards, making NFT assets more liquid. Currently, 12 projects have confirmed the application of "ERC-4907".