<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-23&#xA;📝 Original message:Good morning  ZmnSCPxj,&#xA;&#xA;Thank you for your excellent feedback!&#xA;&#xA;Indeed, with a little protocol-level sugar so that the coins being swapped&#xA;get paid out of different pubkeys.&#xA;I read your article. Excellent idea on the randomized locktimes! I&#39;ve still&#xA;to read the details of what S6 amounts to but I&#39;m excited to.&#xA;&#xA;With regards to trying to tackle the problem of value-based correlations,&#xA;wouldn&#39;t it be possible to try to model the solution after the&#xA;equal-sum-subset problem (np complete problem)(&#xA;https://www.cs.mcgill.ca/~lyepre/pdf/assignment2-solutions/subsetSumNPCompleteness.pdf&#xA;)?&#xA;That is, a pair of individuals with a set of UTXOs that both add up to&#xA;similar if not equal value perform a swap of similar-(total)value sets. In&#xA;this way the values of the UTXOs can be broken up essentially at random&#xA;(following some nominal distribution so that it doesn&#39;t stand out; e.g.&#xA;https://en.wikipedia.org/wiki/Benford%27s_law), but swapped in conjunction&#xA;and decorrelated by using different keys + randomized locktimes.&#xA;&#xA;&#xA;Regards,&#xA;Germán&#xA;&#xA;On Thu, Apr 23, 2020 at 11:56 AM ZmnSCPxj &lt;ZmnSCPxj at protonmail.com&gt; wrote:&#xA;&#xA;&gt; Good morning Germán,&#xA;&gt;&#xA;&gt; It looks to me like this is CoinSwap with Schnorr Scriptless Scripts.&#xA;&gt;&#xA;&gt; * https://joinmarket.me/blog/blog/coinswaps/&#xA;&gt; *&#xA;&gt; https://joinmarket.me/blog/blog/flipping-the-scriptless-script-on-schnorr/&#xA;&gt;&#xA;&gt; I also recently put up an article on extending such a protocol across 3 or&#xA;&gt; more participants:&#xA;&gt;&#xA;&gt; * https://zmnscpxj.github.io/bitcoin/multiswap.html&#xA;&gt;&#xA;&gt; Regards,&#xA;&gt; ZmnSCPxj&#xA;&gt;&#xA;&gt; &gt; ## Objective&#xA;&gt; &gt; * Make atomic swaps within the same chain possible in a traceless way&#xA;&gt; &gt; * Achieving traceless same-chain atomic-swaps effectively turns an&#xA;&gt; entire chain into a  (P2PKH) mixer by default&#xA;&gt; &gt;&#xA;&gt; &gt; ## Proposed solution&#xA;&gt; &gt; Similar to the way that atomic swaps would work with schnorr signatures&#xA;&gt; (i.e. leveraging adaptor signatures), the proposed solution is to use - in&#xA;&gt; place of the secret &#39;t&#39; - a suitably chosen schnorr signature. The end&#xA;&gt; result being that when one counterparty claims their side of the funds, the&#xA;&gt; party can obtain the signature they&#39;re missing to claim the funds in the&#xA;&gt; (schnorr) multisig that pays them.&#xA;&gt; &gt; On-chain, this would appear like two independent transactions, even&#xA;&gt; though effectively the two parties have “exchanged” the history attached to&#xA;&gt; the UTXOs. Unlike a mixing service, in which all of the histories get&#xA;&gt; merged, with this protocol histories can be pairwise swapped without&#xA;&gt; anybody’s knowledge.&#xA;&gt; &gt;&#xA;&gt; &gt; ## Protocol description&#xA;&gt; &gt; * Alice and Bob, holding funds at UTXO1 (controlled by Alice) and UTXO2&#xA;&gt; (controlled by Bob) wish to swap them.&#xA;&gt; &gt; * Alice provides Bob with a single public key P_A&#xA;&gt; &gt; * Bob provides Alice two pubkeys P_B1, P_B2.&#xA;&gt; &gt; * Bob and Alice construct the P2PKH addresses Addr1 = Hash(P_A+P_B1)&#xA;&gt; [where the UTXO1 funds will be sent to eventually] and Addr2  =&#xA;&gt; Hash(P_A+P_B2) [where the UTXO2 funds will be sent to eventually]&#xA;&gt; &gt; * Bob and Alice exchange time-locked refund transactions for the funding&#xA;&gt; transactions sending the funds to Addr1 and Addr2.&#xA;&gt; &gt; * Bob and Alice submit the funding transactions (Alice pays to Addr1&#xA;&gt; from UTXO1; Bob pays to Addr2 from UTXO2)&#xA;&gt; &gt; * Alice sends Bob an adaptor signature: r1 + H(r1 | m)*x_a + r2 + H( r2&#xA;&gt; | m&#39;)*x_a&#xA;&gt; &gt; * Bob verifies the adaptor signature Alice sent contains a valid&#xA;&gt; signature for spending from Addr1 AND another valid signature for spending&#xA;&gt; from Addr2. Both signatures from Alice. Bob cannot separate out the two&#xA;&gt; signatures and hence cannot claim any of the funds, provided H( r1 | m) !=&#xA;&gt; H( r2 | m&#39;) in the signature commitment.&#xA;&gt; &gt; * Bob now sends Alice the valid signature: r2 + H( r2 | m&#39; )*x_b2&#xA;&gt; &gt; * Alice can now add her signature to Bob&#39;s and get: r2 + H( r2| m&#39;&#xA;&gt; )*(x_b2 + x_a) which is a valid signature to spend the funding transaction&#xA;&gt; sent to Addr2.&#xA;&gt; &gt; * Finally, Bob sees Alice claims the fund sent to Addr2 and uses that&#xA;&gt; signature to subtract his own: r2 + H( r2 | m&#39; )*(x_b2 + x_a) - (r2 + H( r2&#xA;&gt; | m&#39; )*x_b2) = H( r2 | m &#39;)*x_a&#xA;&gt; &gt; * Bob takes the original adaptor signature and subtracts the known&#xA;&gt; quantity r2+ H( r2 | m&#39; )*x_a, to get a valid signature: r1 + H( r1 | m&#xA;&gt; )*x_a&#xA;&gt; &gt; * Bob can now add to that valid signature, his own signature and&#xA;&gt; retrieve the funds.&#xA;&gt; &gt; ## Notes&#xA;&gt; &gt; * It is possible for the counterparty to store copies of the signatures&#xA;&gt; as proof that such a join has taken place. But plausible deniability is&#xA;&gt; available upon discarding signatures since the joint private keys (x_a +&#xA;&gt; x_b*) are unavailable.&#xA;&gt; &gt;&#xA;&gt; &gt; I&#39;m interested in hearing feedback on this idea if possible, and deemed&#xA;&gt; interesting enough.&#xA;&gt; &gt;&#xA;&gt; &gt; Best regards,&#xA;&gt; &gt; --&#xA;&gt; &gt; Germán&#xA;&gt; &gt; Mathematician&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&#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/20200423/dc5c6c2a/attachment-0001.html&gt;</html></oembed>