Coucou

Posted on Jul 03, 2022Read on Mirror.xyz

Why the leasable NFT ERC-4907 is so important?

After a long expectation for leasable NFT, it finally entered the stage of industrialization on June 29th. The EIP-4907 which was innovated by an NFT leasing market called Double Protocol passed the final audit executed by Ethereum, which’s compatible with ERC-721. It’s not fresh because we have seen a lot of related news. Today, this article will demonstrate and disassemble it thoroughly, and how it has been realized.

Before studying the leasable NFT, let’s talk about why NFTs need to be rented.

Firstly, from the perspective of its assets property, since as an asset, it should be able to trade, lend and mortgage so as to realize liquidity. And leasing is an important method for liquidity, especially for high-value assets.

But leasing is a special case. Trading, lending and mortgaging are the use of the financial attributes of the asset. These acts are expressing “how much it is worth”. Leasing is a splitting of use and ownership. So leasing must be an act of asset liquidity that is definancialized as splitting out the right of use and leaving the ownership.

What is the right of use that split out? It’s the utilization of assets. And what is ownership that is left? It’s the financials of assets. So leasable assets must have both financial and utility attributes so that they can be split.

It’s a good time to bring out leasable NFT. The development of NFT has experienced a brutal stage full of low-class PFP. The utility attribute of NFT is at a low proportion at this stage, more of its financial attribute. So programs to solve NFT liquidity are focused on financial behaviour such as trading, lending and mortgaging. But after experiencing the frenzy of the market, the imagination of market space gonna be dull and unattractive if we still regard the concept of NFT as a financial product. and the users have tasted the taste of failure and get learned some fundamental logic in the NFT market, so it's unavailable to continue playing the model of PFP to increase the TVL of the NFT market. So as a result, more practical and more instrumental attribute products gonna be created probably if the de-financialization of NFT.

We’ve noticed that the NFT pass card appears in our daily lives more and more frequently, empowering the NFT owners instead of FOMO. The finger-guessing game will be re-shuffled with the shaping of GameFi, so the applicability of game NFTs is an inevitable trend. For instance, the NFT combination and upgrade that can be achieved by EIP-3664 will absolutely be implemented with GameFi shaping, and I will explain EIP-3664 to you later.

In addition, the liquidity of NFT had long been a major problem, and fragmented NFT showed a while to solve the liquidity problem. The rental industry‘s presence and maturity is a way to improve the liquidity problem.

The above combines the inherent characteristics of NFT, the development trend of the industry to explain the importance of NFT, and why EIP-4907 can be recommended by Ethereum.

This is the proposal website address, and interested friends can enter to know more:

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4907.md

The core of NFT's leasing realisation, lies in the separation of its usage rights and ownership. And these roles have an expiration date, which means that the leaseholder's privileges expire automatically without any further on-chain operations.

How to implementation this function? Let’s search the code of the protocol that show up the main interfaces.

First is setUser function, this function is initiated by the NFT owner of the prospective lease approval form, and passes in three parameters NFT ID, leaseholder and expiration time. Then determine whether the current NFT is owned by the initiator, if so, then the information passed in those three leaseholders will be written.

Then userOf function is used to query the leaseholder of a particular NFT. Pass in the ID to retrieve, and determine whether it is expired, if it exists and has not expired, then return the address of current NFT leaseholder, otherwise return the empty address.

userExpires is a separate function used to get the expiration time of a particular NFT leaseholder, the one above is to get the NFT leaseholder, and one below is to get the expiration time of the leaseholder.

The ERC-4907 also overrides the _beforeTokenTransfer function. _beforeTokenTransfer function exists in ERC-721, it will be called before the NFT transfer and is empty by default, the subcontract can override it and can be interpreted as a pre-operation of the NFT transfer. We will see that it adds a judgment here, first check whether from the holder and to be transferred between the same person, and then check whether the current NFT exists leasers, if there is a leaser, then the leaser will be removed.

In fact, I didn’t understand the intent of this logic. That is, I rented the NFT to Tom, and I transferred it to Dick before it expired. Tom rented the NFT properly but suddenly it was gone. That doesn’t make sense.

After looking at the sample code, it will be found that EIP-4907 is very restrained, and the interface is very serious, it only adds the above several bare interfaces, and simply implements the two roles and expiration time and other very basic capabilities, without adding any business logic in the upper-layer application.

There are some judgments that are more necessary, for example, the NFT can be transferred to someone else to deprive the lessee of its rights, and that is still not available out-of-the-box in terms of its use, cause it is heavily dependent on the upper-layer application for its access.

For example, the two roles of owner and user, the owner is native, the user is newly defined. So if there is a community that needs to hold NFT to enter, the normal way is to check whether the current user is the owner of the NFT, even if you rent NFT to become a user, it is useless. It needs this product specifically for a new function to determine whether the current user for the user, the developer should also solve the problems, as protocol needs to balance the scalability and applicability, so it’s necessary for turning their capability to the fundamental interface strictly, which could larger more space for upper-layer applications to imagine. therefore we all anticipate there are more practical scenarios to be created for the development of the NFT field.


Original link:

https://mp.weixin.qq.com/s/nxXw8W9t3Ri01CO4G8SX9g


Translation:@Diamond @Diane @Maxwell @Evelyn

Proofreading: @Diamond

Layout:@Coucou


https://linktr.ee/buidlerdao

https://tally.so/r/wA7LlN

NFT