You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This standard extends [ERC-721](./eip-721.md) to introduce a mechanism that allows minters to customize the transferability of NFTs through a parameter called `TransferCount`. `TransferCount` sets a limit on how many times an NFT can be transferred. The standard specifies an interface that includes functions for setting and retrieving transfer limits, tracking transfer counts, and defining pre- and post-transfer states. The standard enables finer control over NFT ownership and transfer rights, ensuring that NFTs can be programmed to have specific, enforceable transfer restrictions.
17
-
17
+
This standard extends [ERC-721](./eip-721.md) with a mechanism that lets token owners/minters cap how many times a specific token can be transferred. It specifies functions to set and read a per-token transfer limit, to query a per-token transfer count, and defines transfer-time hooks to enforce the cap. The goal is fine-grained, enforceable transfer restrictions while preserving ERC-721 compatibility.
18
18
19
19
## Motivation
20
20
21
-
Once NFTs are sold, they detach from their minters (creators) and can be perpetually transferred thereafter. Yet, many circumstances demand precise control over NFT issuance. We outline their advantages across three dimensions.
21
+
Once NFTs are sold, they detach from their minters and can be perpetually transferred. Yet many situations require tighter control over secondary movement.
22
22
23
-
Firstly, by imposing limitations on the frequency of NFT sales or trades, the worth of rare NFTs can be safeguarded. For example, in auctions, limiting the round of bids for a coveted item can uphold its premium price (especially in the Dutch Auction). Similarly, in the intellectual property sector, patents could be bounded by a finite number of transfers prior to becoming freely accessible (entering CC0). In the gaming sphere, items like weapons, apparel, and vehicles might possess a finite lifespan, with each usage or exchange contributing to wear and tear, culminating in automatic decommissioning (burn) upon reaching a predetermined threshold.
23
+
First, limiting the number of transfers can help preserve value (e.g., premium auctions, IP that becomes CC0 after a finite number of transfers, or game items that “wear out” and burn at a threshold).
24
24
25
-
Secondly, enforcing restrictions on trading frequency can enhance network security and stability by mitigating the risks associated with malicious NFT arbitrage, including high-frequency trading (HFT). While this presents a common vulnerability, the lack of easily deployable and effective methods to address it has been notable, making our approach particularly valuable.
25
+
Second, capping transfer frequency can reduce risks from adversarial arbitrage (e.g., HFT-like behavior) by offering an easy-to-deploy throttle.
26
26
27
-
Additionally, limiting the round of transfers can mitigate the economic risks associated with (re)staking NFTs, thereby curbing potential bubbles. With the rapid evolution of restaking mechanisms, it's foreseeable that users may soon engage in multiple rounds of NFT staking (e.g., NFT → stNFT → st^2NFT), akin to staking liquidity tokens with third-party platforms like EigenLayer (Ethereum), Babylon (Bitcoin), and Picasso (Solana). Notably, the current setup of EigenLayer employs an NFT as the restaking position (a type of proof-of-restake) for participants. Should this NFT be restaked repeatedly into the market, it could amplify leverage and exacerbate bubble dynamics. By imposing limits on the number of stake iterations, we can proactively prevent the emergence of Ponzi-like dynamics within staking ecosystems.
27
+
Third, bounding re-staking cycles of NFT positions (e.g., proof-of-restake) can dampen recursive leverage and mitigate bubble dynamics.
28
28
29
-
### Key Takeaways
30
29
31
-
This standard provides several advantages:
30
+
### Key Takeaways
32
31
33
-
*Controlled Value Preservation*: By allowing minters to set customized transfer limits for NFTs, this standard facilitates the preservation of value for digital assets Just as physical collectibles often gain or maintain value due to scarcity, limiting the number of transfers for an NFT can help ensure its continued value over time.
32
+
*Controlled Value Preservation.* Scarcity via a transfer cap can help maintain value over time.
34
33
35
-
*Ensuring Intended Usage*: Setting transfer limits can ensure that NFTs are used in ways that align with their intended purpose. For example, if an NFT represents a limited-edition digital artwork, limiting transfers can prevent it from being excessively traded and potentially devalued.
34
+
*Ensuring Intended Usage.* Limits keep usage aligned with intent (e.g., limited editions less prone to flip cycles).
36
35
37
-
*Expanding Use Cases*: These enhancements broaden the potential applications of NFTs by offering more control and flexibility to creators and owners. For instance, NFTs could be used to represent memberships or licenses with limited transferability, opening up new possibilities for digital ownership models.
36
+
*Expanding Use Cases.* Memberships/licenses with bounded transferability become practical.
38
37
39
-
*Easy Integration*: To ensure broad adoption and ease of integration, this standard extends the existing [ERC-721](./eip-721.md)interface. By defining a separate interface (`IERC7634`) that includes the new functions, the standard allows existing [ERC-721](./eip-721.md) contracts to adopt the new features with minimal changes. This approach promotes backward compatibility and encourages the seamless incorporation of transfer limits into current NFT projects.
38
+
*Easy Integration.* An extension interface(`IERC7634`) layers on top of [ERC-721](./eip-721.md), easing adoption without breaking compatibility.
40
39
41
40
## Specification
42
41
43
42
The key words “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.
44
43
45
-
-`setTransferLimit`: a function establishes the transfer limit for a tokenId.
46
-
-`transferLimitOf`: a function retrieves the transfer limit for a tokenId.
47
-
-`transferCountOf`: a function returns the current transfer count for a tokenId.
44
+
-`setTransferLimit`: establishes the transfer limit for a `tokenId`.
45
+
-`transferLimitOf`: returns the transfer limit for a `tokenId`.
46
+
-`transferCountOf`: returns the current transfer count for a `tokenId`.
48
47
49
-
Implementers of this standard **MUST** have all of the following functions:
48
+
**Counting and enforcement scope.** Implementations **MUST** enforce the cap on native ERC-721 transfers of the underlying token (i.e., transfers where `from != address(0)` and `to != address(0)`). Incrementing the count **SHOULD** occur only after a successful native transfer. Mint and burn operations MUST NOT increment the count.
49
+
50
+
Implementers **MUST** provide the following interface:
50
51
51
52
```solidity
52
53
53
54
pragma solidity ^0.8.4;
54
55
55
-
/// @title IERC7634 Interface for Limited Transferable NFT
56
-
/// @dev Interface for ERC7634 Limited Transferable NFT extension for ERC721
57
-
/// @author Saber Yu
58
-
56
+
/// @title IERC7634 Interface for Transfer-Capped ERC-721 Tokens
57
+
/// @dev ERC-7634 is an extension interface intended to be implemented alongside ERC-721
59
58
interface IERC7634 {
59
+
/**
60
+
* @dev Emitted after a successful native transfer when the per-token count increases.
* @dev Returns the current transfer count for a tokenId
70
+
* @dev Returns the current transfer count for a tokenId.
68
71
*/
69
72
function transferCountOf(uint256 tokenId) external view returns (uint256);
70
73
71
74
/**
72
-
* @dev Sets the transfer limit for a tokenId. Can only be called by the token owner or an approved address.
73
-
* @param tokenId The ID of the token for which to set the limit
74
-
* @param limit The maximum number of transfers allowed for the token
75
+
* @dev Sets the transfer limit for a tokenId. Callable by owner or approved.
76
+
* @param tokenId The token id to set the limit for.
77
+
* @param limit The maximum number of native transfers allowed.
75
78
*/
76
79
function setTransferLimit(uint256 tokenId, uint256 limit) external;
77
80
78
81
/**
79
-
* @dev Returns the transfer limit for a tokenId
82
+
* @dev Returns the transfer limit for a tokenId.
80
83
*/
81
84
function transferLimitOf(uint256 tokenId) external view returns (uint256);
82
85
}
@@ -85,18 +88,13 @@ interface IERC7634 {
85
88
86
89
## Rationale
87
90
88
-
### Does tracking the internal transfer count matter?
89
-
90
-
Yes and no. It is optional and quite depends on the actual requirements. The reference implementation given below is a recommended one if you opt for tracking. The `_incrementTransferCount` function and related retrieval functions (`transferLimitOf` and `transferCountOf`) are designed to keep track of the number of transfers an NFT has undergone. This internal tracking mechanism is crucial for enforcing the minter's transfer limits, ensuring that no further transfers can occur once the limit is reached.
91
-
92
-
### If opting for tracking, is that all we may want to track?
93
-
94
-
It is recommended to also track the before and after. The optional `_beforeTokenTransfer` and `_afterTokenTransfer` functions are overridden to define the state of the NFT before and after a transfer. These functions ensure that any necessary checks or updates are performed in line with the transfer limits and counts. By integrating these checks into the transfer process, the standard ensures that transfer limits are consistently enforced.
91
+
### Tracking and hooks
95
92
93
+
`transferCountOf` and `transferLimitOf` expose state needed to enforce a cap. The count should only increase after a successful native transfer (not on mint/burn). Separating `TransferLimitUpdated` from `TransferCountIncreased` makes it clear that the former is an administrative change while the latter is derived from runtime transfers.
96
94
97
95
## Backwards Compatibility
98
96
99
-
This standard can be fully [ERC-721](./eip-721.md) compatible by adding an extension function set.
97
+
This standard is fully compatible with [ERC-721](./eip-721.md). Existing contracts can adopt it by adding the new interface and hooks without changing ERC-721 semantics.
100
98
101
99
### Extensions
102
100
@@ -109,11 +107,7 @@ This standard can be enhanced with additional advanced functionalities alongside
109
107
110
108
## Reference Implementation
111
109
112
-
A recommended implementation is demonstrated as follows:
113
-
114
-
-`_incrementTransferCount`: an internal function facilitates incrementing the transfer count.
115
-
-`_beforeTokenTransfer`: an overrided function defines the state before transfer.
116
-
-`_afterTokenTransfe`: an overrided function outlines the state after transfer.
110
+
Below is a recommended pattern. It enforces the cap pre-transfer, increments the count post-transfer, ignores mint/burn for counting, and emits the clarified events. Implementations commonly override `_beforeTokenTransfer` to enforce `transferCount` < `transferLimit` and `_afterTokenTransfer` to increment the count and emit `TransferCountIncreased`.
@@ -213,9 +189,12 @@ contract ERC7634 is ERC721, IERC7634 {
213
189
214
190
## Security Considerations
215
191
216
-
- Ensure that each NFT minter can call this function to set transfer limits.
217
-
- Consider making transfer limits immutable once set to prevent tampering or unauthorized modifications.
218
-
- Avoid performing resource-intensive operations when integration with advanced functions that could exceed the gas limit during execution.
192
+
- Scope with wrappers. The cap applies only to native [ERC-721](./eip-721.md) transfers of the underlying token. Any owner can cheaply wrap a token and transfer a separate wrapper token; such downstream transfers cannot be prevented without breaking [ERC-721](./eip-721.md) composability. As a result, this standard does not provide an unbypassable guarantee that, for example, a game item will always wear out or that secondary trading is globally capped; it standardizes a primitive for budgeting native transfers that ecosystems may choose to coordinate around. Deployments that want stronger effective guarantees **MAY** add optional mitigations such as recipient allowlists/registries or "compliant wrapper" patterns that mirror counts/limits, trading off openness for enforcement.
193
+
194
+
- Limit mutability. Consider making limits immutable once set (or only decreasing), to prevent tampering.
195
+
196
+
- Gas. Avoid heavy logic in hooks; extensions (e.g., burn on cap) should remain gas-safe.
0 commit comments