Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP-5585: EIP-721 NFT Authorization #5585

Merged
merged 23 commits into from
Oct 19, 2022
Merged
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ee736ef
NFT authorization - ERC721 extension
VeegaLabsOfficial Sep 3, 2022
fce56eb
Update and rename eip-4966.md to eip-5585.md
Pandapip1 Sep 3, 2022
ce382b5
Update eip-5585.md
VeegaLabsOfficial Sep 6, 2022
40a6f27
Update eip-5585.md
VeegaLabsOfficial Sep 6, 2022
bfea70a
Update eip-5585.md
VeegaLabsOfficial Sep 6, 2022
9a93e10
Update eip-5585.md
VeegaLabsOfficial Sep 6, 2022
1e5e364
Merge branch 'master' into VeegaLabsOfficial-patch-7
VeegaLabsOfficial Sep 7, 2022
8e47a9a
+ Change CRLF to LF
VeegaLabsOfficial Sep 7, 2022
e813678
Update EIPS/eip-5585.md
Pandapip1 Sep 8, 2022
4358c72
Update EIPS/eip-5585.md
Pandapip1 Sep 8, 2022
0543ec3
Update the author and discussion info
VeegaLabsOfficial Sep 8, 2022
a6983ce
Update the abstract info
VeegaLabsOfficial Sep 8, 2022
decd400
Delete the information
VeegaLabsOfficial Sep 8, 2022
22e277d
Updated the description of this EIP
VeegaLabsOfficial Sep 9, 2022
d4768f5
Update contract interfaces and EIP-5585 content
VeegaLabsOfficial Sep 14, 2022
07e0e52
Update based on reviewer's suggestions
VeegaLabsOfficial Sep 14, 2022
5508587
Update some descriptions of this EIP.
VeegaLabsOfficial Sep 14, 2022
2af15d2
Update the sequences of the contract interfaces
VeegaLabsOfficial Sep 14, 2022
c1b593b
Update some Typos
VeegaLabsOfficial Sep 14, 2022
3080ff6
Update the EIP-721 reference Link
VeegaLabsOfficial Sep 18, 2022
b6ed341
Update based on the reviewer's suggestions
VeegaLabsOfficial Oct 5, 2022
54d914e
Update the author info
VeegaLabsOfficial Oct 5, 2022
f404f08
Update the author info
VeegaLabsOfficial Oct 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions EIPS/eip-5585.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
eip: 5585
title: EIP-721 NFT Authorization
description: NFT owners can authorize other users to use their NFTs for business purpose.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: NFT owners can authorize other users to use their NFTs for business purpose.
description: Allows NFT owners to authorize other users to use their NFTs

author: Veega Labs (@VeegaLabsOfficial)
discussions-to: https://ethereum-magicians.org/t/nft-authorization-erc721-extension/10661
status: Draft
type: Standards Track
category: ERC
created: 2022-08-15
requires: 721
---

## Abstract

1. By registering and confirming ownership and other commercial rights independently on the chain, it supports the independent circulation of commercial authorization. Thereby the users will get more benefits in addition to selling, and it will significantly motivate users in various ways.
2. After separating the ownership of assets and other commercial rights, the information of full authorization chain will be saved by smart contracts, and the benefits of commercial users will be protected by smart contracts on the blockchain, and would not be affected by the changes of ownership.
3. The cryptocurrency paid by the users will be hosted and locked in the smart contract, and the "authorized funds" will be dynamically unlocked to asset owners based on how long the assets being used. (this feature will be implemented in the future)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a paragraph, not a list. It should also describe a high-level overview of the solution described in the spec.


## Motivation

