<oembed><type>rich</type><version>1.0</version><author_name>npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_name><author_url>https://nostr.ae/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2019-12-17&#xA;📝 Original message:&#xA;Good morning list,&#xA;&#xA;As everyone who has ever used a Lightning wallet is well aware, the&#xA;onboarding process could be&#xA;made smoother. With Phoenix [1], we&#39;ve been experimenting with pay-to-open&#xA;[2].&#xA;&#xA;That works well in practice and provides a great UX for newcomers, but it&#xA;requires temporary trust&#xA;between the user and our node (until the funding tx confirms).&#xA;&#xA;That trust relationship appears in two places:&#xA;&#xA;a. The user releases the preimage, then we fund the channel [2]&#xA;b. The user trusts that we won&#39;t double-spend the funding transaction&#xA;&#xA;We currently need (a) because we can&#39;t ensure that the user will reveal the&#xA;preimage once we&#39;ve&#xA;funded the channel.&#xA;&#xA;It&#39;s (somewhat) easy to fix that once Bitcoin supports Schnorr.&#xA;Let&#39;s assume that we&#39;re using PTLCs (where the secret is a private key) and&#xA;MuSig for channel&#xA;funding transactions.&#xA;When Alice receives a PTLC to forward to Bob, if she doesn&#39;t have a channel&#xA;to Bob and Bob supports&#xA;pay-to-open, she can initiate a tweaked channel opening flow. She can use&#xA;tlv extensions in the&#xA;`open_channel` message to tell Bob that this channel is linked to a PTLC&#xA;with point `X=x*G`.&#xA;Bob will tweak the MuSig nonce with `X` and provide Alice with a partial&#xA;signature for that nonce.&#xA;When Bob then provides the adaptor signature to finalize the funding&#xA;transaction, it reveals `x` to&#xA;Alice who can now fulfill the PTLC downstream.&#xA;&#xA;Note that in this simple version, Alice knows the nonce tweak beforehand.&#xA;This may (or may not,&#xA;that will need to be investigated thoroughly) be a security issue.&#xA;Even if it turns out to be an issue, I&#39;m pretty sure we can find a secure&#xA;protocol that will allow&#xA;this atomicity (let&#39;s just add another round of communication, that&#39;s&#xA;usually how we fix broken&#xA;cryptographic protocols).&#xA;&#xA;I&#39;m more concerned about fixing (b). As long as the funding transaction is&#xA;unconfirmed, there&#39;s a&#xA;risk of double-spending by the funder. I&#39;m shamelessly trying to use this&#xA;mailing list&#39;s brainpower&#xA;to figure out possible solutions for that. Does someone have ideas that&#xA;could help? Can we setup&#xA;the incentives so that it&#39;s never rational for the funder to double-spend?&#xA;&#xA;Cheers,&#xA;Bastien&#xA;&#xA;[1] https://phoenix.acinq.co/&#xA;[2] https://medium.com/@ACINQ/phoenix-part-2-pay-to-open-4a8a482dd4d&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191217/9529e2b6/attachment.html&gt;</html></oembed>