Good morning VzxPLnHqr,

This certainly seems workable.

I first encountered similar ideas when people were asking about how to 
implement a vending machine with Lightning, with the vending machine being 
offline and not having any keys.

The idea was to have the vending machine record pregenerated invoices with 
their hashes.
Then a separate online machine (disconnected from the vending machine) would 
operate a LN node and receive the payment, releasing the preimage.
The payer would then enter the preimage into the vending machine, which would 
validate it and release the item being vended.

Under your framework, the vending machine operates as the Courier, except it 
has a fixed geographical location and the Paul goes to the Courier (vending 
machine) to get their item.

Regards,
ZmnSCPxj

> Dear Lightning-dev,
>
> I would like to share some initial research and ask for some feedback. 
> https://github.com/VzxPLnHqr/discreet-physical-delivery-protocol is a 
> repository to gather some thoughts around how it might be possible to utilize 
> some of the current features (hodl invoices), and/or forthcoming features 
> (payment points? dlcs?) of lightning to create a robust, reasonably private, 
> and incentive-compatible network for physical delivery of items.
>
> There has been mention of using hodl invoices for atomic item delivery[1]. 
> However, I seem to remember reading that, essentially, hodl invoices (e.g. 
> invoices which may not settle for quite some time, if ever) are also the 
> primary culprit for some attacks on the network?
>
> Does lightning in a post-taproot world solve any of these issues?
>
> There is some motivation given in the readme for why such a protocol may be 
> desirable, but as quick refresher for those reading who may not be familiar 
> with how lightning and hodl invoices can be used for atomic package delivery:
>
> 0. Merchant Mary operates an e-commerce website and Purchaser Paul would like 
> to buy something and have it delivered. For initial simplicity, assume that 
> both Paul and Mary have a relationship with Charlie, an independent Courier 
> (e.g. neither Paul nor Mary is playing the role of Charlie, but Charlie knows 
> the geographical locations of both).
>
> 1. During checkout, Paul generates preimage and sends hash of preimage to Mary
> Mary creates a hodl invoice invoice0 with hash. The amount of the invoice 
> includes the cost of shipment as quoted to Mary by Courier Charlie. Paul pays 
> invoice0, but Mary cannot yet settle it because preimage is still unknown to 
> Mary.
>
> 2. Merchant Mary now sends hash to Charlie and Charlie creates another hodl 
> invoice invoice1 (for the delivery costs). Mary pays it and gives the 
> physical package to Charlie.
>
> 3. Charlie now has the package and delivers it to Paul.
>
> 4. Upon delivery, Paul gives preimage to Charlie who now can use it to settle 
> his outstanding invoice (invoice1) with Mary, thereby revealing preimage to 
> Mary who then settles her outstanding invoice0 with Paul.
>
> Taking the above, allowing it to be multi-hop (multiple Couriers) and 
> blinding the physical location from one hop to the next, is non-trivial but 
> seems doable. Some of you may have thought a lot more about these types of of 
> protocols (digital-meets-physical-world) already, so please chime in!
>
> Warm Regards,
> -VzxPLnHqr
>
> [1] https://wiki.ion.radar.tech/tech/research/hodl-invoice (though, I think 
> first proposed by Joost?)
> --
> Sent with Tutanota, the secure & ad-free mailbox:
> https://tutanota.com


_______________________________________________
Lightning-dev mailing list
Lightning-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev

Reply via email to