Title: _Final__ERC_5585__ERC_721_NFT_Authorization
Category: ERCs

Author: VeegaLabsOfficial
Date: 2022-09-04T01:48:15.480Z

Abstract
This EIP(EIP-5585) separates the ERC-721 NFT’s commercial usage rights from it’s ownership to allow for the independent management of those rights.
Motivation
Most NFTs have a simplified ownership verification mechanism, with a sole owner of an NFT. Under this model, other rights, such as display, or creating derivative works or distribution, are not possible to grant, limiting the value and commercialization of NFTs. Therefore, the separation of an NFT’s ownership and user rights can enhance its commercial value.
Commercial right is a broad concept based on the copyright, including the rights of copy, display, distribution, renting, commercial use, modify, reproduce and sublicense etc.  With the development of the Metaverse, NFTs are becoming more diverse, with new use cases such as digital collections, virtual real estate, music, art, social media, and digital asset of all kinds. The copyright and authorization based on NFTs are becoming a potential business form.
Specification
The keywords “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.
Contract Interface
interface IERC5585 {

    struct UserRecord {
        address user;
        string[] rights;
        uint256 expires
    }

    /// @notice Get all available rights of this NFT project
    /// @return All the rights that can be authorized to the user
    function getRights() external view returns(string[]);

    /// @notice NFT holder authorizes all the rights of the NFT to a user for a specified period of time
    /// @dev The zero address indicates there is no user
    /// @param tokenId The NFT which is authorized
    /// @param user The user to whom the NFT is authorized
    /// @param duration The period of time the authorization lasts
    function authorizeUser(uint256 tokenId, address user, uint duration) external;

    /// @notice NFT holder authorizes specific rights to a user for a specified period of time
    /// @dev The zero address indicates there is no user. It will throw exception when the rights are not defined by this NFT project
    /// @param tokenId The NFT which is authorized
    /// @param user The user to whom the NFT is authorized
    /// @param rights Rights autorised to the user, such as renting, distribution or display etc
    /// @param duration The period of time the authorization lasts
    function authorizeUser(uint256 tokenId, address user, string[] rights, uint duration) external;

    /// @notice The user of the NFT transfers his rights to the new user
    /// @dev The zero address indicates there is no user
    /// @param tokenId The rights of this NFT is transferred to the new user
    /// @param newUser The new user
    function transferUserRights(uint256 tokenId, address newUser) external;

    /// @notice NFT holder extends the duration of authorization
    /// @dev The zero address indicates there is no user. It will throw exception when the rights are not defined by this NFT project
    /// @param tokenId The NFT which has been authorized
    /// @param user The user to whom the NFT has been authorized
    /// @param duration The new duration of the authorization
    function extendDuration(uint256 tokenId, address user, uint duration) external;

    /// @notice NFT holder updates the rights of authorization
    /// @dev The zero address indicates there is no user
    /// @param tokenId The NFT which has been authorized
    /// @param user The user to whom the NFT has been authorized
    /// @param rights New rights autorised to the user
    function updateUserRights(uint256 tokenId, address user, string[] rights) external;

    /// @notice Get the authorization expired time of the specified NFT and user
    /// @dev The zero address indicates there is no user
    /// @param tokenId The NFT to get the user expires for
    /// @param user The user who has been authorized
    /// @return The authorization expired time
    function getExpires(uint256 tokenId, address user) external view returns(uint);

    /// @notice Get the rights of the specified NFT and user
    /// @dev The zero address indicates there is no user
    /// @param tokenId The NFT to get the rights
    /// @param user The user who has been authorized
    /// @return The rights has been authorized
    function getUserRights(uint256 tokenId, address user) external view returns(string[]);

    /// @notice The contract owner can update the number of users that can be authorized per NFT
    /// @param userLimit The number of users set by operators only
    function updateUserLimit(unit256 userLimit) external onlyOwner;

    /// @notice resetAllowed flag can be updated by contract owner to control whether the authorization can be revoked or not 
    /// @param resetAllowed It is the boolean flag
    function updateResetAllowed(bool resetAllowed) external onlyOwner;

