summaryrefslogtreecommitdiff
path: root/c5/c8e5a9c4eaf4a5618e016178be5e2fc675ce82
blob: fdd5863586f5539b2050aab53f0614667b7fa18a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Return-Path: <ZmnSCPxj@protonmail.com>
Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 419CFC016E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat,  6 Jun 2020 04:25:24 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by whitealder.osuosl.org (Postfix) with ESMTP id 279F688420
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat,  6 Jun 2020 04:25:24 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from whitealder.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id pvVE2H1eqKvE
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat,  6 Jun 2020 04:25:22 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-40140.protonmail.ch (mail-40140.protonmail.ch
 [185.70.40.140])
 by whitealder.osuosl.org (Postfix) with ESMTPS id 34F9788418
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat,  6 Jun 2020 04:25:22 +0000 (UTC)
Date: Sat, 06 Jun 2020 04:25:11 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1591417519;
 bh=fTbQCbXBVa+i9FuSXmZyiy5oEOoksJGHW7sHF0netfg=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=UdtoAqaqckTrwOsei8DYQVSrYp0O/XgaECE6ZIvHB7P7aSyxlFIyzko87YXuV5cfh
 VWsGhpapMbAH2SOVBJNtr2ouGj1J+JJgNVyrkhMVHVDt3omyYIeUck0A+eFyxeHkel
 tqmIGS4e5/nSzd5SoFk5GX9/LEP6lXk6pXz/biOU=
To: ZmnSCPxj <ZmnSCPxj@protonmail.com>,
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Reply-To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Message-ID: <vhscPyFtc4oFhH00vCo8SZTJqUzET3Pv5F0O2rPOiEcCIVfA1Xa-Ea1cSCWzSiLxkEOcYGsSWdGl9yycfRvGZlM2KoPomsSQ0PH3--c9YBQ=@protonmail.com>
In-Reply-To: <xNdzEDklg3DOAHpaOhPlacvkhr6Nfk6-oR6YAbqsMJiYc2QM837LAgwXpuIqyy6M6mZyk2zcZQqUWTlYky6MoAG_0ecupIygmSGDHuppa_4=@protonmail.com>
References: <82d90d57-ad07-fc7d-4aca-2b227ac2068d@riseup.net>
 <CAPv7TjY9h8n-nK_CPiYCWYDcbXpT1gfRMQDgf9VUkcR532rxOw@mail.gmail.com>
 <VxL93WE7bDrK1riquTWTTEgJj9mDQ4W5CuhOgdnnDPeidw2ho6evVh4cLZLz0jEYMqejaD1tiLULVTXkNRbI5A7wSwV49qSwnXcTWCDJ96E=@protonmail.com>
 <cbf78f63-cf8c-c5d8-06ea-afc79aabc23c@riseup.net>
 <5LiZqpFxklAAbGFiiAE3ijRbIteODXKcHrXvGJ-qabgQj5hG8beFtHNbVZ-XUxETVwduJYz94UYuJGAPxBrbGeZpSClUtXYsPJBABfr03KM=@protonmail.com>
 <e724b4c5-9efd-66c4-163b-492f17cafd7d@riseup.net>
 <Sy14DpcFGdAYL95d7e6tfkOe87oY53tJReo9CYvPT5J3Gb85AqedMheq1NbfVKUXZtZrwZqwVV4wSztikgWBAgNfTh8J5h5gXC6HDMxvsNg=@protonmail.com>
 <xNdzEDklg3DOAHpaOhPlacvkhr6Nfk6-oR6YAbqsMJiYc2QM837LAgwXpuIqyy6M6mZyk2zcZQqUWTlYky6MoAG_0ecupIygmSGDHuppa_4=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [bitcoin-dev] Design for a CoinSwap implementation for
	massively improving Bitcoin privacy and fungibility
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Sat, 06 Jun 2020 04:25:24 -0000

Good morning a third time Chris,

Now unrelated to the funding order, but one of the reasons why timeliness i=
s desirable for CoinSwap is that if possible, we want to ensure that sends =
from a user wallet are not correlatable with receives into that wallet.
Thus, there is the strong suggestion that before sending to a payee, the us=
er wallet should swap, then use the swapped funds to pay the payee, i.e. sw=
ap-on-pay.
JoinMarket does this in `sendpayment.py`, for example, and this is the reco=
mmended way to perform payments out of the JoinMarket wallet.

Let me propose an alternative: swap-on-receive+swap-on-change.

ZeroLink already suggests that wallets maintain two internal wallets: a pre=
-mix wallet and a post-mix wallet.
With swap-on-receive, when the user wants a receive address, the wallet get=
s it from the pre-mix wallet address.
Then, when wallet notices any unspent funds on any pre-mix wallet address, =
the wallet automatically swaps it into the post-mix wallet.
This is swap-on-receive.
Long-term HODLing goes into post-mix wallet addresses.

Then, when sending, the wallet selects from the post-mix wallet coins, and =
spends those coins directly into the payee address.
If there is no exact amount, it has to have change.
The change output does *not* go to the pre-mix or post-mix wallet address.
Instead, it goes to a 2-of-2 funding outpoint for a new swap immediately.

This lets the payee receive its funds quickly, as soon as the transaction c=
onfirms, without waiting for the CoinSwap to complete.
Of course, the user now has to be online to *fully* receive funds (the user=
 cannot spend the funds until it is in the post-mix wallet).

Regards,
ZmnSCPxj