simpleledger / slp-specifications

Simple Ledger Protocol (SLP) Specifications
MIT License
57 stars 40 forks source link

Groupable, supply limitable NFT tokens as derivative of fungible tokens #10

Closed imaginaryusername closed 5 years ago

markblundeberg commented 5 years ago

Interesting idea!

It may be useful if NFT GENESIS transactions would indicate which input contained the burned token.

I don't get what NFT2 scheme gets you ... why can't the minting authority just make NFT1 and keep all those tokens & baton on their own address?

imaginaryusername commented 5 years ago

if NFT GENESIS transactions would indicate which input contained the burned token

Ah, in case there are multiple tokens burned? Good thought!

just make NFT1 and keep all those tokens & baton on their own address?

That was my initial idea - the NFT2 modification is to make sure if any minting tokens every get to another party (mistake? theft?) they will be rendered invalid.

Kronkmeister commented 5 years ago

I wanted to create 7 Tokens each identifiable with a simple number from 1-7. I'd love to see it implemented! Thanks

jcramer commented 5 years ago

To continue the conversation from Telegram, what do you guys think about using an XPUB as a way to represent group NFTs? Simply paste the XPUB into the token's Document URI field and then anyone can easily verify if the token belongs to the same XPUB group by looking at the signed inputs to the GENESIS transaction.

jcramer commented 5 years ago

I wanted to create 7 Tokens each identifiable with a simple number from 1-7. I'd love to see it implemented! Thanks

To get a unique ID for your tokens application you have two options:

  1. Use the GENESIS fields to manually add the token's ID (e.g., Token Name = 1)
  2. Order the tokens by tokenID (least to greatest) to determine which number the token belongs to 1-7. For example, tokenId 0f1a...0124 = 1, 3032...aa11 = 2, 3122...3155 = 3, etc.
imaginaryusername commented 5 years ago

To continue the conversation from Telegram, what do you guys think about using an XPUB as a way to represent group NFTs?

In the context of my proposal, using xpub has two downsides:

  1. The number of tokens cannot be limited without additional specification.

  2. Only owner of the xpriv can issue tokens. (In first part of proposal, anyone who has a fungible token can burn it to generate NFT; fungible token can pass through many hands).

If token emission by strictly the same owner is desired, one might as well make it single address only (second part); and the proposal takes advantage of exiting specs for fungible token quantities (can be limited, can pass baton), both of which requires additional fields for xpub.

markblundeberg commented 5 years ago

To continue the conversation from Telegram, what do you guys think about using an XPUB as a way to represent group NFTs? Simply paste the XPUB into the token's Document URI field and then anyone can easily verify if the token belongs to the same XPUB group by looking at the signed inputs to the GENESIS transaction.

I was thinking about this a bit --- if you share an xpub with others, there is a security downside that many people don't know about -- "knowledge of a parent extended public key plus any non-hardened private key descending from it is equivalent to knowing the parent extended private key (and thus every private and public key descending from it).". I.e., if you share xpub then accidentally leak just one private key then the whole xprv becomes compromised -- all private keys compromised.

In addition, if you publish an xpub then the reason for the existence of the xpub (privacy) is nullified. So you may as well not use an xpub and just issue from same single address.

It's also not so easy to verify if a key belongs to a given xpub, if you have to search through potentially tens of thousands of HD key derivations to find a match.

jcramer commented 5 years ago

ok so @Kronkmeister probably not ideal to use XPUB to "group" tokens. As you can see we just merged in @imaginaryusername 's idea here, so we should try to use this moving forward for grouping together NFTs. SLPJS will need to be updated with helper methods to allow & validate for this.