    /// @notice Check if the token is available for authorization
    /// @dev Throws if tokenId is not a valid NFT
    /// @param tokenId The NFT to be checked the availability
    /// @return true or false whether the NFT is available for authorization or not
    function checkAuthorizationAvailability(uint256 tokenId) public view returns(bool);

    /// @notice Clear authorization of a specified user
    /// @dev The zero address indicates there is no user. The function  works when resetAllowed is true and it will throw exception when false  
    /// @param tokenId The NFT on which the authorization based
    /// @param user The user whose authorization will be cleared
    function resetUser(uint256 tokenId, address user) external;


    /// @notice Emitted when the user of a NFT is changed or the authorization expires time is updated
    /// param tokenId The NFT on which the authorization based
    /// param indexed user The user to whom the NFT authorized
    /// @param rights Rights autorised to the user
    /// param expires The expires time of the authorization
    event authorizeUser(uint256 indexed tokenId, address indexed user, string[] rights, uint expires);

    /// @notice Emitted when the number of users that can be authorized per NFT is updated
    /// @param userLimit The number of users set by operators only
    event updateUserLimit(unit256 userLimit);
}

The getRights() function MAY be implemented as pure and view.
The authorizeUser(uint256 tokenId, address user, uint duration) function MAY be implemented as public or external.
The authorizeUser(uint256 tokenId, address user, string[] rights; uint duration) function MAY be implemented as public or external.
The transferUserRights(uint256 tokenId, address newUser) function MAY be implemented as public or external.
The extendDuration(uint256 tokenId, address user, uint duration) function MAY be implemented as public or external.
The updateUserRights(uint256 tokenId, address user, string[] rights) function MAY be implemented as public or external.
The getExpires(uint256 tokenId, address user) function MAY be implemented as pure or view.
The getUserRights(uint256 tokenId, address user) function MAY be implemented as pure and view.
The updateUserLimit(unit256 userLimit) function MAY be implemented aspublic or external.
The updateResetAllowed(bool resetAllowed) function MAY be implemented as public or external.
The checkAuthorizationAvailability(uint256 tokenId) function MAY be implemented as pure or view.
The resetUser(uint256 tokenId, address user) function MAY be implemented as public or external.
The authorizeUser event MUST be emitted when the user of a NFT is changed or the authorization expires time is updated.
The updateUserLimit event MUST be emitted when the number of users that can be authorized per NFT is updated.
Rationale
First of all, NFT contract owner can set the maximum number of authorized users to each NFT and whether the NFT owner can cancel the authorization at any time to protect the interests of the parties involved.
Secondly, there is a resetAllowed flag to control the rights between the NFT owner and the users for the contract owner. If the flag is set to true, then the NFT owner can disable usage rights of all authorized users at any time.
Thirdly, the rights within the user record struct is used to store what rights has been authorized to a user by the NFT owner, in other words, the NFT owner can authorize a user with specific rights and update it when necessary.
Finally, this design can be seamlessly integrated with third parties. It is an extension of ERC-721, therefore it can be easily integrated into a new NFT project. Other projects can directly interact with these interfaces and functions to implement their own types of transactions. For example, an announcement platform could use this EIP to allow all NFT owners to make authorization or deauthorization at any time.
Backwards Compatibility
This standard is compatible with ERC-721 since it is an extension of it.
Security Considerations
When the resetAllowed flag is false, which means the authorization can not be revoked by NFT owner during the period of authorization, users of the EIP need to make sure the authorization fee can be fairly assigned if the NFT was sold to a new holder.
Here is a solution for taking reference: the authorization fee paid by the users can be held in an escrow contract for a period of time depending on the duration of the authorization. For example, if the authorization duration is 12 months and the fee in total is 10 ETH, then if the NFT is transferred after 3 months, then only 2.5 ETH would be sent and the remaining 7.5 ETH would be refunded.
Copyright
Copyright and related rights waived via CC0.

Author: travelnotes
Date: 2022-09-09T05:20:24.005Z

It will be great if  some blue-chip NFTs could support this function, then the holders can utilize this feature to maximize the value of their NFTs without selling them.

Author: tigerspace
Date: 2022-09-09T06:52:59.945Z

This proposal is meaningful.It will allow every holder to become an amplifier of the NFT brand，and that will allow the NFT to make a new paradigm exploration in commercialization.

