<oembed><type>rich</type><version>1.0</version><author_name>npub1pzahhguklemv3yzw3rszdkgy56999h235a9rfx5naxp63dwd6pns7x2ld8</author_name><author_url>https://nostr.ae/npub1pzahhguklemv3yzw3rszdkgy56999h235a9rfx5naxp63dwd6pns7x2ld8</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2020-04-22&#xA;📝 Original message:Hello All,&#xA;&#xA;## Objective&#xA;* Make atomic swaps within the same chain possible in a traceless way&#xA;* Achieving traceless same-chain atomic-swaps effectively turns an entire&#xA;chain into a  (P2PKH) mixer by default&#xA;&#xA;## Proposed solution&#xA;Similar to the way that atomic swaps would work with schnorr signatures&#xA;(i.e. leveraging adaptor signatures), the proposed solution is to use - in&#xA;place of the secret &#39;t&#39; - a suitably chosen schnorr signature. The end&#xA;result being that when one counterparty claims their side of the funds, the&#xA;party can obtain the signature they&#39;re missing to claim the funds in the&#xA;(schnorr) multisig that pays them.&#xA;On-chain, this would appear like two independent transactions, even though&#xA;effectively the two parties have “exchanged” the history attached to the&#xA;UTXOs. Unlike a mixing service, in which all of the histories get merged,&#xA;with this protocol histories can be pairwise swapped without anybody’s&#xA;knowledge.&#xA;&#xA;## Protocol description&#xA;* Alice and Bob, holding funds at UTXO1 (controlled by Alice) and UTXO2&#xA;(controlled by Bob) wish to swap them.&#xA;* Alice provides Bob with a single public key P_A&#xA;* Bob provides Alice two pubkeys P_B1, P_B2.&#xA;* Bob and Alice construct the P2PKH addresses Addr1 = Hash(P_A+P_B1) [where&#xA;the UTXO1 funds will be sent to eventually] and Addr2  = Hash(P_A+P_B2)&#xA;[where the UTXO2 funds will be sent to eventually]&#xA;* Bob and Alice exchange time-locked refund transactions for the funding&#xA;transactions sending the funds to Addr1 and Addr2.&#xA;* Bob and Alice submit the funding transactions (Alice pays to Addr1 from&#xA;UTXO1; Bob pays to Addr2 from UTXO2)&#xA;* Alice sends Bob an adaptor signature: r1 + H(r1 | m)*x_a + r2 + H( r2 |&#xA;m&#39;)*x_a&#xA;* Bob verifies the adaptor signature Alice sent contains a valid signature&#xA;for spending from Addr1 AND another valid signature for spending from&#xA;Addr2. Both signatures from Alice. Bob cannot separate out the two&#xA;signatures and hence cannot claim any of the funds, provided H( r1 | m) !=&#xA;H( r2 | m&#39;) in the signature commitment.&#xA;* Bob now sends Alice the valid signature: r2 + H( r2 | m&#39; )*x_b2&#xA;* Alice can now add her signature to Bob&#39;s and get: r2 + H( r2| m&#39;&#xA;)*(x_b2 + x_a) which is a valid signature to spend the funding transaction&#xA;sent to Addr2.&#xA;* Finally, Bob sees Alice claims the fund sent to Addr2 and uses that&#xA;signature to subtract his own: r2 + H( r2 | m&#39; )*(x_b2 + x_a) - (r2 + H( r2&#xA;| m&#39; )*x_b2) = H( r2 | m &#39;)*x_a&#xA;* Bob takes the original adaptor signature and subtracts the known quantity&#xA;r2+ H( r2 | m&#39; )*x_a, to get a valid signature: r1 + H( r1 | m )*x_a&#xA;* Bob can now add to that valid signature, his own signature and retrieve&#xA;the funds.&#xA;## Notes&#xA;* It is possible for the counterparty to store copies of the signatures as&#xA;proof that such a join has taken place. But plausible deniability is&#xA;available upon discarding signatures since the joint private keys (x_a +&#xA;x_b*) are unavailable.&#xA;&#xA;I&#39;m interested in hearing feedback on this idea if possible, and deemed&#xA;interesting enough.&#xA;&#xA;Best regards,&#xA;-- &#xA;Germán&#xA;Mathematician&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200422/1253207d/attachment.html&gt;</html></oembed>