Skip to content
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

Auction Standard #24

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
104b6c4
yuuuuuuuup
joshpainter Jun 15, 2022
dc1c429
Merge branch 'Chia-Network:main' into main
joshpainter Jun 15, 2022
d4d4b2c
Add conceptual design and specs first drafts
joshpainter Jun 15, 2022
4ae9656
Merge branch 'main' of https://github.com/joshpainter/chips
joshpainter Jun 15, 2022
1b1c23b
Added community feedback from @Engarneering
joshpainter Jun 15, 2022
7c0875a
Community feedback and credit updates
joshpainter Jun 17, 2022
8e4aebc
removed footnote
joshpainter Jun 17, 2022
ec53f4b
fix update section typo
joshpainter Jun 17, 2022
0e8ee45
added summary and hammer time feedback from Dan
joshpainter Jun 23, 2022
47b268e
fix numbering
joshpainter Jun 23, 2022
439e9e6
Merge branch 'Chia-Network:main' into main
joshpainter Oct 17, 2022
67a0968
Initial commit from template
joshpainter Oct 17, 2022
cd6486e
abstract
joshpainter Oct 17, 2022
2eafe4b
Rename chip-joshpainter-editable-metadata to chip-joshpainter-editabl…
joshpainter Oct 17, 2022
2b79a2f
Update chip-joshpainter-editable-metadata.md
joshpainter Oct 17, 2022
1d24b41
Update chip-joshpainter-editable-metadata.md
joshpainter Oct 17, 2022
746cc94
Update chip-joshpainter-editable-metadata.md
joshpainter Oct 17, 2022
bf83ef5
Update chip-joshpainter-editable-metadata.md
joshpainter Oct 17, 2022
801bec5
Update chip-joshpainter-editable-metadata.md
joshpainter Oct 17, 2022
5295bec
Update chip-joshpainter-editable-metadata.md
joshpainter Oct 19, 2022
ee4d87b
added links, ready to submit PR
joshpainter Oct 19, 2022
fb74315
Merge branch 'Chia-Network:main' into main
joshpainter Oct 26, 2022
8e7f1f1
Merge branch 'Chia-Network:main' into main
joshpainter Nov 2, 2022
1c48319
Merge branch 'Chia-Network:main' into main
joshpainter Nov 9, 2022
294f44e
Merge branch 'Chia-Network:main' into main
joshpainter Jun 16, 2023
7196210
Rename chip-joshpainter-editable-metadata.md to chip-0010.md
joshpainter Jun 16, 2023
978631f
Update chip-0010.md
joshpainter Jun 19, 2023
2eb6902
Update chip-0010.md
joshpainter Jun 19, 2023
13f9d50
Update chip-0010.md
joshpainter Jun 19, 2023
a409b5d
Update chip-0010.md
joshpainter Jun 19, 2023
5d50ac0
more etching details
joshpainter Jun 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions CHIPs/chip-0010.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
CHIP Number | < Creator must leave this blank. Editor will assign a number.>
:-------------|:----
Title | Owner-Editable Metadata Format for NFT1
Description | A standard that allows NFT owners to update some or all of the metadata attributes and store those updates on-chain.
Author | [Josh Painter](https://github.com/joshpainter)
Editor | < Creator must leave this blank. Editor will be assigned.>
Comments-URI | < Creator must leave this blank. Editor will assign a URI.>
Status | < Creator must leave this blank. Editor will assign a status.>
Category | Process
Sub-Category | Informational
Created | 2022-10-17
Requires | 0007
Replaces |
Superseded-By |

## Abstract
The Chia NFT1 standard enables an off-chain metadata file to be referenced by Non-Fungible Tokens (NFTs) on chain, along with a hash of the file that ensures its immutability. The format and schema of this metadata file is described by [CHIP-0007](chip-0007.md). This CHIP describes an easy way to allow the owner of the NFT to update some or all of that metadata, depending on which attributes have been marked as editable by the creator. It is intended to supplement the metadata schema described in [CHIP-0007](chip-0007.md).

## Motivation
[CHIP-0007](chip-0007.md) specifies the format and schema of the off-chain metadata file. By design, this metadata file is immutable. If any user attempts to update any of the metadata attributes in the referenced metadata file, the hash of the metadata file will change. The NFT viewer program is responsible for checking this hash to make sure the metadata has not been tampered.

However, the ability for the owner for a NFT to update some or all of the metadata for the NFT has some very interesting use-cases. Of particular interest is a Chia Name Service (CNS) that uses NFTs to resolve records. By allowing the owner to update their own NFT "pointer records," a CNS could enable full self-custody and self-sovereignty of these pointer records.

As another example, imagine some sort of digital board game in which the player gets to choose where to place their token(s). These positions could be managed by updating the X/Y metadata attributes of NFTs that represents these digital player tokens.

Another feature is the "Etching" attribute that exists for all existing and newly-minted NFTs. The owner could update the Etching with any personal information about the NFT, a story about where they got it, etc. The next owner could overwrite or append to this Etching, but the full history will always be stored on-chain as an additional bit of provenance.

Finally, these metadata values could themselves be Merkel tree hashes, allowing proofs-of-inclusion while using minimal on-chain storage space!

This CHIP will explain one method of enabling this feature using existing NFT1 and [CHIP-0007](chip-0007.md) standards with no required changes, including full backwards-compatibility.

## Backwards Compatibility
This CHIP is fully backwards-compatible with [CHIP-0007](chip-0007.md). In fact, it proposes to add just a single new attribute to the [CHIP-0007](chip-0007.md) schema. NFT1 standard requires no changes whatsoever.

## Rationale
The method described below is possible today even if this CHIP is never published because it requires no changes to any existing standards. However, by standardizing the "editable" attribute schema, it is hoped that the Chia NFT viewer itself will be able to make use of these editable attributes, along with other future NFT viewers.

Another possible method to accomplish a similar result would involve Chia Data Layer. Data Layer will no doubt be an important addition to these metadata standards in the future and will enable a much higher amount of data storage. However, Data Layer requires more user interaction and the user must opt-in to the data. By contrast, the method described below is much simpler and works with just a full node. For use cases involving small, rarely-updated data, the impact to the blockchain should be low.

Finally, this small addition to the work already done with CHIP-0007 is a good example of [Lateral Thinking with Withered Technology](https://medium.com/@uczlwha/nintendos-philosophy-lateral-thinking-with-withered-technology-f188f371e670). While the Chia NFT1 standard and [CHIP-0007](chip-0007.md) are certainly not already "withered" according to the normally-accepted definition, a big benefit of this standard is that it uses these existing standards in a new way without breaking them.

## Specification

This CHIP proposes a single new optional boolean property on the "trait" attribute defined in [CHIP-0007](chip-0007.md) called "editable." Here is an example of both a normal and an "editable" attribute (surrounding metadata removed for brevity):

```
...
{
"trait_type": "Registered On",
"value": "{$registeredOn}"
},
{
"trait_type": "Target",
"value": "xch1v96m4cej23hpt4newv8hs9ejcsc760w3p8gh5p6989c7kyaq5juq9hzjgr",
"editable": true
},
...
```

Only the NFT attributes may include this optional property. The collection attributes mentioned in [CHIP-0007](chip-0007.md) are meant to be the same for all NFTs in the collection and therefore should remain immutable.

To edit this editable metadata, the owner of the NFT will add a new metadata URL to the NFT using the normal NFT1 standard. However, the URL will merely be a copy of the existing metadata URL with the addition of the editable names and values in the querystring.

An example of a normal metadata URL:
https://bafkreig7fmhptchs2gv2o2l3bilkxtddr7r5eo7nkpr26rnetmx5icahvm.ipfs.nftstorage.link/

An example of a metadata URL that contains a new value for an editable attribute:
https://bafkreig7fmhptchs2gv2o2l3bilkxtddr7r5eo7nkpr26rnetmx5icahvm.ipfs.nftstorage.link/?Target=xch16nvgtzv2dcs86hmk99kfp3q09vj2k66x0t0z0ttk9k5zcx3yxzaqz9xxaf

Notice that the second example has an additional querystring value that is ignored by the server - both URLs serve the same file regardless of querystring values. The hash is therefore unchanged. Existing NFT viewers, including the official Chia Wallet, will continue to "just work" with these enhanced URLs.

However, NFT viewers or applications with editing capability can now be supported. These new NFT viewers will recognize the "editable" property on metadata attributes and they will instead look to the latest metadata URL's querystring values first to resolve the metadata value. If these values don't exist as querystring values, the values from the metadata file will be used as normal.

The same viewers could allow basic editing by directing the user to add a new URL via CLI or RPC. Perhaps they could even use a web wallet like Goby to sign the transaction that adds the new enhanced URL to the NFT!

### Etchings

Additionally, this specification describes a single additional editable metadata field that all new and existing NFTs can use called "Etching." An Etching is a simple text field attribute. It is not defined in the metadata json file. It only exists as a querystring name/value pair, like this:

https://bafkreig7fmhptchs2gv2o2l3bilkxtddr7r5eo7nkpr26rnetmx5icahvm.ipfs.nftstorage.link/?Etching=this%20is%20my%20super-cool%20etching

Any viewer that supports CHIP-0010 should always look for this "Etching" querystring value on the metadata URI *even if there are no other editable metadata attributes defined in the metadata.* If the Etching attribute is defined in the metadata, it should be used as the default value like other editable attributes. The viewer should display it in the UI in addition to the other editable metadata. The viewer should allow the owner to edit the Etching using the same method described above for other editable metadata.

An Etching could be used for any user-defined content, such as a story about how the owner acquired the NFT, or a critique of the art itself, or even structured data such as JSON or YAML. This data is stored on the blockchain in the metadata URI as querystring values just like the other editable metadata above. This feature allows existing NFTs minted before this CHIP was published to use a simple form of editable metadata too!

Querystring names are not case-sensitive, so "?Etching=" and "?etching=" and ?ETCHING=" are all acceptable.

### dApps/WalletConnect RPC Whitelist

Ideally the /nft_add_uri RPC endpoint should be added to https://github.com/Chia-Network/chia-blockchain-gui/blob/main/packages/gui/src/constants/WalletConnectCommands.tsx so it can be used by dApps.

Other dApps like Goby may also add simple functionality similar to how /nft_add_uri to support this CHIP.

## Test Cases

Not applicable

## Reference Implementation

The go4.me Chia Name Service (CNS) uses this standard for owner-editable pointer records.

## Security

No changes or security issues result from this CHIP. It uses the same rules as the NFT1 standard - only the current owner of the NFT can add a metadata URL to the NFT.

## Additional Assets

Presentation: https://bafybeieztz7kn7ykqao3dc6cop6t5kim4qg2ukvh6j32gk4e2r6i7heure.ipfs.nftstorage.link/Chia-CHIP-0010-01.webm
NFT Collection: https://mintgarden.io/collections/chip-0010-col1v6dnjyduum4pdw2r79wwz5mhvd0ejgjc2dqcf325lwwajddxzdpqymjhpr

## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).




Loading