-
Notifications
You must be signed in to change notification settings - Fork 594
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
NIP-15 Nostr marketplace #330
Conversation
one use for marketplace that would be useful is peer to peer trading. the reputation that is inherently build on nostr is what it a very good fit (how reputation should be built/managed should probably be handled in another NIP) for this use case to work on this piece, the first missing from this PR that I can think of right now are:
maybe the use case is specific enough that it could be a dedicated nip |
This seems to be a new payment standard (in relation to Zaps), should it be made into a NIP? Personally I prefer this over zaps, since the receiver need not implement a lnurl server When building payments related stuff on top of nostr it's unclear if one should build on top of zaps, or define a payment standard for the feature one is building (like this nip), or define a list of payment standard nips (what i'm kinda proposing). Curious to know what people think |
Since the sale is conducted via DM - which although encrypted, is still visible to others - can't outside observers guess who bought what items by simply correlating the times the DMs were send to the times the object inventory was decremented by the seller? |
update with `nostrmarket` insights
45.md
Outdated
| `0 ` | `set_meta` | The merchant description (similar with any `nostr` public key). | [NIP01 ](https://github.com/nostr-protocol/nips/blob/master/01.md) | | ||
| `30017` | `set_stall` | Create or update a stall. | [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md) (Parameterized Replaceable Event) | | ||
| `30018` | `set_product` | Create or update a product. | [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md) (Parameterized Replaceable Event) | | ||
| `4 ` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. | [NIP09](https://github.com/nostr-protocol/nips/blob/master/09.md) | |
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.
Please don't use the kind 4, use another number so that it doesn't get mixed with regular DM's in clients
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.
- this is the only
kind
that its encrypted - it has the (privacy) advantage that it "looses in the crowd". Otherwise it would be much easier to identify orders.
- the key (
npub
) that a customer uses to buy goods might be different than the one used for social media - some social media clients (like
hamstr
) have nice way of displaying JSON (in the form of tables)
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.
- Use the same encryption scheme
- Stores and clients might use different keys anyway so this doesnt really add any noise to hide in
- Yes
- Most don't and won't parse json messages in DM's, nor should they ever expect JSON, normies will be extremely confused
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.
Stores and clients might use different keys anyway so this doesnt really add any noise to hide in
The noise is network-wide not key-specific. Although since the other kinds determine the pubkey of the marketplace, you are right, it is obvious the comms are for marketplace actions.
@motorina0
The only way to make this work is to do what I did in lnurl/luds#203 and have an extra interaction round so that the stall tells the customer which pubkey to communicate with.
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.
- having a new
kind
for "typed/structured" DMs is also an option. See addcontent-type
tag for Encrypted Direct Messages #394 (comment) - a more generic mechanism for changing the keys for DMs would also solve the privacy issue for markets. See Aliases for Encrypted Direct Messages #393
- it is not the complete solution, defense against track-by-relays to be added
@motorina0 Which one will you be using? I guess the one in the code, right? |
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.
Excited about this one! Although I would rather future proof it by making some components of it more flexible.
45.md
Outdated
| `0 ` | `set_meta` | The merchant description (similar with any `nostr` public key). | [NIP01 ](https://github.com/nostr-protocol/nips/blob/master/01.md) | | ||
| `30017` | `set_stall` | Create or update a stall. | [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md) (Parameterized Replaceable Event) | | ||
| `30018` | `set_product` | Create or update a product. | [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md) (Parameterized Replaceable Event) | | ||
| `4 ` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. | [NIP09](https://github.com/nostr-protocol/nips/blob/master/09.md) | |
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.
Stores and clients might use different keys anyway so this doesnt really add any noise to hide in
The noise is network-wide not key-specific. Although since the other kinds determine the pubkey of the marketplace, you are right, it is obvious the comms are for marketplace actions.
@motorina0
The only way to make this work is to do what I did in lnurl/luds#203 and have an extra interaction round so that the stall tells the customer which pubkey to communicate with.
45.md
Outdated
"name": <String, stall name>, | ||
"description": <String (optional), stall description>, | ||
"currency": <String, currency used>, | ||
"shipping": [ |
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.
This feels very specific and inflexible. What if the items require a more complex shipping cost structure, such as a weight/country matrix, cart subtotal quota, etc? Realistically, the current shipping option does not work for most sellers.
I would suggest shipping
be optional, a simple string value describing the shipping costs.
Then, I would add a checkoutData
array similar in function to https://github.com/lnurl/luds/blob/luds/18.md
For example:
"checkoutData": {
"name": { mandatory: boolean, description: string },
"address": { mandatory: boolean, description: string },
"country": { mandatory: boolean, description: string }
}
And then, in the customer
order event, add the following to the payload:
"checkoutData": { "name" : "Kukks", "address": "17, Chocolate Street", "country": "Russia"}
This would also omit the shipping_id
and address
from customer order event
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.
What if the items require a more complex shipping cost structure, such as a weight/country matrix
- I agree it does not cover complex shipping scenarios (was not intended to)
- the solution (as far as this NIP goes) is for the merchant to send over DM to the customer any relevant information (like extra shipping cost for higher weights)
- use-cases for : gift cards, promotions, discounts (over a certain quantity), etc are not included in this NIP (but can be part of future NIPs)
I would suggest shipping be optional, a simple string value describing the shipping costs.
- the shipping cost can vary depending on the shipping zone (so more costs are possible)
- the
shipping zone id
is required, as the merchant cannot rely on the value (cost) sent by the client
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.
How can different pricing models be supported with this NIP? Subscriptions, Pay-per-use, etc? Would that logic live outside the nostr protocol in the client logic? |
I don't think this nip can be that explicit in its current state? Maybe subscriptions could be that the same stall can send a payment request to the request again after to renew the subscription? How would pay per use make sense in this flow? Maybe you just pay in advance and the product is just creditd for usage consumption? Any other model to consider? |
The value prop for these types of charging models is the "one-time-setup" of the agreement. If as a buyer, I have to keep approving requests that will be annoying. Of course, the client can just automate that for you but I want to be sure that this NIP is explicitly making that decision as there are tradeoffs. |
|
|
|
That is correct. There are these discussions for increasing the privacy of DMs in Nostr: There might be other propsals, that I'm not aware of. |
@motorina0 We don't have a way to differenciate test products from real ones, right? |
|
Shouldn't we have something like what we have for standard notes? Something like "report this item as testing product", because I guess right now 100% of products are test products and they will be there forever :) |
Can we just report them using the 1984 event kind? |
@motorina0 Should we have a message type so the merchant can tell the user "purchase rejected" for "this reasons... the address is not valid..." or whatever? Or that should be made using DMs from the merchant to the buyer? |
|
this is scary |
DMs should be used. It is possible that a different NIP will emerge covering the scenario you have mentioned. |
Where is the information about |
Don't you think it would be cool to have an "error" message from the merchant to the buyer? At least something that's going to happen a lot: the user tries to buy more stock than what is available because some other user bought some units. |
Sorry, |
|
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Based on Diagon Alley https://github.com/lnbits/Diagon-Alley
Adds a marketplace NIP. Clients being built here on @lnbits https://github.com/lnbits/nostrmarket