Return-Path: Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 962D5C016F for ; Thu, 25 Jun 2020 04:04:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8C07085F4B for ; Thu, 25 Jun 2020 04:04:20 +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 gQkWn6QVMs0z for ; Thu, 25 Jun 2020 04:04:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-40137.protonmail.ch (mail-40137.protonmail.ch [185.70.40.137]) by fraxinus.osuosl.org (Postfix) with ESMTPS id B64FE85F46 for ; Thu, 25 Jun 2020 04:04:18 +0000 (UTC) Date: Thu, 25 Jun 2020 04:04:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1593057856; bh=VjIiSeUSquXSqzMjzFYAaLbN5qzmAgk8/qSiyTUB9pU=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=HZlJ+pbbr++hiPhSbnrhbf20w80BOHiNxiCd1KGrvZhMF8DN+bnJLbsGmSboTiq0j VnbPl1eH4ds1iOEyCPSVXARwB9YiHJLIUKDMBKgqQgG+H9MIPf923RyP2uZoo7FZQ+ qMkOGdyEsnlyfDDo8RGOoDbAXGJORCPDMP1EPtZ0= To: Nadav Ivgi From: ZmnSCPxj Reply-To: ZmnSCPxj Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Matan Yehieli , Bitcoin Protocol Discussion , Itay Tsabary Subject: Re: [bitcoin-dev] MAD-HTLC 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, 25 Jun 2020 04:04:20 -0000 Good morning Nadav, > > I and some number of Lightning devs consider this to be sufficient disi= ncentive to Bob not attacking in the first place. > > An additional disincentive could be introduced in the form of bribery pro= ofs for failed attempts. > > If we assume that "honest" users of the LN protocol won't reveal their ti= melocked transactions before reaching the timelock expiry (they shouldn't a= nyway because standard full node implementations won't relay them), we can = prove that Bob attempted bribery and failed to an outside observer by showi= ng Bob's signed timelocked transaction, spending an output that was in real= ity spent by a different transaction prior to the locktime expiry, which sh= ould not be possible if Bob had waited. Unfortunately this could be subject to an inversion of this attack. Alice can wait for the timelock to expire, then bribe miners to prevent con= firmation of the Bob timelocked transaction, getting the Alice hashlocked t= ransaction confirmed. Now of course you do mention "prior to the locktime expiry" but there is no= w risk at around locktime. Particularly, "natural" orphaned blocks and short-term chainsplits can exis= t. Bob might see that the locktime has arrived and broadcast the signed timelo= cked transaction, then Alice sees the locktime has not yet arrived (due to = short-term chainsplits/propagation delays) and broadcast the signed hashloc= ked transaction, then in the end the Alice side of the short-term chainspli= t is what solidifies into reality due to random chance on which miner wins = which block. Then Bob can now be accused of bribery, even though it acted innocently; it= broadcasted the timelock branch due to a natural chainsplit but Alice hash= locked branch got confirmed. Additional complications can be added on top to help mitigate this edge cas= e but more complex =3D=3D worse in general. For example it could "prior to locktime expiry" can ignore a few blocks bef= ore the actual timelock, but this might allow Bob to mount the attack by in= itiating its bribery behavior earlier by those few blocks. Finally, serious attackers would just use new pseudonyms, the important thi= ng is to make pseudonyms valuable and costly to lose, so it is considered s= ufficient that LN nodes need to have some commitment to the LN in the form = of actual channels (which are valuable, potentially money-earning construct= s, and costly to set up). Other HTLC-using systems, such as the "SwapMarket" being proposed by Chris = Belcher, could use similar disincentivizing; I know Chris is planning a fid= elity bond system for SwapMarket makers, for example, which would mimic the= properties of LN channels (costly to set up, money-earning). Regards, ZmnSCPxj