The development of NFT has simplified the ownership verification and transaction. However, other kinds of rights except ownership such as exhibition rights, lease rights, creation of derivatives etc. are still difficult to be circulated and used independently, which have limited the value and commercialization of digital assets.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The development of NFT has simplified the ownership verification and transaction. However, other kinds of rights except ownership such as exhibition rights, lease rights, creation of derivatives etc. are still difficult to be circulated and used independently, which have limited the value and commercialization of digital assets.
The NFTs have simplified ownership verification and transfer. However, other kinds of rights other than ownership, such as exhibition rights, lease rights, or derivation rights are still difficult to grant, which has limited the value and commercialization of digital assets.


As the development of the Metaverse, digital assets are diverse on the blockchain such as digital collections, virtual real estate, and commercial copyrights etc., the commercial rights (exhibition rights, derivative rights, commercial authorization, etc.) based on digital assets are becoming a potential business form.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As the development of the Metaverse, digital assets are diverse on the blockchain such as digital collections, virtual real estate, and commercial copyrights etc., the commercial rights (exhibition rights, derivative rights, commercial authorization, etc.) based on digital assets are becoming a potential business form.
With the development of the Metaverse, digital assets are becoming more diverse, with new use cases such as digital collections, virtual real estate, and commercial copyrights. Meanwhile, commercial rights (exhibition rights, derivative rights, commercial authorization, etc...) based on digital assets are becoming a potential business form.


After separating the ownership of assets and other commercial rights, other problems will be raised. For example, when the ownership changes, at the same time the commercial authorization is still valid, it will result the conflict interest between the new owner and the commercial authorization user. It is extremely important thing how to protect the interests of both parties.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After separating the ownership of assets and other commercial rights, other problems will be raised. For example, when the ownership changes, at the same time the commercial authorization is still valid, it will result the conflict interest between the new owner and the commercial authorization user. It is extremely important thing how to protect the interests of both parties.
After separating the ownership of assets and other commercial rights, other problems will likely occur. For example, when ownership changes, the commercial authorization remains valid. This might, for example, result in a conflict of interest between the new owner and the commercial authorization user. It is an extremely important thing to protect the interests of both parties.

This should probably actually be in the security considerations section


## Specification

Pandapip1 marked this conversation as resolved.
Show resolved Hide resolved
```solidity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a valid solidity interface, and the indentation is off. Please fix this.

struct UserRecord {
address user;
uint expires
}

// The total users of every single NFT can be authorized to set by creators
uint256 userLimit = 5;

//The starting time of staking
mapping(uint256 => uint) timeOfStaking;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation should not be standardized. The only thing that the spec should contain for this EIP is a list of external functions, a list of events, and the struct - everything in a solidity interface, but no more.


//if resetAllowed == false£¬the authorization can be revoked; otherwise, it cannot be revoked.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what happened here - is the euro and the logical not meant to be here?

bool resetAllowed = false;

// Mapping tokenID to user amount
mapping(uint256 => uint256) private _userAmount;

//Store the authorized users and their expire time
mappint(uint256 => mapping (uint => UserRecord)) expires;

//Store the index of users authorization
mappint(uint256 => mapping (address => uint)) _userTokensIndex;

//NFT creators can set the starting time of the staking
function stakingTimeUpdate(address[] user, uint[] stakingTime) external;

//Update userLimit and resetAllowed
function userLimitAndresetAllowedUpdate(uint256 limit, bool allowed) external onlyOwner;

/**
* @dev Authorize the usage of the token(the owner or approver).
* @param tokenId The token ID.
* @param user The address that should use the token.
* @param duration Durations in seconds for the authorization.
*/

// NFT Owner authorize NFT to users.
function userAuthorization(uint256 tokenId, address user, uint duration) external returns(uint)

// NFT Owner extends the duration of authorization
function durationUpdate(uint256 tokenId, address user, uint duration) external returns(uint)

// Get the times of expired for one specific tokenId and user.
function userExpiresTime(uint256 tokenId, address user) external view returns(uint)

// Check if the token is available for authorization.
function authorizationAvailabilityCheck (uint256 tokenId) public view returns(bool)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not descriptive enough. Describe what each parameter does and what the return value is.


/**
@dev Reset the user registration record of the tokenId, if you own the tokenId.
*/

//Clear authorization records
function resetUser(uint256 tokenId, address user) external;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here - describe all the parameters.


event userAuthorization(uint256 indexed tokenID, address indexed user, uint expires);

event userAuthorizationUpdate(uint256 indexed id, uint expires);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Describe all the parameters and when this is emitted.

```