Author: apan826
Date: 2022-09-14T12:27:23.575Z

Hopefully this extension could inspire a proliferation of authorized projects and contribute to the NFT world with more fair and creativity.

Author: VeegaLabsOfficial
Date: 2022-10-27T08:44:43.558Z

We introduce the “rights” attribute in the UserRecord struct， which is used to store what rights has been authorized to a user by the NFT owner, in other words, the NFT owner can authorize a user with specific rights and update it when necessary.

Author: yus
Date: 2022-10-28T02:24:53.794Z

This protocol is useful, it maximizes the benefits to the NFT owner and makes the NFT project more popular.

Author: yus
Date: 2022-10-28T03:37:47.831Z

I have a question about the new attribute “rights”, and how to define and use it？

Author: JamesW
Date: 2022-10-28T12:15:58.715Z

Hey guys, I’m interested in this, if we want to make this protocol work in offline application scenarios as well, how do we solve the problem of inconsistent information between online and offline

Author: VeegaLabsOfficial
Date: 2022-10-30T11:02:54.610Z

Hi, @JamesW, thanks for your question. So basically, the smart contact will assign an authorization to the address of authorized user. The user can verify his rights in both online and offline. But if someone misuses a NFT, we have to rely on the law offline.

Author: VeegaLabsOfficial
Date: 2022-10-30T11:20:41.969Z

Hi, @yus Thanks for your question. Currently, the rights are defined and used by NFT contract owner and it will be more supplemented with the development of this protocol. Since the regulation of copyright is vary in different countries, we are referring a set of NFT licenses created by a16z to make an implementation and hopefully figuring out a standard in the future, it is also very welcomed that if you have some good ideas.

Author: CHANCE
Date: 2022-11-01T01:44:34.302Z

I love seeing this type of discussion growing in the ecosystem. I have several questions, though.
As it stands, this EIP does not provide legally binding separation of the ownership classes and is, at most, a measure of signaling that only adds cost overhead.
Today, one can already achieve highly granular on-chain usage permissions with the help of something like Delegatable ETH.
Typically, an EIP does not provide use-case nuances, and implementation details as an EIP define an interface, not the following implementation.
With the large amount of opinion that has been included with things such as duration and rights[], this EIP will be unusable on anything that isn’t an L2 the second any individual wants to write more than a sentence into the array. The chain is not a database and storing strings as if it is, is incredibly bad practice and reflective that this EIP is far from adoptable.
This continues with functions such as updateUserLimit, updateResetAllowed, resetUser are not vital to the functioning of the EIP and, again, are an implementation detail that should not be standardized (especially given the lack of detail put into a clearly defined interface) This is again reaffirmed by the lack of events defined and only functions.


For such a complex situation, a standard must be better defined than 5585. Is there a reason that the traditional way of building an EIP has been forgone in preference of the proposal here today?


What about the needs from 5585, make one incapable of using a far more powerful and better-defined standard to achieve the same results such as EIP-4337


A legally binding contract is defined (generally) by the existence of an offer, consideration, and acceptance (while maintaining competency). That cannot be done on the blockchain, especially not with this EIP. Is the aim of this EIP to enable signaling rather than an agreement that is legally binding?

Author: bet3lgeuse
Date: 2022-11-02T13:32:15.867Z

A legally binding contract is defined (generally) by the existence of an offer, consideration, and acceptance (while maintaining competency). That cannot be done on the blockchain, especially not with this EIP. Is the aim of this EIP to enable signaling rather than an agreement that is legally binding?

Agree that this EIP is pretty short on modeling a legally binding contract. But it’s not necessarily true that it couldn’t be done. I believe the UK (including commonwealth territories such as the BVI, where a lot of projects are registered) and the State of New York both have cleared on-chain records as legal contracts. There are a number of companies in Singapore that make the assumption that on-chain contracts are valid, assuming they cover the legal properties for defining a contract as you’ve stated.
There is a considerable number of abandoned projects that have attempted to implement Ricardian contracts and the list of prior literature is somewhat long.
https://iang.org/papers/intersection_ricardian_smart.html
For the OP, if you haven’t already, spending some time to read up on Monax and check out Hyperledger Burrow, it would be time well spent. Burrow is EVM compatible framework for implementing legal contracts. I’m still not quite sure why more EIPs haven’t borrowed from the ideas there, but copyright might be a good place to start.

