Skip to content

Commit

Permalink
Merge pull request #1 from 5660-eth/patch-3
Browse files Browse the repository at this point in the history
Update and rename eip-erc721-marketplace-extension.md to eip-6105.md
  • Loading branch information
lambdalf-dev authored Jan 16, 2023
2 parents e0eadc4 + 5e89487 commit 27ec8ed
Showing 1 changed file with 41 additions and 17 deletions.
58 changes: 41 additions & 17 deletions EIPS/eip-erc721-marketplace-extension.md → EIPS/eip-6105.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
eip: erc721-marketplace-extension
eip: 6105
title: Marketplace extension for EIP-721
description: We propose to add a basic marketplace functionality to the EIP-721.
author: Silvere Heraudeau (@lambdalf-dev), Martin McConnell (@offgridgecko)
description: Add a basic marketplace functionality to the EIP-721.
author: Silvere Heraudeau (@lambdalf-dev), Martin McConnell (@offgridgecko), 5660-eth (@5660-eth), Abu <team10kuni@gmail.com>, Wizard Wang
discussions-to: https://ethereum-magicians.org/t/idea-a-marketplace-extension-to-erc721-standard/11975
status: Draft
type: Standards Track
category: ERC
created: 2022-12-02
requires: 721
requires: 721, 165
---

"Not your marketplace, not your royalties"

## Abstract

We propose to add a basic marketplace functionality to the [EIP-721](./eip-721.md)
to allow project creators to gain back control of the distribution of their NFTs.
Add a basic marketplace functionality to the [EIP-721](./eip-721.md)
to to realize non-fungible tokens (NFTs) trading without relying on an NFTs trading intermediary platform.

It includes:
- a method to list an item for sale or update an existing listing, whether
Expand All @@ -28,9 +28,17 @@ It includes:

## Motivation

OpenSea’s latest code snippet gives them the ability to entirely control which
platform your NFTs can (or cannot) be traded on. Our goal is to give that
control back to the project creators.
Most of the current NFTs trading rely on the NFTs trading platform acting as an intermediary, which has the following problems.

1.Security issues. For example, security issues caused by authorization through `setApprovalForAll`. The permission obtained by the NFT trading platform has carried out unnecessary risk exposure. Once there is a problem with the trading platform contract, it will bring huge losses to the entire industry.If the user has authorized the operation right of his/her NFTs to the NFT trading platform, the latest phishing website fraud method is to trick the user into signing, and let the victim place an order at a very low price on the NFTs trading platform, and designate the recipient. The scammer then accepts the deal, thereby reaping illicit benefits. Ordinary users are hard-pressed to guard against this.

2.High trading costs. On the one hand, with the increase in the number of trading platforms, the liquidity of NFTs is scattered. If a user needs to make a deal as quickly as possible, he needs to authorize and place orders on multiple platforms, which further increases the risk exposure, and each authorization needs to spend gas. Taking BAYC as an example, the total number of BAYC is 10,000, and the number of current holders exceeds 6,000. The average number of BAYC held by each holder is less than 2. Although `setApprovalForAll` saves the subsequent pending order gas expenditure of a single trading platform, due to the need to authorize to Multi-platform, in essence, leads to an increase in gas expenditures for users. On the other hand, more importantly, the trading service fee charged by the trading platform must also be listed as the cost of user trading, which is much higher than the required gas spending for authorization.

3.The aggregator provides a solution to aggregate liquidity, but whether the aggregator aggregates the liquidity of a certain trading platform, its decision is centralized. And because the order information of the trading platform is off-chain, the efficiency of the aggregator to obtain order data is affected by the frequency of the trading platform API, and sometimes the NFT trading platform will suspend the distribution of APIs and limit the frequency of APIs.

4.Whether the NFT project party’s copyright tax income is obtained depends on the centralized decision-making of the NFT trading platform. Some trading platforms ignore the interests of the project party and implement 0 copyright tax, which infringes the interests of the project party.

5.Not resistant to censorship. Some platforms have delisted many NFTs, and the formulation and implementation of delisting rules are centralized and not transparent enough. Previously, some NFT trading platforms have also failed and wrongly delisted some NFTs, which caused market panic.

## Specification

Expand All @@ -39,16 +47,11 @@ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY",
and "OPTIONAL" in this document are to be interpreted as described in RFC 2119
and RFC 8174.

Implementers of this standard **MUST** have all of the following functions:
Implementers of this standard MUST have all of the following functions:

```solidity
pragma solidity ^0.8.0;
import './IERC721.sol'
///
/// @dev Interface for the ERC721 Marketplace Extension
///
interface IERC721MarketplaceExtension {
interface IERC6105 {
///
/// @dev A structure representing a listed token
///
Expand Down Expand Up @@ -143,6 +146,22 @@ interface IERC721MarketplaceExtension {
}
```

The `listItem( uint256 tokenId, uint256 price, address to )` function MAY be implemented as `public` or `external`.

The `delistItem( uint256 tokenId )` function MAY be implemented as `public` or `external`.

The `buyItem( uint256 tokenId )` function MUST be implemented as `payable` and MAY be implemented as `public` or `external`.

The `getListing( uint256 tokenId )` function MAY be implemented as `pure` or `view`.

The `Listed` event MUST be emitted when an NFT is listed.

The `Delisted` event MUST be emitted when an NFT is delisted.

The `Purchased` event MUST be emitted when an NFT is traded.

The `supportsInterface` method MUST return `true` when called with `...`.

## Rationale

## Backwards Compatibility
Expand All @@ -156,7 +175,7 @@ pragma solidity ^0.8.0;
import './ERC721.sol';
import './ERC2981.sol';
contract Example is IERC721MarketplaceExtension, ERC721, ERC2981 {
contract Example is IERC6105, ERC721, ERC2981 {
// List of all items for sale
Listing[] private _listings;
Expand Down Expand Up @@ -312,6 +331,11 @@ contract Example is IERC721MarketplaceExtension, ERC721, ERC2981 {
return _listings[ _listingIndex[ tokenId_ ] ];
}
}
/// @dev See {IERC165-supportsInterface}.
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC6105).interfaceId || super.supportsInterface(interfaceId);
```

## Security Considerations
Expand Down

0 comments on commit 27ec8ed

Please sign in to comment.