Return-Path: Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id A3083C0051 for ; Thu, 3 Sep 2020 10:51:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 90AF186B74 for ; Thu, 3 Sep 2020 10:51:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vVDuOiJbTHNA for ; Thu, 3 Sep 2020 10:51:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 7B0DC86A72 for ; Thu, 3 Sep 2020 10:51:02 +0000 (UTC) Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BhyK21t8XzDsyQ; Thu, 3 Sep 2020 03:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1599130262; bh=eFiRp1IUEkIL32UniFEGMpXu2nwXpvan+zP1h5peJm8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=eTpO9ctDN918xKrs2wAvlTww60dV3qJuMCL8GYQe5VNd9csaOnZO10vEGG6SdRmnr O1Vl5qcRbS4t2ltn2f2uSpi0Dg8zdNBojwcz6h2yWomvs25wHgpM5AbuUEWWGlsSfY EAQcaVxXnRwppjqZ7l3ojezDmoUyYOv+lFahqU9w= X-Riseup-User-ID: 65C532AC5EAB847D083D5DD08DD3FD01E71BE858A300ED6C027E2CA37EE0C098 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4BhyK140SXz8tqB; Thu, 3 Sep 2020 03:51:01 -0700 (PDT) To: ZmnSCPxj References: <813e51a1-4252-08c0-d42d-5cef32f684bc@riseup.net> <0ac3fecb-012b-e210-55bb-36809682634a@riseup.net> From: Chris Belcher Autocrypt: addr=belcher@riseup.net; prefer-encrypt=mutual; keydata= xsFNBFPk74oBEACzBLjd+Z5z7eimqPuObFTaJCTXP7fgZjgVwt+q94VQ2wM0ctk/Ft9w2A92 f14T7PiHaVDjHxrcW+6sw2VI2f60T8Tjf+b4701hIybluWL8DntG9BW19bZLmjAj7zkgektl YNDUrlYcQq2OEHm/MGk6Ajt2RA56aRKqoz22e+4ZA89gDgamxUAadul7AETSsgqOEUDI0FKR FODzoH65w1ien/DLkG1f76jd0XA6AxrESJVO0JzvkTnJGElBcA37rYaMmDi4DhG2MY4u63VE 8h6DyUXcRhmTZIAj+r+Ht+KMDiuiyQcKywCzzF/7Ui7YxqeAgjm5aPDU2E8X9Qd7cqHQzFM7 ZCqc9P6ENAk5a0JjHw0d0knApboSvkIJUB0j1xDIS0HaRlfHM4TPdOoDgnaXb7BvDfE+0zSz WkvAns9oJV6uWdnz5kllVCjgB/FXO4plyFCHhXikXjm1XuQyL8xV88OqgDFXwVhKrDL9Pknu sTchYm3BS2b5Xq1HQqToT3I2gRGTtDzZVZV0izCefJaDp1mf49k2cokDEfw9MroEj4A0Wfht 0J64pzlBYn/9zor5cZp/EAblLRDK6HKhSZArIiDR1RC7a6s7oTzmfn0suhKDdTzkbTAnDsPi Dokl58xoxz+JdYKjzVh98lpcvMPlbZ+LwIsgbdH4KZj7mVOsJwARAQABzR9DaHJpcyBCZWxj aGVyIDxmYWxzZUBlbWFpbC5jb20+wsF+BBMBAgAoBQJT5O+KAhsDBQkSzAMABgsJCAcDAgYV CAIJCgsEFgIDAQIeAQIXgAAKCRDvc06md/MRKS8jD/9P9fSYSIVjltL9brAMfIu7wJn0H0lX T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 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Detailed protocol design for routed multi-transaction CoinSwap X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2020 10:51:03 -0000 Hello ZmnSCPxj, On 03/09/2020 10:45, ZmnSCPxj wrote: > Good morning Chris, > >> A big downside is that it really ruins the property of allowing coins to >> remain unspent indefinitely. That has privacy implications: if a coin >> remains unspent for longer than 2 weeks (or another short locktime) then >> for sure the transaction was not a CoinSwap, and so the anonymity set of >> the CoinSwap system would be far smaller For this reason I'm pretty >> desperate to solve the vulnerability without losing the coins remaining >> unspent indefinitely feature. > > Ah, right.... accept no small privacy leaks! I'd argue its not even a small leak. A huge amount of coins remain unspent for weeks, months and years, and it would be great to add them to our CoinSwap anonymity set. And also have them benefit from CoinSwap's anonymity set even if they didn't use CoinSwap. > This seems a great solution! > > Since B is the one offering HTLCs, the taker of a CoinSwap sequence can be B as well. > This means, the taker has to have *some* collateral input, of at least value K, that it cannot swap (because if it tried to swap that amount, it would be unable to provide a collateral as well). > > How much does C need to know about the B collateralized contract transaction? > At the minimum, it has to know the output pays out to the correct contract, so it seems to me it has to know the entire B collateralized contract transaction, meaning it learns another input of B ("collateral(B)") that is not otherwise involved in the CoinSwap. > This is important, again, if B is a taker, as it means an unrelated input of B is now learned by C as having the same ownership as B. Yes, in fact that's why in my example I talk about a CoinSwap between two makers Bob and Charlie. Makers can be reasonably expected to own multiple UTXOs, but takers cannot. As you say because collateral payments breaks the ability of takers to sweep their entire wallet through CoinSwap. Happily, I think takers themselves don't need to use collateral payments. Here's an argument to why: Riskless theft attempts by the taker who no longer controls the coins actually isnt riskless or costless: Because it reduces the privacy of the previously-owned coins. If a taker genuinely wanted good privacy (Which, after all, they're paying for via miner fees and CoinSwap fees) then they would benefit if the coins they no longer own remain unspent for a long time, because it increases their anonymity set by making them hide among a greater crowd of coins which also don't get spent for a long time. Assuming that all peers, especially makers, deploy multiple redundant watchtowers then we can assume the success rate of such a theft attempt is very low. Because of the very low payoff, and privacy benefit of leaving coins unspent, then it can be argued that taker software which attempts such theft will never get popular. Of course this privacy argument only applies to takers, and if the CoinSwap contract is between two makers as part of a multi-transaction CoinSwap then it doesn't apply. So a maker-to-maker CoinSwap must use collateral payments. == Leak of first hop == Collateral inputs only applying to maker-maker CoinSwaps adds an additional information leak, which is that makers can now tell whether their previous peer was a taker or maker, based on whether they used a collateral input or not. This should be okay because the first maker doesn't know the final destination of the coins. This is similar to Tor, where this information is already leaked, for example when the user connects to a Tor bridge. The operator of the Tor bridge knows that everyone connecting to it is not a Tor relay node but an actual user. The operator of the tor bridge still has no idea where the user's internet traffic goes. Our situation is actually better than Tor, because in Tor the final relay always knows that they are an exit node, while the final maker in a CoinSwap might not know that. Also, if the taker does happen to own an extra UTXO, they may choose to use a collateral input anyway, just to pretend that they're a maker. Regards CB