Author: VeegaLabsOfficial
Date: 2022-11-06T21:44:52.549Z

Hi, @CHANCE , very appreciate for your suggestions, here are our ideas for discussion.
First of all, 5585 is an application layer protocol rather than a pure technical protocol. Our starting point for this protocol are: (1) What problems need to be solved in the next stage of the development of the NFT market? (2) What factors influence the promotion of commercialization and applications? And these are also the problems we are facing in our projects now.
A conclusion from our extensive communication with NFT enthusiasts, operators, commercial customers and lawyers in the copyright field in North America and Asia is that it is necessary to be able to use NFTs more simply, conveniently, openly and transparently, and at the same time, to be able to clarify and protect the rights of users. The current standard is designed and considered based on these recommendations and optimized to the greatest extent possible.
Secondly, there are many excellent NFTs in the market now, such as BAYC, Azuki, Doodle, etc. These NFT projects have authorized some of the rights of NFT to the owners, and binds relevant rights based on the ownership on-chain. Recently a16z has also launched a series of on-chain NFT license agreements to provide a set of standardized NFT rights, and these are the basis for us to make the rights of NFT owners and users more transparent. We believe that with the development of the industry, a set of standards for NFT rights will be formed, which can play a greater value to the market. Now we are cooperating with some global lawyer teams and commercial companies to promote the development in this area. We can provide NFT operators with the ability to choose rights and specifications that are more suitable for them. And we also welcome growing numbers of people to participate and contribute together. We believe it will facilitate the future development of the NFT industry.
BAYC Terms & Conditions: BAYC
Thirdly, regarding the standard of application, how to encourage NFT operators willing to participate but with the lowest cost, we provide some interfaces for them to manage rights. At the beginning, we suggest that the easiest way of using rights is just set it to ALL, which means all the rights of owner will be authorized to users. With the wider adoption of the a16z protocol and the specification of industry development, rights will have a set of standards, which can support NFT owners to manage their rights more flexibly to maximize benefits.
a16z’s copyright agreement : The Can’t Be Evil NFT Licenses - a16z crypto
Finally, regarding your ideas and technical suggestions, we have considered during our EIP design, some of them are absolutely correct and helpful, we are just trying to find a balance between technology and business, because the commercialization of NFT needs a whole picture to be implemented. So 5585 is still under continuous improvement. We hope that more experts in the field of technology, law, business and NFT enthusiasts can participate, so as to promote the development and extention of 5585 to support the NFT market. We believe it will play a broader role in the combination of on-chain and off-chain, on-chain games and Metaverse. At the same time, it can be compatible with the copyright related laws of various countries to better protect the rights of users.

Author: travelnotes
Date: 2022-11-07T12:59:48.823Z

I agree that the rights of copyright law are easy to standardized and implemented with smart contract, it is a good entry point to practice “CODE IS LAW”.

Author: travelnotes
Date: 2022-11-08T01:35:00.443Z

5585 should provide a getRightsOfferings interface to the user, who can query the rights available for the NFT specified and apply for authorization.

Author: apan826
Date: 2022-11-09T21:57:51.432Z

We are doing some projects which are on-chain contracts and it was also mentioned in the Web3 officail announcement in HK just a couple of days before. Although it cannot be 100% implementated, seems it is growing, that is good. By the way, why @bet3lgeuse you suggest to use Burrow?

Author: VeegaLabsOfficial
Date: 2022-11-30T14:10:10.718Z

It sounds good, thanks. We will introduce an interface for the user to query the available rights.

Author: travelnotes
Date: 2022-12-01T12:16:37.792Z

It’s great, so the user could call this function to get the available rights.
Recently, the owners of the CryptoPunks finally received a new license granting them commercial IP rights and they can authorize them to other users, it seems 5585 could help them manage their rights.

Author: ngveega
Date: 2022-12-04T03:24:12.772Z

