❗️ ERC-7409 supersedes ERC-6381. ❗️
The Public Non-Fungible Tokens Emote Repository standard provides an enhanced interactive utility for ERC-721 and ERC-1155 by allowing NFTs to be emoted at.
This proposal introduces the ability to react to NFTs using Unicode standardized emoji in a public non-gated repository smart contract that is accessible at the same address in all of the networks.
With NFTs being a widespread form of tokens in the Ethereum ecosystem and being used for a variety of use cases, it is time to standardize additional utility for them. Having the ability for anyone to interact with an NFT introduces an interactive aspect to owning an NFT and unlocks feedback-based NFT mechanics.
This ERC introduces new utilities for ERC-721 based tokens in the following areas:
This proposal fixes the compatibility issue in the ERC-6381 interface specification, where emojis are represented using bytes4 values. The introduction of variation flags and emoji skin tones has rendered the bytes4 namespace insufficient for representing all possible emojis, so the new standard used string instead. Apart from this fix, this proposal is functionally equivalent to ERC-6381.
The ability to emote on an NFT introduces the aspect of interactivity to owning an NFT. This can either reflect the admiration for the emoter (person emoting to an NFT) or can be a result of a certain action performed by the token's owner. Accumulating emotes on a token can increase its uniqueness and/or value.
Standardized on-chain reactions to NFTs allow for feedback based evolution.
Current solutions are either proprietary or off-chain and therefore subject to manipulation and distrust. Having the ability to track the interaction on-chain allows for trust and objective evaluation of a given token. Designing the tokens to evolve when certain emote thresholds are met incentivizes interaction with the token collection.
Current NFT market heavily relies on previous values the token has been sold for, the lowest price of the listed token and the scarcity data provided by the marketplace. There is no real time indication of admiration or desirability of a specific token. Having the ability for users to emote to the tokens adds the possibility of potential buyers and sellers gauging the value of the token based on the impressions the token has collected.
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.
The message to be signed by the emoter in order for the reaction to be submitted by someone else is formatted as follows:
The values passed when generating the message to be signed are:
DOMAIN_SEPARATOR - The domain separator of the Emotable repository smart contractcollection - Address of the collection containing the token being emoted attokenId - ID of the token being emotedemoji - Unicode identifier of the emojistate - Boolean value signifying whether to emote (true) or undo (false) emotedeadline - UNIX timestamp of the deadline for the signature to be submittedThe DOMAIN_SEPARATOR is generated as follows:
Each chain, that the Emotable repository smart contract is deployed on, will have a different DOMAIN_SEPARATOR value due to chain IDs being different.
The address of the Emotable repository smart contract is designed to resemble the function it serves. It starts with 0x3110735 which is the abstract representation of EMOTES. The address is:
Designing the proposal, we considered the following questions:
string value. This means that while we encourage implementers to add the reactions using standardized emojis, the values not covered by the Unicode standard can be used for custom emotes. The only drawback being that the interface displaying the reactions will have to know what kind of image to render and such additions will probably be limited to the interface or marketplace in which they were made.bytes4 or strings to represent emotes?bytes4. This was due to the assumption that all of the emojis use UTF-4 encoding, which is not the case.strings to represent the emotes. This allows the repository to be forward compatible with any future emojis that might be added to the Unicode standard.The Emote repository standard is fully compatible with ERC-721 and with the robust tooling available for implementations of ERC-721 as well as with the existing ERC-721 infrastructure.
Tests are included in emotableRepository.ts.
To run them in terminal, you can use the following commands:
The proposal does not envision handling any form of assets from the user, so the assets should not be at risk when interacting with an Emote repository.
The ability to use ECDSA signatures to emote on someone else's behalf introduces the risk of a replay attack, which the format of the message to be signed guards against. The DOMAIN_SEPARATOR used in the message to be signed is unique to the repository smart contract of the chain it is deployed on. This means that the signature is invalid on any other chain and the Emote repositories deployed on them should revert the operation if a replay attack is attempted.
Another thing to consider is the ability of presigned message reuse. Since the message includes the signature validity deadline, the message can be reused any number of times before the deadline is reached. The proposal only allows for a single reaction with a given emoji to a specific token to be active, so the presigned message can not be abused to increase the reaction count on the token. However, if the service using the repository relies on the ability to revoke the reaction after certain actions, a valid presigned message can be used to re-react to the token. We suggest that the services using the repository in conjunction with presigned messages use deadlines that invalidate presigned messages after a reasonably short period of time.
Caution is advised when dealing with non-audited contracts.
Copyright and related rights waived via CC0.