summaryrefslogtreecommitdiff
path: root/0e
diff options
context:
space:
mode:
authorRyan Perkins <riperk@protonmail.com>2019-04-22 19:22:52 +0000
committerbitcoindev <bitcoindev@gnusha.org>2019-04-22 19:23:02 +0000
commitfd564e3c0a81731967f52b1b217f29bea4e61f4b (patch)
tree4f7d2b595308df4e71d14063a453361f58b631a1 /0e
parent4e85de36ef6968501ed2e73cd793e7a92d5183bd (diff)
downloadpi-bitcoindev-fd564e3c0a81731967f52b1b217f29bea4e61f4b.tar.gz
pi-bitcoindev-fd564e3c0a81731967f52b1b217f29bea4e61f4b.zip
[bitcoin-dev] CoinJoin Jigsaw
Diffstat (limited to '0e')
-rw-r--r--0e/39bb9718ad48c8f9484746f01e1ceb988ec56e85
1 files changed, 85 insertions, 0 deletions
diff --git a/0e/39bb9718ad48c8f9484746f01e1ceb988ec56e b/0e/39bb9718ad48c8f9484746f01e1ceb988ec56e
new file mode 100644
index 000000000..171a12f87
--- /dev/null
+++ b/0e/39bb9718ad48c8f9484746f01e1ceb988ec56e
@@ -0,0 +1,85 @@
+Return-Path: <riperk@protonmail.com>
+Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
+ [172.17.192.35])
+ by mail.linuxfoundation.org (Postfix) with ESMTPS id 9B64CD7F
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Mon, 22 Apr 2019 19:23:02 +0000 (UTC)
+X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
+Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch
+ [185.70.40.132])
+ by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D0501829
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Mon, 22 Apr 2019 19:23:01 +0000 (UTC)
+Date: Mon, 22 Apr 2019 19:22:52 +0000
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
+ s=default; t=1555960979;
+ bh=LdZLure/+KEalIxgiOA0P9E8XJAU3dYqGPU6S3qGIP4=;
+ h=Date:To:From:Cc:Reply-To:Subject:Feedback-ID:From;
+ b=DWNYpN0eucoX/7itCaCQU6Rer9S93VbPrP5/Sy+8YPyqonuAptNBIL1H/7Iu0VSM9
+ y1tMbimBLOX9iE1UrqY8LH4ynG6t93Oi2Ng3CjOfxmeAQ8jSaOg56MMJ129HDol7oh
+ mDGtykRbUUrIB9Ige35p6IWcUcKwp2Ae7+IvlAq8=
+To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
+From: Ryan Perkins <riperk@protonmail.com>
+Reply-To: Ryan Perkins <riperk@protonmail.com>
+Message-ID: <kZwZOekiYq3oxv7wgNj57KJqpOP0a2lkwM-TXsROtIDW5M8VunVV7majgvia4uo_bF3LxJn-8IOYN3IHBy25gjEN-OmPt-T47068L6s5ycE=@protonmail.com>
+Feedback-ID: RdfuD--Ffc-FNb_4UIG1XA3s5stj1f6Yt84KENdha_3WoiW3STYpu7X5uGR72LvTfQZpxEhSRHGSlNfV5XM5RA==:Ext:ProtonMail
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
+ DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM,
+ RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1
+X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
+ smtp1.linux-foundation.org
+X-Mailman-Approved-At: Tue, 23 Apr 2019 14:47:54 +0000
+Subject: [bitcoin-dev] CoinJoin Jigsaw
+X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
+X-Mailman-Version: 2.1.12
+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: Mon, 22 Apr 2019 19:23:02 -0000
+
+Earlier today ZmnSCPxj posted to the mailing list with an interesting post =
+about payjoin. In it he mentioned:
+
+> Any non-equal-value coinjoin is easily solvable via [value sudoku](https:=
+//www.coinjoinsudoku.com/advisory/).
+
+Which doesn't seem right to me.
+
+I came up with something I call a "CoinJoin Jigsaw". A "CoinJoin Jigsaw" is=
+ send-to-self coinjoin transaction in which every input is ambiguously asso=
+ciated with an output (i.e. every transaction input must belong to at least=
+ one subset of every output amount).
+
+
+For simplicity I've used minizinc to model this. To make it clean, I decide=
+d to model as two users (affectionately called 'A' and 'B') who trust a com=
+mon party to orchestrate the CoinJoin Jigsaw for them. A and B don't trust =
+each other, so they want to get all their money atomically in this one tran=
+saction. We also want the "CoinJoin Jigsaw" to have exactly 2 outputs. One =
+for A, and one for B. That way at first approximation it looks like a prett=
+y standard bitcoin payment. (Of course the problem is substantially easier =
+to solve if we allow A and B to have N outputs, but that creates an ugly tr=
+ansaction).
+
+We also need to make sure that both A and B are paying a fee proportional t=
+o the amount of inputs they added, and the total transaction fee is satisfa=
+ctory.
+
+So I've modelled it as A and B provide their utxo to the orchestrater. The =
+orchestrater will pick the largest subset of A's and B's utxo and such that=
+ satisfies our CoinJoin Jigsaw properties. I ended up copy-and-pasting a lo=
+t more than I'd like:
+
+https://gist.github.com/riperk/7be6698f291e865ad5c930d0edb0cd5a
+
+I'm not sure it has much practical utility, but it's kind of cool. Maybe.
+