0035 XLS-35d: URIToken — Lightweight first-class NFTs for XRPL Protocol Chains #89
Replies: 15 comments 17 replies
-
From a quick review, the main differences between the current XLS-20 NFToken implementation and this URIToken proposal, from the user perspective are:
From a technical point of view, XLS-20 made it a pain to analyse metadata and has introduced a heavy (compared to other objects) burden to full history data stores, as one simple change to an NFToken can affect multiple NFTokenPages, which are included in full (previous and final fields) in metadata for the transactions. XLS-35d make URITokens first class citizens, and metdata will be limited to changes on the individual object itself. I do like the simplicity of this implementation – if you know the XRPL already, learning and using this is straightforward. Can't help but think it's a year too late for the mainnet, but it may be interesting for sidechain? |
Beta Was this translation helpful? Give feedback.
-
I think it would be great to separate the metadata standard and the technical implementation, maybe relying on the work that has been put into XLS-24d #69? |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating the XLS after our discussion earlier @RichardAH. Great work as usual! I am missing just a few things:
Thank you in advance :-) Daniel |
Beta Was this translation helpful? Give feedback.
-
Is there any way to allow a The use-case here would be any sort of digital asset that shouldn't be freely transferable, for whatever reason -- regulatory, or just some policy of the issuer. |
Beta Was this translation helpful? Give feedback.
-
I'm not for this amendment. It introduces yet another skew on the existing NFT token.This will now confuse end users as both would be "NFT's". This amendment also does very little to indicate how the two would be inter operable. The only way I would support this is if interoperability between the two was the basis of the design. Allowing a NFT to be converted between one of the two standards via a function calls eg NFTconvertStandard(standard) It is rather frustrating that oh it's to complicated let's serve up a light version, yet again is brought forth. I understand what's there is not overly simplistic for some usecases but it is what we have and iterations on that would be better served. As a side chain option this can be sandboxes there but on the mainnet I'm against this proposal. |
Beta Was this translation helpful? Give feedback.
-
I agree that the current NFT implementation is suboptimal due to it's complexity. However, I do think adding a second NFT standard to the ledger also adds complexity and confusion. I wonder if its possible to alleviate much of the issues with the current NFT implementation at the API level, which wouldn't require an amendment. |
Beta Was this translation helpful? Give feedback.
-
This is a really interesting idea! I too have concerns about interop between this and XLS20. However, I believe eth doesn't have any explicit interop between their various nft standards, but correct me if I'm wrong. If no interop is going to be pursued, then I can see this standard and xls20 competing for user share, where this is meant to be lightweight and not feature-complete compared with xls20. However Richard, in that world app developers still have to consider both standards, which increases complexity for some app developers, right? In other words, I'm not sure it helps you with regard to hooks. Of course, this might decrease complexity for end-users. Also, this is just a quibble, the combination of multiple actions within one transaction seems to defy how typical XRPL transaction APIs work. I would personally vote to add more transactions, rather than leaving the functionality of the transaction up to the flags, which overloads the meaning of the flags field with both how the transaction will act and what flags will be set on the resulting URI token. |
Beta Was this translation helpful? Give feedback.
-
I'd recommend (a) using an NFT-style page directory as it has significant advantages over the existing owner directory page mechanism; (b) using one transactor per operation, in keeping with the existing behavior of XRPL; and (c) you may want to think about case-insensitive URIs and the implications for this. |
Beta Was this translation helpful? Give feedback.
-
Does this spec take into account the NFTokenMinter flag that can be set on the AccountObject? I see no mention of this here? Where by another account can mint a token on behalf of the issuer? https://xrpl.org/nftoken-authorized-minting.html#assigning-an-authorized-minter |
Beta Was this translation helpful? Give feedback.
-
Idea: Take XLS-20D and wrap XLS-35D feature sets around it. Interoperability between the two protocols is critical IMO, we should learn from these other chains and do the work to prevent fragmentation. Fragmentation are cracks in the foundation and community. Let's take what works and build upon it. Interoperability is what makes XRPL stronger and more attractive for future projects, we should consider this idea for the future of the ecosystem. |
Beta Was this translation helpful? Give feedback.
-
What is the reason for not having offers? It seems limiting not to be able to make a buy or counter offer. I understand you could do this on the platform end, but then the offer only exists there instead of ledger wide. House is for sale, this much, take it or leave it. |
Beta Was this translation helpful? Give feedback.
-
From a quick read on this, here are some of the benefits I perceive with this URIToken proposal:
Are there other benefits we hope to gain from this implementation? |
Beta Was this translation helpful? Give feedback.
-
There is no explanation for the Flags specified in the URITokenCreateSellOffer transaction example. Is it a Flag representing a Sell? In this case, I don't think it is necessary to specify the Flags field because URITokenCreateSellOffer itself represents a Sell. |
Beta Was this translation helpful? Give feedback.
-
Hello group: per the new XLS Contributing process, it is my opinion that we have reach a "well-refined standard." As such, I propose that we move this discussion to a file (via #110) and work on final changes using additional PRs, for better change-tracking. Please comment here if you would like to object to moving this spec/discussion forward in the process into a DRAFT spec. (Note that per the Contributing guidelines, moving a spec into the DRAFT state does not mean any kind of endorsement, nor does it mean that this specification will become adopted. It is solely meant as a mechanism to enable better change tracking using PRs.) |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion in order to focus comments on PR #110 XLS-35d: URITokens — Lightweight first-class NFTs |
Beta Was this translation helpful? Give feedback.
-
Updated version: PR #110 XLS-35d: URITokens — Lightweight first-class NFTs
XLS-35d URIToken — Lightweight first-class NFTs for XRPL Protocol Chains
Problem Statement
XLS-20 is a Non-Fungible Token standard that is currently active and in-use on the XRP Ledger main-net. Despite this, many developers and users of the XRPL remain unsatisfied by its complexity, unusual edge-cases, lack of first-class object NFTs, and general difficulty to understand and write integrations for. We therefore propose a light-weight alternative: URIToken.
Amendment
The URIToken Amendment provides a lightweight alternative to XLS20 suitable for both main-net and side-chains.
The amendment adds:
A new type of ledger object:
ltURI_TOKEN
A new serialized field:
URITokenID
Five new transaction types:
URITokenMint
URITokenBurn
URITokenBuy
URITokenCreateSellOffer
URITokenCancelSellOffer
New Ledger Object Type:
URIToken
The
ltURI_TOKEN
object is an owned first-class on-ledger object which lives in its owner's directory. It is uniquely identified by the combined hash of itsIssuer
(minter) and theURI
. Therefore an issuer can only issue oneURIToken
per URI. Upon creation (minting) the Issuer is the object's first Owner. You cannot mint on behalf of a third party. As with other first class objects, each URIToken locks up an owner reserve on the account that currently owns it. Disposing of a URIToken frees up these reserved funds.The object has the following fields:
Example URIToken object:
New Transaction Type:
URITokenMint
If
sfDigest
is specified then the minted token will contain the hash specified by this field. For the end user this means they can verify the content served at the URI against this immutable hash, to ensure, for example that the properties of the NFT are not maliciously altered by changing the content at the URI. It may also be desirable to have a dynamic NFT where the content is intended to be altered, in which case simply omitsfDigest
during minting, and the resulting URIToken will not contain this field.sfFlags
is present and set to tfBurnable then the URIToken may be later burned by the Issuer. If the Hooks amendment is active on the chain this flag also indicates that the Issuer is a strong transactional stakeholder. In this event the Issuer's hooks will be executed whenever an attempt to buy or sell this URIToken occurs, and those hooks may reject the transaction and prevent it from happening if their own internal logic is not satisfied. It is therefore highly advisable to check whether or not a URIToken hastfBurnable
set before purchasing or accepting it in trade.Example Mint:
New Transaction Type:
URITokenBurn
The current owner of the URIToken can burn it at any time.
The Issuer of the token may also burn it at any time but only if
tfBurnable
was set during minting.Burning a URIToken removes the specified
ltURI_TOKEN
object from the ledger and from the owner’s directory.Example Burn:
New Transaction Type:
URITokenCreateSellOffer
A user may offer to sell their URIToken for a preset amount. A given URIToken may have at most one current sell offer. There are no buy offers. If a user executes a URITokenBuy then it must immediately cross an existing sell offer.
To offer the URIToken for sale: specify its
URITokenID
, anAmount
to sell for, and optionally aDestination
. If Destination is set then only the specified account may purchase the URIToken. If the Amount is 0 then a Destination must be set. (This prevents an accidental "transfer to anyone" scenario.)If a previous sell offer was present on the URIToken then it is simply replaced with the new offer.
Example Sell:
New Transaction Type:
URITokenBuy
A user may purchase a URIToken from another user if that URIToken has an active sell offer on it.
Whether a URIToken is for sale is indicated by the presence of the
Amount
field in thelt_URI_TOKEN
object. If aDestination
is also present in the object then only that AccountID may perform the purchase.To purchase the URIToken, a user specifies its
URITokenID
and a purchaseAmount
. The purchase amount must be at least the amount specified in the sell offer (but may also exceed if the user wishes to tip the seller.) The purchase amount must be the same currency as the amount in the sell offer. No pathing is allowed in this transaction. The user must have sufficient currency available to cover the purchase.Example Buy:
New Transaction Type:
URITokenCancelSellOffer
When a user has offered their URIToken for sale and later changes their mind, they may perform a clear operation. A clear operation simply clears the current sell offer from the URIToken.
Example Clear
Schema / Metadata Content
The URI pointed to by a URIToken should resolve to a JSON document that follows the below schema.
This schema may be extended over time as additional categories and use-cases present themselves.
Digest
, if provided during Minting, is the hash of this JSON document not the content pointed to by the JSON document. TheDigest
is calculated by taking the SHA-512 Half of the stringified, whitespace trimmed content JSON.JSON Schema
Example JSON document
Computing the
Digest
over your JSON documentPseudo-code:
Beta Was this translation helpful? Give feedback.
All reactions