Skip to content

Commit a5a85f5

Browse files
authored
Create 0000-nft-collection-prove
This TEP proposes an extension to the existing NFT standard (TEP-62) to introduce a new operation named get_real_static_data. This operation allows verification of an NFT's collection membership.
1 parent c5bfe28 commit a5a85f5

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

text/0000-nft-collection-prove

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
**TEP**: [0](https://github.com/ton-blockchain/TEPs/pull/0) *(don't change)*
2+
3+
**Title**: Extended NFT Standard with Collection Proof
4+
5+
**Status**: Draft
6+
7+
**Type**: Contract Interface
8+
9+
**Authors**: Mahdi Bagheri
10+
11+
**Created**: 26.9.2024
12+
13+
**Extends**: [TEP-62](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md)
14+
15+
**Replaces**: -
16+
17+
**Replaced by**: -
18+
19+
# Summary
20+
This TEP proposes an extension to the existing NFT standard (TEP-62) to introduce a new operation named get_real_static_data. This operation allows verification of an NFT's collection membership.
21+
22+
# Motivation
23+
The current NFT standard lacks a mechanism for a smart contract to definitively verify that an NFT belongs to a specific collection. While get_static_data in individual NFT contracts reveals the collection address, it doesn't guarantee the NFT's authenticity within that collection.
24+
25+
This extension addresses this limitation, enabling secure verification of collection membership for various use cases, such as:
26+
27+
* Marketplaces ensuring NFTs belong to advertised collections before listing.
28+
* Games or applications verifying NFT ownership within a specific collection for access or functionality.
29+
* Decentralized exchanges (DEXs) verifying NFTs as collateral for loans or other financial operations.
30+
31+
# Problem:
32+
33+
In the current NFT standard, a smart contract cannot definitively verify if an NFT belongs to a specific collection.
34+
35+
# Solution:
36+
37+
This TEP introduces a new operation named `get_real_static_data` within the NFT standard. Here's how it works:
38+
39+
1. The requester smart contract sends a message to the individual NFT contract with the `get_real_static_data` operation.
40+
2. The individual NFT contract forwards the request message alongside requester address to the collection contract address stored internally.
41+
3. The collection contract verifies if the request originated from a valid NFT within its collection (using internal mechanisms).
42+
4. The collection contract verifies the request's origin and sends a response to the proof requester. The response includes the `query_id` from the original request, the `index` of the NFT within the collection, the `nft_address` of the NFT itself, and the `owner_address` of the NFT. The requester can verify that the NFT belongs to the specified collection by checking the `index`, `nft_address`, and `owner_address` against the collection's records.
43+
44+
# Benefits:
45+
46+
* Enables secure verification of NFT collection membership for various applications.
47+
* Improves trust and security in NFT-based ecosystems.
48+
49+
# Specification
50+
This section defines the technical details of the proposed extension.
51+
52+
### NFT Smart Contract:
53+
54+
New Internal Message `get_real_static_data` (request):
55+
56+
**should do:**
57+
58+
1. Send a message to the collection with the following layout and send-mode `64` (return msg amount except gas fees):
59+
TL-B schema: `get_real_static_data#7a250735 query_id:uint64 index:uint256 owner_address:MsgAddress`
60+
`index` - numerical index of this NFT in the collection, usually serial number of deployment.
61+
2. Collection validates NFT request and throws an error if NFT does not belong to the collection. otherwise the collection will send a message with the following layout and send-mode `64`.
62+
TL-B schema: `provide_static_data#3b65c862 query_id:uint64 index:uint256 nft_address:MsgAddress owner_address:MsgAddress`
63+
64+
### Verification of Request Origin:
65+
66+
The collection contract should implement a mechanism to verify that the get_real_static_data request originates from a valid NFT within its collection. This can be achieved using methods like `calculate_nft_address` Checking if the nft_address in the request belongs to a deployed NFT within the collection.
67+
68+
# Drawbacks
69+
There is a slight increase in message traffic compared to the basic `get_static_data` operation. However, this is a minimal trade-off for the enhanced security and verification it provides.
70+
71+
# Rationale and Alternatives
72+
This approach balances security with efficiency. Alternative methods, like relying solely on get_static_data, lack the necessary verification component.
73+
74+
# Prior Art
75+
This TEP builds upon the existing NFT standard (TEP-62) and leverages concepts from verification methods used in jetton standart.

0 commit comments

Comments
 (0)