Thank you so much for sharing us with this valuable information. I highlight the rights that were granted to the NFT owner.
Liscense of Cryptopunks:
Subject to your acceptance of, and compliance with, these Terms, uponlawfully acquiring Your CryptoPunk NFT and, for so long as you hold Your CryptoPunk NFT (both dates as recorded by the CryptoPunks Smart Contract) (the “License Term”),Yuga Labs grants to you an exclusive, universe-wide, royalty-free, sublicensable license to reproduce, distribute, prepare derivative works based upon, publicly display, publicly perform, transmit, and otherwise use and exploit, Your CryptoPunk Art (“License”). TheLicense is intended to be broad, enabling you to make both commercial and non-commercial uses of Your CryptoPunk Art, in any and all media, whether exis2ng now orinvented later, subject only to the restric2ons set forth below.

Author: apan826
Date: 2022-12-05T11:38:39.142Z

It seems some guys wonder the reason of getting all rights. So the rights are initialized by the NFT project owner (contract owner as well) and it contains all the rights that owners will have for each NFT, it is just like a whole set that can be retrieved by everyone.

Author: Grant
Date: 2022-12-14T11:23:18.728Z

I am just wandering why the user needs to know the rights of NFT owners? Is it for the user to know what rights the owner can authorize to him? But if the owner does not have such a right, he cannot make it anyway, is that correct?

Author: apan826
Date: 2022-12-25T04:06:34.481Z

Yes, you said it. Everyone may need to know all the rights of a NFT in real commercial situations. And the owner of NFT cannot authorize a user with a non-existing right, that is for sure.

Author: ngveega
Date: 2023-02-07T07:36:22.303Z

According the feedback of our community, we consider to remove the STAKING related interface, which should be introduced  by the business layer and keep our protocol simple.
Any suggestions would be welcome!

Author: VeegaLabsOfficial
Date: 2023-02-25T02:50:26.864Z

Thanks for the feedback and suggestions of our community, the EIP-5585 has moved to review. We wish more people could join us to improve it.

Author: travelnotes
Date: 2023-03-01T11:16:29.543Z

Sounds good, staking function should be introduced by the up layer,  which determines whether the authorization is revocable.

Author: 0xlin
Date: 2023-05-16T14:40:50.200Z

This protocol is useful, and i specifically wrote an introduction to eip-5585


mirror.xyz



基于EIP聊聊未来NFT会怎么发展
在2021年至2022年间，大部分早期信仰 NFT 会有大规模应用的用户已享受到 NFT 爆发的行业红利，但事实上，NFT依然还处于非常早期的阶段。尽管此刻我们正处于NFT的低潮期，但NFT 基础设施项目依然在有条不紊的发展壮大，我认为其中一个不可忽略的原因则是离不开以太坊底层协议的良好设计。

Author: VeegaLabsOfficial
Date: 2023-07-12T03:43:56.732Z

We introduced a new interface “transferUserRights()”, which allows users to transfer his rights to other users.

Author: VeegaLabsOfficial
Date: 2023-09-14T08:51:08.545Z

Our proposal  come to the last call phase, we are looking forward to seeking input from the community.

Author: VeegaLabsOfficial
Date: 2023-09-27T04:39:22.551Z

The a16z Investment Story Protocol indicates the immense future value of web3 IP.

Author: VeegaLabsOfficial
Date: 2023-10-10T08:10:08.453Z

We would like to express our sincere gratitude to our friends in the Japanese community for their kind assistance in translating.


Qiita



[ERC5585] NFTに紐づくさまざまな権利を管理する仕組みを理解しよう！ - Qiita
はじめに初めまして。CryptoGamesというブロックチェーンゲーム企業でエンジニアをしている cardene（かるでね） です！スマートコントラクトを書いたり、フロントエンド・バックエンド…

Author: VeegaLabsOfficial
Date: 2024-02-08T03:21:57.581Z

Thanks to everyone from our community. Today, 5585 has become a member of the ERC standards. This is just the beginning, and I hope we can work together to unleash its potential.

Author: kladkogex
Date: 2024-02-12T15:55:48.799Z

Isnt it against the nature of opensource to support copyright which is a 19 century concept ?
If people who love copyright want to have a standard, there are many ways fr them to do it.  Why EIP?