From cjp at ultimatestunts.nl Wed Jun 27 19:56:11 2018 From: cjp at ultimatestunts.nl (CJP) Date: Wed, 27 Jun 2018 21:56:11 +0200 Subject: [Lightning-dev] SPSP: Simple Protocol for Spontaneous Payments Message-ID: <1530129371.7954.3.camel@ultimatestunts.nl> Hi, Currently, in Lightning, you need to get an invoice from the receiver to be able to send a payment. But what if you want to do a payment spontaneously, e.g. as a gift? I just realized this use case can be met in quite a simple way. You simply route the payment to the receiver's Lightning node (so you do need to know the node ID). The routing message to the receiver's node is of a special form, and includes the preimage. It might also contain some (small!) other data: maybe the hash of a signed description? Anyway, if the receiver's node recognizes this routing message format, it can then use the preimage to finish the transaction. It may also cancel the transaction instead, if the node owner doesn't want to receive unsolicited money. The fun thing is, none of the intermediate nodes can use the preimage to steal funds, since the routing data is encrypted. I do realize that spontaneous payments can also be done with a "payment to self" that just happens to give a very large fee to a particular intermediate node. The new protocol has the advantages that it doesn't need the second half of the route (back to self), it is clear to the receiving node that this is in fact intended as a payment, and you may be able to include a small message. CJP