Amendment XLS: NFToken Collection Offers #584
Replies: 3 comments
-
|
Big +1 on this proposal — I've wanted native collection offers for a long time, and I'd been sketching essentially the same design (flag on Corrections / main suggestion1. §2.4 — suggest dropping the changes to Not to be pedantic, but the table shows
but today's Rather than defining all that, what if we just don't change it; specify that a collection offer is filled only by matching it against a normal sell offer (existing brokered-mode shape — the sell offer supplies the concrete I recognize this would require trading a rule change to permit self-brokering when the buy side is a collection offer: today the accept sender may not own either offer, so a seller filling a collection bid directly would post a sell offer for their chosen token and then match it themselves ( Trade-off vs. the new-field approach: a direct fill takes two transactions (create sell offer, then accept) plus a transient owner-reserve. But:
If the discussion prefers the one-transaction direct mode anyway, the spec should at minimum reframe 2. §2.5 — field name. " Gaps3. Security Considerations is missing the main threat: taxon trust. Taxons are free-form and chosen by the issuer at mint time. An issuer (or its authorized minter) can mint arbitrarily many worthless tokens into a taxon that has open collection bids and immediately dump them into those bids. This is inherent to collection bids on any platform, but the XLS should surface it explicitly — XLS-1 requires a security section sufficient for review, and this is the first question a reviewer will ask. Suggested framing: a collection offer is an open bid that trusts the issuer of the collection; mitigations are 4. Directory key needs a keyspace prefix. 5. 6. Missing accept-time checks. The acceptance path should also specify: the issuer's 7. Sections XLS-1 requires before this can go to Draft. Ledger-entry subsections (object identifier/keyspace, reserve — presumably one standard owner-reserve unit, deletion conditions incl. whether the entry blocks
8. On open question #3 (read-side API): I'd include it in this XLS rather than a separate one — the new directory exists precisely to make these offers enumerable, and speccing the RPC here locks in that the directory layout actually supports it. Sketch: Minor
I have draft text for the invariants, RPC section, example JSONs, and a test plan outline from my own write-up of this same idea — glad to contribute any of it here or co-author toward the Draft PR if useful. |
Beta Was this translation helpful? Give feedback.
-
|
TL'DR: I support the amendment's idea, but I do not believe it is needed. Given this amendment comes from people who have a vested interest in the NFTs and have all the information to make a well informed decision, I am missing numbers on how would this impact the ledger for the better. As far as I am concerned, NFTs are very niche and none of artistic NFTs ever broke beyond XRPL ecosystem. The volume is pretty low as well. XRPL is still positioning itself as "institutional chain", where I could see NFTs being utilised to a wider extent and this could come handy, but I see no such examples here as well. Hence, I am currently not convinced this feature is needed on XRPL. I agree will make life easier, because making a million clicks to buy a few NFTs is annoying, but the financial rational is not there. If I am wrong on financial rational and you can provide quantitative evidence and projections, I will be happy to support it. This is also one of the reasons I proposed this: #393 <-- data should drive decisions, economic rational. If there is no demand for a feature, then it does not make sense extending the ledger's functionality. |
Beta Was this translation helpful? Give feedback.
-
|
Speaking as someone building and running marketplace infrastructure for a live We support collection offers today, but only by synthesizing them off-chain. That friction is itself part of the answer to the demand question. Collection bids On the question of routing fills through brokered mode (as @joshuahamsa suggests) The real value of doing this at the protocol layer is permissionless direct fill: One genuinely open design question in that direction: how funding availability is 1. Create a collection offer (buy-side, no specific token). The scope is the {
"TransactionType": "NFTokenCreateOffer",
"Account": "rBuyerCollectionBidder00000000000",
"Amount": "60000000",
"Flags": 2147483649,
"Issuer": "rst9Sq8mVxK8b7BbgFs4VmnVtfm7N2qN4j",
"NFTokenTaxon": 0,
"Expiration": 793372800
}
2. Any holder fills it directly (no broker in the loop). The holder names the {
"TransactionType": "NFTokenAcceptOffer",
"Account": "rHolderOfAMatchingToken0000000000",
"NFTokenBuyOffer": "<collection offer object index>",
"NFTokenID": "000813881F9C83FE46F4EEC59D5E8C0B017F1791F856B882..."
}The For contrast, the way we synthesize the same outcome today is a normal per-token buy A test-plan outline for the direct-fill path:
Happy to iterate on any of this and help push it toward Draft. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
NFToken Collection Offers (Issuer + Taxon Offers)
Abstract
This proposal introduces Collection Offers: a new mode for
NFTokenCreateOfferthat lets an account make a buy offer against an entire NFT collection - identified byIssuer+Taxon- instead of a singleNFTokenID. Any account holding an NFT that matches the specified issuer and taxon can accept the offer with the specific token they own, transferring that token in exchange for the offered amount.Today, a buyer who wants "any punk from collection X" must either poll the ledger for individual NFTs and create one offer per token (expensive, and offers expire/go stale as tokens move) or rely on a centralized marketplace to fake this behavior off-chain. This amendment brings that behavior on-ledger and trustless.
1. Motivation
NFTokenCreateOffertransactions, one per existingNFTokenID, each of which becomes stale the moment that specific token changes hands or a new token is minted into the taxon.2. Specification
2.1 New transaction flag:
tfCollectionOfferA new flag is added to
NFTokenCreateOffer:tfCollectionOffer0x00000004Issuer+NFTokenTaxonrather than a specificNFTokenID.This is in addition to the existing
tfSellNFToken(0x00000001) flag.Restriction:
tfCollectionOfferMUST NOT be combined withtfSellNFToken. Collection Offers are buy-side only - a sell offer inherently transfers one specific, already-owned token, so there is nothing ambiguous to generalize on the sell side. (See §3.2 for discussion of why sell-side collection offers are out of scope.)2.2
NFTokenCreateOfferfield changesNFTokenIDtfCollectionOfferis set.IssuertfCollectionOfferis set; specifies the issuer of the collection. Must be omitted otherwise (it can be derived fromNFTokenID).NFTokenTaxontfCollectionOfferis set. Must be omitted otherwise.AmountOwnerDestinationExpirationValidation rules:
tfCollectionOfferis set:tfSellNFTokenMUST NOT be set →temMALFORMED.NFTokenIDMUST NOT be present →temMALFORMED.IssuerandNFTokenTaxonMUST both be present →temMALFORMEDif either is missing.AmountMUST be a non-zero XRP or IOU amount; the account MUST have sufficient balance/trust line headroom the same way any buy offer is checked today.NFTokenID-scoped buy offer.2.3
NFTokenOfferledger object changesThe
NFTokenOfferobject gains two new optional fields, populated only for Collection Offers:IssuerNFTokenTaxonNFTokenIDIndexing: Today,
NFTokenOffers are linked into a directory keyed off the specificNFTokenID(the "buy offer directory" / "sell offer directory" for that token) as well as the owner's offer directory. A Collection Offer has no singleNFTokenIDto key off of at creation time, so it cannot use that directory.This proposal introduces a new directory type, the NFTokenCollectionOfferDirectory, keyed by
SHA512Half(Issuer || NFTokenTaxon). All outstanding Collection Offers for a given issuer/taxon pair are linked into this directory, in addition to the offering account's own owner directory (for reserve accounting andNFTokenCancelOffer/enumeration purposes, unchanged from today).This keeps the change additive: existing
NFTokenID-keyed offer directories and their traversal logic are untouched.2.4
NFTokenAcceptOfferchangesNFTokenAcceptOffergains one new optional field:NFTokenIDNFTokenIDthey wish to sell into the offer.Validation and execution, when the referenced offer is a Collection Offer:
NFTokenIDsupplied by the acceptor MUST exist and MUST be owned by the acceptor.NFTokenIDMUST match theIssuer/NFTokenTaxonstored on theNFTokenOffer→ otherwisetecNFTOKEN_OFFER_TYPE_MISMATCH(new ledger result code).lsfTransferableunset and the acceptor is not the issuer, reject as with normal offers today.NFTokenIDbeing sold, exactly as today, since by acceptance time we have a concrete token.NFTokenOfferis deleted from both the owner directory and theNFTokenCollectionOfferDirectory(a Collection Offer is consumed fully on first acceptance - it is not a standing multi-fill offer; see §3.3 for the open question on multi-fill).2.5 Brokered mode (
NFTokenAcceptOfferwith bothNFTokenSellOfferandNFTokenBrokerOffer)When brokering, if the buy-side offer is a Collection Offer, the broker-supplied sell offer's
NFTokenIDis used to determine the concrete token, and the same issuer/taxon match check from §2.4 is applied before the trade is executed.NFTokenBrokerFeeaccounting is otherwise unchanged.2.6
NFTokenCancelOfferUnchanged in interface. Internally, cancellation of a Collection Offer removes the entry from the
NFTokenCollectionOfferDirectoryinstead of anNFTokenID-keyed directory.2.7 Amendment
This behavior is gated behind a new amendment, tentatively named
NFTokenCollectionOffers.3. Rationale and Alternatives Considered
3.1 Why a flag + optional fields instead of a new transaction type?
Reusing
NFTokenCreateOffer/NFTokenAcceptOfferminimizes surface area and lets existing tooling, indexers, and wallets add support incrementally (unknown flag → ignore or reject, rather than an entirely unrecognized transaction type). A dedicatedNFTokenCreateCollectionOffertype was considered but rejected as introducing duplicate logic for something that is fundamentally "the same offer object with a different scope."3.2 Why buy-side only?
A sell-side "generic" offer would mean "I offer some NFT, unspecified, from this taxon, for this price" - but sell offers exist specifically because a particular token is already owned and escrow-able by a particular account. There is no natural way to make a binding sell commitment without pointing at a concrete, already-owned asset. If the intent is instead "the issuer will mint-and-sell on demand," that is more naturally addressed by a separate future proposal (e.g., issuer-side lazy-minting), not by generalizing
NFTokenCreateOffer.3.3 Single-fill by design
This proposal specifies single-fill only: a Collection Offer is consumed entirely the first time it's accepted, exactly like a normal
NFTokenOffertoday. There is no quantity field and no partial-consumption state.A multi-fill variant (a standing bid that could be accepted repeatedly, up to some quantity, across many different tokens/holders) was considered and deliberately rejected for this proposal:
NFTokenOfferobject, turning a simple delete-on-accept object into stateful, partially-mutable object - a meaningfully larger change to ledger object semantics than anything else in this proposal.NFTokenOfferobject and lifecycle (create → accept-and-delete, or cancel-and-delete), which is easier to review, implement, and reason about for a first amendment.If demand emerges for multi-fill collection bids after this amendment ships, it is better addressed as a separate, later XLS building on this one, rather than complicating the initial design.
3.4 Why key the new directory by
Issuer + Taxonhash rather than extend the existing directories?Existing per-
NFTokenIDoffer directories only make sense once a concrete token exists. A collection can have offers made against it before any given token within it is even minted (e.g., "I'll pay 10 XRP for any punk once you mint into taxon 52"), so the new offers must be discoverable independent of any specific token's lifecycle.4. Backwards Compatibility
This change is purely additive:
NFTokenCreateOffer/NFTokenAcceptOffer/NFTokenCancelOfferbehavior forNFTokenID-scoped offers is completely unchanged.tfCollectionOfferas malformed, consistent with normal amendment-gating conventions.NFTokenOfferobjects gain optional fields; parsers that don't understand them can treat a Collection Offer object as they would any object with unfamiliar optional fields (assuming standard forward-compatible parsing).5. Security Considerations
NFTokenTaxonin theNFTokenIDis already stored in an obfuscated (scrambled) form on the ledger (per XLS-20), implementations must be careful to compare the decoded taxon value stored on theNFTokenOfferobject against the decoded taxon extracted from the candidateNFTokenID, not raw bytes.6. Open Questions
Destinationon a Collection Offer restrict acceptance to a specific account, or should there also be an option to restrict to "any of a specific NFT holder list" (out of scope, but worth flagging)?nft_sell_offers/nft_buy_offersequivalent) to list Collection Offers by issuer/taxon efficiently? This would likely need a correspondingaccount_nfts-style API addition - proposed as a separate, complementary XLS or as an addendum here.Beta Was this translation helpful? Give feedback.
All reactions