-
Notifications
You must be signed in to change notification settings - Fork 714
NIP-XXX: new order event based on BOLT12 payment protocol
#638
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
base: master
Are you sure you want to change the base?
Conversation
XXX.md
Outdated
| "id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>, | ||
| "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| "created_at": <unix timestamp in seconds>, | ||
| "kind": <32_500>, |
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.
formatting: I wouldn't highlight the data here, just put "kind": 32500
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.
thanks updated by removing the highlighting, now “kind”: 32_500 if this what you were thinking about.
361c439 to
f8742e5
Compare
| "tags": [ | ||
| ["d", "optional value"], | ||
| ], | ||
| "content": bolt12 string, |
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.
I’m thinking to have the option of allowing bolt11 string there too. There is already about BOLT11 integration (NIP-57) however it does introduces it as a tag, which prevents to have “order policy” based on tag, like this proposal is thinking of.
Addition is motivated by the fact than it will take a while for BOLT12 to become a standard across Lightning wallets.
|
I am having a hard time understanding how this is supposed to work in practice. My infantile mind would like a concrete example. |
Example 1: over-the-counter market
The OTC capability can be boosted once you have encrypted group events (e.g NIP112 proposal) and Alice Example 2: public market
Example 3: public market (order brokering)
For the last example of order brokering, Ralph can withhold the The examples can be more precised if needed. Generally, the BOLT12 format present (at least) 3 clear advantages to build marketplace:
This NIP proposal only introduces the kind |
|
See comment on #662, I’m fine to withdraw this proposal in favor of the other proposal, if we can converge on the semantic “tag-vs-content" and have the content field being indifferently a BOLT11 / BOLT12 / Markdown or LNURL. I think it would benefit to have a single trade order event standard, however it maybe too early for that and have more market place experimentations. |
|
Okay I’ll maintain this proposal open as NIP99 doesn’t address the technical concerns I raised on #662, though from my understanding of the design it doesn’t aim to be a generalized NIP for marketplace, and more something for ad hoc sales for ease and simplicity. |
|
Sorry for taking too long. I read your answer now, and I'm not sure I get it. I think it would work fine without an extra kind. You could just send a nip04 or whatnot with the bolt12 inside it, no? It's also ok to use a new kind, I just don't see the need, but I'm probably missing something. |
Thanks for the read, to be honest I'm still experimenting with "order" implementation in my nostr relay. I think I'll propose an updated version latter. Note bolt12 offer isn't still worked on on LDK so pending on this so it was a bit too early to propose this NIP. Happy to let it open to collect more feedback. |
This NIP proposal introduces a new event
orderof kind32_500based on the BOLT12 protocol aiming to enhance peer-to-peer marketplaces.The BOLT12 payment protocol indicates a serie of steps for one or more trading counterparties to enter into a trade agreement (
offer,invoice_request,invoice). The new invoice format is TLV-based which enables easy extensibility (e.g adding new payment method like e-cash or issuer-related conditional-payment policy).The new
orderevent is a superset of a bolt12 and the corresponding NIP01 event field. Introducing a new kind rather than adding the offer as a tag introduces the ability to have order policy enforced by a serie of tags. A default order policy is re-using the "tag"dto enable an offer issuer or order broker to replace a subset of its pending orders.The "Design" section gives more examples of order routing policy based on yet-to-be-defined in future NIP tags.
While there is some redundancy with NIP-15, the current proposal not only enable the two major types of real-world marketplace OTC and exchange by allowing the Nostr relays/services to act as broker, or marketplace boards. A "stall" can be re-introduced as a set of offers all announced under the same issuer pubkey, and with a tag to announce the brokering relays to listen for future order events. The
ttag is not re-used as a scalable and trust-minimized overlay namespace over product/good announcement is far from simple in my understanding.BOLT12 comes with additional advantages over BOLT11, e.g the Merkle tree construction of the signature invoice format that enables privacy-preserving broker/dealer policy.
There is a WIP implementation against the CivKit node, a Rust based NIP-01 relay software:
civkit/civkit-node#20
Opening this NIP proposal to collect feedback and looking forward on how to standardize and harmonize peer-to-peer marketplace softwares (NIP-15 based and others) across the Bitcoin/Nostr ecosystems.
This being my first NIP proposal, if I’m missing some formatting things about NIPs, or previous discussions about p2p marketplace design in the Nostr space, thanks to let me know.