The NFT rental market Double Protocol has launched the rentable NFT standard "EIP-4907," which has been approved

GoPlusSecurity
2022-06-29 22:48:37
Collection
If you want to transfer the usage rights of the NFT to the user, the owner or the approved account can directly call setUser(), specifying the User address and the expires expiration time, and generating an UpdateUser log.

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

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.

image

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.

image

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.

image

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.

image

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".

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators