BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Interpretation of the latest Final ERC-6147: a minimalist semi-mandatory NFT property rights separation standard

十四君
特邀专栏作者
2023-03-08 07:30
This article is about 3401 words, reading the full article takes about 5 minutes
The current SBT design pays too much attention to the "non-transferable" feature proposed by Vitalik, ignoring the potential management scenarios of SBT.
AI Summary
Expand
The current SBT design pays too much attention to the "non-transferable" feature proposed by Vitalik, ignoring the potential management scenarios of SBT.

Just on 2023.3.7, the Ethereum improvement proposal EIP-6147 proposed by 10 K Universe has been moved to the final version (Final)!

This standard is an extension of ERC-721, which separates the holding and transfer rights of NFT and SBT, and defines a new"defender"Role Guard, canMake NFT anti-theft, lending, leasing, SBT, etc. more flexible

first level title

1. Background

NFT is already a common topic. With the help of the non-tamperable feature on the chain and the automatic operation of the contract itself, the confirmation and management of assets on the chain are realized. The author also starts from the standard agreement, the leasing expansion agreement, and even the NFT trading market. Several mainstream modes to write long articles with multiple articles.

If you want to demonstrate the advantages of NFT, you may be able to list a few pages, but if you want to demonstrate the disadvantages of NFT, thousands of words converge into one word: liquidity!

Of course you mayThe question is, what is the relationship between the plight of insufficient liquidity and the realization of the separation of property rights?

In the author's opinion, in fact, the dilemma of NFT liquidity is not caused by the NFT protocol itself, the non-homogeneity mechanism for IDs and the limited ID range. Even the nearly infinite ERC 20 tokens do not lack liquidity. Yet? More importantly, liquidity itself is a topic arising from the pricing appeal of financial products. How to make NFT itself have use value has become an agreement that allows value to be relied on instead of only relying on market operations.

secondary title

1.1. Coupling of property rights, high-value NFTs will tend to be safe and risk-averse

At present, there are many cases of NFT being stolen. However, existing NFT anti-theft solutions, such as transferring NFT to cold wallets, will make the use of NFT inconvenient.

And in the current NFT loan, the NFT owner needs to transfer the NFT to the NFT loan contract. The NFT owner no longer has the right to use the NFT during the loan period. This is the problem of property right coupling, which is actually different from our reality. When buying real estate and then mortgage the real estate in exchange for liquidity, the situation of not using the right to use the occupied house is very different under non-risk conditions.

What is new in my memory is that during the airdrop of monkey APE, the attacker used flash loan combined with NFTX to attack

The original event analysis can be extended reading:Can EIP-5058 prevent NFT project parties from running away with buckets?

In the whole thing, the only ones who were damaged were the users who pledged monkeys, who originally earned a negligible time spread but lost the massive airdrops of ape.

Similarly, there is also the issue of SBT coupled with property rights

For SBT, the current mainstream view is that SBT is non-transferable, which makes SBT bound to an ether address. However, when the private key of the user address is leaked or lost, retrieving SBT will become a complicated task, and there is no corresponding standard. SBT essentially realizes the separation of NFT holding rights and transfer rights. SBT should be recoverable when the wallet in which it resides is stolen or unavailable.

secondary title

1.2. Separation of property rights and division of cases, the mandatory dimension is difficult to control

text

1.2.1, simple philosophy ERC-4907, define the vision and leave the rest to the consensus

In July 2022, the rentable NFT standard "EIP-4907" submitted by the NFT rental market Double Protocol passed the final review of the Ethereum development team and became the 30th ERC standard "Final" status.

The code is extremely simple with only 72 lines. Using this standard is to add

  • 1 event (used to notify off-chain applications is called an event)

  • 3 methods (for implementing on-chain data management functions)

The principle of imputation, in fact, 4907 just adds a new data object UserInfo to increase the dimension of "user" in addition to the concept of ownership, but after all, its mandatory is limited, as long as it is transferred, the rental authorization can be forcibly terminated

Details can be read further:

1.2.2, ERC-5058 of zero trust philosophy, code is law

In essence, it manages the lock state of NFT, allowing the project party to provide the function of lock and transfer in the NFT project that inherits 5058, and can also implement more functions such as royalties in inheritance

He encapsulates and provides several methods: only after the user's permission and the project party's execution will it be completely locked

User can call

  • lockApprove (permission to lock a single NFT)

  • setLockApprovalForAll (approval locks all NFTs under this address)