## Rationale
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the grammar issues with this section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a problem, thanks.


By separating every single NFT's ownership and user rights to maximize its utilities and therefore enhance its commercial value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular line reads like motiavation. Please rephrase it or remove it.


First of all, NFT Creator can set the maximum number of authorized users of each NFT, the authorization period and whether the NFT holder can cancel the authorization at any time, so as to define the NFT¡¯s fundamental authorization and protect interests of all roles according to the project.

Secondly, this EIP combines staking and authorization then the NFT creator can set the number of users that the NFT owner can authorize according to the staking period of time of each NFT. For example, if a NFT owner stakes his NFT for one year, he can obtain the maximum number of authorized users specified by userLimited. If he stakes his NFT for half a year, he can only authorize 2 or 3 users, so as to avoid the hype of NFT to a certain extent and maximize every single NFT¡¯s value.

In addition, this design can be seamlessly integrated with third parties. (1) It is completely based on [EIP-721](./eip-721.md) extensions, developers can easily use all interfaces based on existing code (2) other projects can directly interact with these interfaces and functions to implement their own types of transactions. For example, Lavender Bear's announcement platform can use this agreement to allow all its NFT holders to authorize their partners and also allow them to activate or terminate the authorization at any time to better manage partners.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
First of all, NFT Creator can set the maximum number of authorized users of each NFT, the authorization period and whether the NFT holder can cancel the authorization at any time, so as to define the NFT¡¯s fundamental authorization and protect interests of all roles according to the project.
Secondly, this EIP combines staking and authorization then the NFT creator can set the number of users that the NFT owner can authorize according to the staking period of time of each NFT. For example, if a NFT owner stakes his NFT for one year, he can obtain the maximum number of authorized users specified by userLimited. If he stakes his NFT for half a year, he can only authorize 2 or 3 users, so as to avoid the hype of NFT to a certain extent and maximize every single NFT¡¯s value.
In addition, this design can be seamlessly integrated with third parties. (1) It is completely based on [EIP-721](./eip-721.md) extensions, developers can easily use all interfaces based on existing code (2) other projects can directly interact with these interfaces and functions to implement their own types of transactions. For example, Lavender Bear's announcement platform can use this agreement to allow all its NFT holders to authorize their partners and also allow them to activate or terminate the authorization at any time to better manage partners.
- NFT Creators can set the maximum number of authorized users of each NFT, the authorization period, and whether the NFT holder can cancel the authorization at any time to define the NFT's authorization properties and protect the interests of the parties involved.
Secondly, this EIP combines staking and authorization so that NFT owners can only assign limited authorizations for any given NFT for a given staking period. This protects all parties from overhype and to ensure that an NFT's price more accurately matches its utility.
In addition, this design can be seamlessly integrated with third parties. It is an extension of [EIP-721](./eip-721.md), so it can be integrated into new NFT projects. 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 its NFT owners to authorize partners and terminate the authorization at any time.

Fix grammar.


## Backwards Compatibility

This standard will be completely EIP-721 compatible by adding an extension function set. All the interfaces and functions are easy for developer to understand and adopted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This standard will be completely EIP-721 compatible by adding an extension function set. All the interfaces and functions are easy for developer to understand and adopted.
This standard is compatible with EIP-721 since it is an extension of it.


## Security Considerations

There is a flag to control the rights between the owner and the user. The owner can cancel the authorization at anytime if the flag is true, and can NOT cancel the authorization when it comes to false.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads like rationale to me, not like security considerations.


## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).