With NWC make_hold_invoice method created by nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3qamnwvaz7tmwdaehgu3wd4hk6tcqyqc8s25rywmunzch93dz4aeqdwuzs0r9t0ndmns3zvmprgpatughwgs7nyx I thought about a self-custodial P2P auction platform:
- Sellers sign up with nostr pubkey and a receive-only NWC connection secret that supports make_hold_invoice. They can then post items for auction
- Buyers sign up with nostr pubkey and pay for an item using any lightning wallet.
- Each time someone pays higher than the previous, the previous hold invoice can be cancelled
- Once the time remaining to claim the hold invoice is near to an end, the latest hold invoice will be settled and the buyer who paid for that item will win it. The seller and winning buyer can coordinate the delivery of the auctioned item via nostr messages.
The short time an invoice can be held (several hours) means that the item has to be quite active (multiple people outbidding per day) to ensure the auction does not end before users get a chance (this could be solved with autobids though, a nice NWC feature for buyers who connect their NWC wallet)
There is some trust in the seller needed (possibly done through web of trust)
hold invoice PR: https://github.com/nostr-protocol/nips/pull/1913
other ideas for hold invoices: https://blog.getalby.com/build-conditional-payment-logic-into-your-app/
Login to reply
Replies (3)
Cool idea Roland. Can you explain what happens in an outbidding scenario? If a bidding war is going on, do both parties need to keep paying the new, higher hodl invoices?
If bidder A has the highest bid and bidder B outbids, does cancel_hold_invoice return sats to bidder A’s wallet right away for him to outbid bidder B?
Thanks! Yes that’s right. The sats should be returned immediately
I had very similar idea to give the takers the option to auction an offer in bitblik, to give people a chance to bid and not only try to be fast and take the offer as the first person. Probably will implement this soon, with short time constraint depending on maker's preferences.