Project party contract call:

  • lockFrom (lock user's NFT)

  • unlockFrom (unlocks the user's NFT)

The definition of the lock-up period is also very mandatory, almost only based on the time point at the beginning of the setting

When the project party (third party) locks NFT, it needs to specify the block height at which the lock expires, which must be greater than the current block height. After the lock expires, the NFT is automatically released and can be transferred.

The project is still in the draft stage, perhaps due to the high mandatory and the high cost of two-way operation of the user's project direction

Details can be read further:Can EIP-5058 prevent NFT project parties from running away with buckets?

first level title

2. The operation mechanism of ERC-6147

The overall code of this protocol is also very streamlined and highly reusable, which belongs to the extended standard of ERC 721, but it should be noted that if it is used, the transfer operation may be different from the logic of the conventional 721, and improper operation may be easy to be phished. How do we expand to talk about.

secondary title[Source Code Interpretation] What exactly is the NFT you bought?

2.1. What is Guard? Who can control it?

First, ERC-6147 defines a role called Guard, which is very similar to UserInfo in 4907.

And Guard only has the current owner address of the NFT and the address with withholding authority, which can be set through changeGuard,

Through the source code, we can see that there are some details when setting Guard // to prevent accidental locking, so Guard cannot be set to 0 address

After the setting is successful, anyone can use the guardInfo method to query a certain NFTID and the current Guard information. At the same time, the same timestamp-based design as 4907 is used here, so there is no need for a second on-chain transaction when it expires. Automatically lapse.

secondary title

2.2. What can Guard do?

First of all, it has the right to force the transfer. For the NFT with Guard set, when performing transferFrom, it will query whether the transaction initiator is the guard address, so that it can be transferred.

💡 Please pay special attention to 1:

For the NFT with Guard set up, the original holder will only have the right to hold, but not the right to transfer (that is, the right to use). Other Dapps can still query that the owner of this NFT is the original user, but the original user cannot drive It transfers.

Therefore, for NFTs with guards set up, the signatures on trading platforms such as opensea and x2y2 are valid (but the actual transfer cannot be performed, because when agreements such as Seaport perform transfers, the Seaport agreement performs withholding authorization)

For the operation mechanism of the trading market, you can expand your reading:

💡 Please pay special attention to 2:

If the guard transfers the NFT directly, if the original transferFrom or safeTransferFrom method is used, the settings of the guard will not be automatically cleared. Of course, it is okay if the guard transfers the NFT to himself, but if it is transferred to a user, then With the help of the guardian's settings, it can be transferred again.

Therefore, if Guard is used later, it is more necessary to check whether the transferAndRemove method is used, which will directly clear the guard information after the transfer.

Moreover, the guardian is essentially a higher control power, similar to house leasing. At the moment of mortgage, the essence already belongs to the bank, but only when the bank meets certain social conditions (such as default) will it execute Since auctions and other operations are attributes of some kind of financial collateral, it is natural to transfer the guarding right a second time using the changeGuard method.

The design principle for transferRemove is to adapt to different scenarios.

For example, in anti-theft, if the NFT is in the hot wallet and the hot wallet is stolen, the cold wallet is still safe. In fact, just transferFrom to another safe address will be fine.

Or when leasing, the guard calls transferFrom to transfer to the new leasing address, and the leasing is realized.

secondary title

2.3. What can't Guard do?

From the source code, we can see that the Guard related can only be set by the holder and the Approve authorizer when granting, but the Guard cannot be set withholding.

first level title

3. Summary

Use a sheet full of financial attributes and slightly mundane statistics to present an overview of NFT-type assets on Ethereum today.

There are more than 300,000 NFT transactions and more than 200,000 various NFT contracts every day. Such a total number shows the financial attribute value brought about by the confirmation of asset rights.

butAt any time, financial attributes need to be gradually, we can see Lens that uses NFT to confirm social relationships, we can see various Gamefi that use NFT as game assets, and we can also see Mirror that revolves around content creation with the help of spin-off crowdfunding, etc.

In the more than 8 years since the advent of Ethereum, the total number of proposals around EIP has reached 6500+,

Compared with the equally heavy 4907,6147 More optimizations that focus on compatibility

For example, 4907 is for leasing, and the role of user needs the active approval of the project. If a game does not consider the role of user, but only considers the role of owner, 4907 is not applicable. However, 6147 only needs to recognize the owner, and it doesn’t matter whether the game project and NFT itself support leasing. Most application protocols still only recognize the owner. Adapting to the trend of the times, it can gradually shine and heat up.

In addition 6147 also proposed"Manageable SBT" and "Effective SBT" conceptsLike and follow 14, bring you value from a technical perspective

Reference link:

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

https://ethereum-magicians.org/t/final-eip-6147-guard-of-nft-sbt-an-extension-of-erc-721/12052 

You are welcome to leave a message to the author from the backstage of the official account to discuss issues in the web3 industry

Like and follow 14, bring you value from a technical perspective

wallet
Safety
finance
NFT
DID
SBT
Welcome to Join Odaily Official Community