-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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-5865: NFT Avatar in Multi-Metaverse #5865
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
ebced2e
Create eip-xxxx.md
yeri-lee e1c1093
update
yeri-lee 9942d06
Update eip-5865.md
yeri-lee 00c8917
Update eip-5865.md
yeri-lee be61102
removed trailing spaces
yeri-lee be8974b
add new line
yeri-lee 9beb49b
Update EIPS/eip-5865.md
yeri-lee 072a3b0
Update EIPS/eip-5865.md
yeri-lee 6a1f984
Update eip-5865.md
yeri-lee 28620bd
Update eip-5865.md
yeri-lee 5fa35ab
Update eip-5865.md
yeri-lee 3def595
Update eip-5865.md
yeri-lee 1ed4fe7
Update eip-5865.md
yeri-lee 8deb75e
Update eip-5865.md
yeri-lee bf70950
Update eip-5865.md
yeri-lee 6f0a0f8
Update eip-5865.md
yeri-lee 1cef0e1
Update eip-5865.md
yeri-lee 98eb9fa
Update eip-5865.md
yeri-lee 3f1b921
Update eip-5865.md
yeri-lee ad45f60
Update eip-5865.md
yeri-lee 7b3ce7e
Update eip-5865.md
yeri-lee 6e03f0b
Update EIPS/eip-5865.md
yeri-lee 7a0a1f2
Update EIPS/eip-5865.md
yeri-lee 849869a
Update eip-5865.md
yeri-lee 86b688a
Update eip-5865.md
yeri-lee 395d388
Update eip-5865.md
yeri-lee 746c64a
Update eip-5865.md
yeri-lee a6ff7f8
Update eip-5865.md
yeri-lee 13a2414
Update eip-5865.md
yeri-lee 136d3a9
Update eip-5865.md
yeri-lee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,346 @@ | ||
--- | ||
eip: 5865 | ||
title: NFT Avatar in Multi-Metaverse | ||
description: An interchangeable visualization of NFT across multiple metaverses | ||
author: Yeri Lee (@yeri-lee), Junghyun Colin Kim (@kjhman21), Wonbae Kim (@kernys), Seokrin Sung (@taronsung) | ||
discussions-to: https://ethereum-magicians.org/t/eip-5865-nft-avatar-in-multi-metaverse/11549 | ||
status: Draft | ||
type: Standards Track | ||
category: ERC | ||
created: 2022-11-01 | ||
requires: 721, 1155, 4955 | ||
--- | ||
|
||
## Abstract | ||
|
||
Although fungible tokens (FTs) are easily exchangeable across different platforms through DEX, non-fungible tokens (NFTs) do not easily migrate from one metaverse to another. The exchange of NFTs across platforms often does not promise the equivalent asset value, including quality and style. We aim to define an NFT as a single character with different visualization for multi-metaverse. An NFT character with the standard definition and predefined motion images can create an adequate visualization when entering metaverses as an NFT avatar. The NFT avatar standard will increase the utility of NFT, invigorate the metaverse industry and strengthen interoperability. | ||
|
||
## Motivation | ||
|
||
NFT has different utilities. Some are used as an asset in the gaming industry while some are used as a parcel of virtual land in the metaverse. The usage of NFTs has often been limited to PFP (profile picture) until today. Yet, an NFT character should be interchanged into several forms of avatars corresponding to the metaverse platform it enters. This standard distinguishes the usage between NFT characters as absolute graphical assets and NFT avatars as motion-added chameleon-ed NFT characters. | ||
|
||
With the NFT avatar standard, NFT characters will transfer into avatars enabling use cases within multiple metaverses. The character purchased in the NFT marketplace can enter as a 2D avatar in Zep.us while it enters Another.world as a 3D avatar. In addition, user-created 3D avatars, like VR Chat, can also compatibly enter multi-metaverse as NFT avatars. | ||
|
||
The NFT avatar standard will generate a positive value creation cycle between creators, the NFT marketplace, and the metaverse. Each individual entity will have a common standard to share, maximizing the utility and interoperability of NFTs. With the standard, the value of an item minted by creators will be increased with heightened practicality and utilization. This will boost the activity within NFT marketplaces while the usage of NFT within metaverses also increases. The versatile utility of NFT characters will increase the public desire to purchase and incentivize creators to generate, ultimately vitalizing the creator economy. Likewise, such dynamics will unleash NFT characters in the multi-metaverse. | ||
|
||
## Specification | ||
|
||
The keywords “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. | ||
|
||
Compliant contract that is extending [EIP-721](./eip-721.md) and [EIP-4955](./eip-4955.md) MUST implement `ERC721 Metadata` and in `ERC721 Metadata JSON Schema`, and it MUST add a new field `namespaces` to this JSON Schema. The data required for the avatar varies by metaverse platform. In the instance of Zep, type of asset and properties of image are defined to maximize the scalability of individual NFT. | ||
|
||
In addition to [EIP-4955](./eip-4955.md), we define more in-depth specification to represent an avatar in various metaverses. | ||
|
||
Here is the schema for this. This schema only defines an avatar schema for Zep.us, but it can be used for various metaverses using similar avatar representation. | ||
|
||
```json | ||
{ | ||
"title": "Asset Metadata", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Identifies the asset to which this NFT represents" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "Describes the asset to which this NFT represents" | ||
}, | ||
"image": { | ||
"type": "string", | ||
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive." | ||
}, | ||
"namespaces": { | ||
"type": "object", | ||
"description": "Projects that needs specific properties to use the NFT", | ||
"properties": { | ||
"zep": { | ||
"$ref": "#/$defs/zep" | ||
} | ||
}, | ||
"additionalProperties": { | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"$defs": { | ||
"zep": { | ||
"title": "Avatar Schema for Zep", | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ "avatar" ], | ||
"description": "Type of asset that an item will perform within the metaverse. Currently, only 'avatar' is supported." | ||
}, | ||
"properties": { | ||
"type": "object", | ||
"properties": { | ||
"image": { | ||
"type": "string", | ||
"format": "uri", | ||
"description": "A URL to the image of the avatar sprite sheet. (only PNG images are supported)" | ||
}, | ||
"frame_width": { | ||
"type": "integer", | ||
"minimum": 1, | ||
"description": "Width of a frame. The original image width must be divided by the frame_width. It must range between a minimum of 1 and a maximum of the image width. The values of frame_width and frame_height can be different." | ||
}, | ||
"frame_height": { | ||
"type": "integer", | ||
"minimum": 1, | ||
"maximum": 256, | ||
"description": "Height of a frame. The original image height must be divided by the frame_height. It must range between a minimum of 1 and a maximum of the image height. This must be a multiple of an original image size, ranging between a minimum of 1 and a maximum of 256. The values of frame_width and frame_height can be different." | ||
}, | ||
"animations": { | ||
"type": "object", | ||
"properties": { | ||
"down": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The downward movement of the avatar." | ||
}, | ||
"left": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The movement of the avatar to the left." | ||
}, | ||
"right": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The movement of the avatar to the right." | ||
}, | ||
"up": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The upward movement of the avatar." | ||
}, | ||
"dance": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The dance movement of the avatar." | ||
}, | ||
"down_jump": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The downward jump movement of the avatar." | ||
}, | ||
"left_jump": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The jumping movement of the avatar to the left." | ||
}, | ||
"right_jump": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The jumping movement of the avatar to the right." | ||
}, | ||
"up_jump": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The upward jump movement of the avatar." | ||
}, | ||
"down_attack": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The downward attack movement of the avatar." | ||
}, | ||
"left_attack": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The attacking movement of the avatar to the left." | ||
}, | ||
"right_attack": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The attacking movement of the avatar to the right." | ||
}, | ||
"up_attack": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The upward attack movement of the avatar." | ||
}, | ||
"down_idle": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The downward idle movement of the avatar." | ||
}, | ||
"left_idle": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The idleing movement of the avatar to the left." | ||
}, | ||
"right_idle": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The idleing movement of the avatar to the right." | ||
}, | ||
"up_idle": { | ||
"$ref": "#/$defs/zep/$defs/animationDef", | ||
"description": "The upward idle movement of the avatar." | ||
} | ||
}, | ||
"required": [ | ||
"down", | ||
"left", | ||
"right", | ||
"up", | ||
"dance", | ||
"down_jump", | ||
"left_jump", | ||
"right_jump", | ||
"up_jump", | ||
"down_attack", | ||
"left_attack", | ||
"right_attack", | ||
"up_attack", | ||
"down_idle", | ||
"left_idle", | ||
"right_idle", | ||
"up_idle" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"image", | ||
"frame_width", | ||
"frame_height", | ||
"animations" | ||
] | ||
} | ||
}, | ||
"required": [ "type", "properties" ], | ||
"$defs": { | ||
"animationDef": { | ||
"type": "object", | ||
"properties": { | ||
"frames": { | ||
"type": "array", | ||
"items": "integer", | ||
"maxItems": 256, | ||
"description": "Frame index of the sprite sheet (zero-based). Each frame has (frame_width X frame_height) image fragment in the sprite sheet image. The frame index starts from 0. The maximum array length is 256." | ||
}, | ||
"frame_rate": { | ||
"type": "integer", | ||
"minimum": 1, | ||
"maximum": 64, | ||
"description": "frame_rate must be between a minimum of 1 and a maximum of 64. frame_rate represents the number of frames per second." | ||
}, | ||
"repeat": { | ||
"type": "integer", | ||
"enum": [-1, 1], | ||
"description": "The number of repetitions of the animation. Only two values are supported: -1 and 1. If it is set to -1, it repeats endlessly. If 1, it repeats once." | ||
} | ||
}, | ||
"required": [ "frames", "frame_rate", "repeat" ] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Rationale | ||
|
||
This standard can be fully [EIP-721](./eip-721.md), [EIP-1155](./eip-1155.md), [EIP-4955](./eip-4955.md) compatible by defining an "avatar" extension in the metadata. This allows developers to easily adopt the standard quickly. | ||
|
||
## Test Cases | ||
|
||
Here is an example of the schema. | ||
|
||
```json | ||
{ | ||
"name": "Klaytn Core", | ||
"description": "Klaytn Story NFTs - Core", | ||
"image": "https://klaytn-story-bucket.s3.ap-northeast-2.amazonaws.com/core-face.png", | ||
"namespaces": { | ||
"zep": { | ||
"type": "avatar", | ||
"properties": { | ||
"image": "https://klaytn-story-bucket.s3.ap-northeast-2.amazonaws.com/core-sheet.png", | ||
"frame_width": 48, | ||
"frame_height": 64, | ||
"animations": { | ||
"down": { | ||
"frames": [ 1, 2, 3, 4 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"left": { | ||
"frames": [ 6, 7, 8, 9 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"right": { | ||
"frames": [ 11, 12, 13, 14 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"up": { | ||
"frames": [ 16, 17, 18, 19 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"dance": { | ||
"frames": [ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 ], | ||
"frame_rate": 8, | ||
"repeat": 1 | ||
}, | ||
"down_jump": { | ||
"frames": [ 38 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"left_jump": { | ||
"frames": [ 39 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"right_jump": { | ||
"frames": [ 40 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"up_jump": { | ||
"frames": [ 41 ], | ||
"frame_rate": 8, | ||
"repeat": -1 | ||
}, | ||
"down_attack": { | ||
"frames": [ 42 ], | ||
"frame_rate": 8, | ||
"repeat": 1 | ||
}, | ||
"left_attack": { | ||
"frames": [ 43 ], | ||
"frame_rate": 8, | ||
"repeat": 1 | ||
}, | ||
"right_attack": { | ||
"frames": [ 44 ], | ||
"frame_rate": 8, | ||
"repeat": 1 | ||
}, | ||
"up_attack": { | ||
"frames": [ 45 ], | ||
"frame_rate": 8, | ||
"repeat": 1 | ||
}, | ||
"down_idle": { | ||
"frames": [ 0 ], | ||
"frame_rate": 1, | ||
"repeat": 1 | ||
}, | ||
"left_idle": { | ||
"frames": [ 5 ], | ||
"frame_rate": 1, | ||
"repeat": 1 | ||
}, | ||
"right_idle": { | ||
"frames": [ 10 ], | ||
"frame_rate": 1, | ||
"repeat": 1 | ||
}, | ||
"up_idle": { | ||
"frames": [ 15 ], | ||
"frame_rate": 1, | ||
"repeat": 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Security Considerations | ||
|
||
There are no security considerations related directly to the implementation of this standard. | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](../LICENSE.md). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why
Multi-Metaverse
is being used in the subject and in this EIP?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Through the word "Multi-Metaverse", I aimed to convey that this standard provides an interchangeable visualization of NFT avatars across multiple metaverses.