From ZmnSCPxj at protonmail.com Fri May 18 23:38:26 2018 From: ZmnSCPxj at protonmail.com (ZmnSCPxj) Date: Fri, 18 May 2018 19:38:26 -0400 Subject: [Lightning-dev] Mitigations for loop attacks In-Reply-To: <87in7lh6to.fsf@rustcorp.com.au> References: <871seljpak.fsf@rustcorp.com.au> <87efiesy58.fsf@rustcorp.com.au> <87in7lh6to.fsf@rustcorp.com.au> Message-ID: <4Zeivq4elwO5Jid4qUrW3bqFaK0F58zJ7qbKDtlKIj8T70UMcIlPIyVYs78hZC8CypX3ErnxdNHKhUZHX7ufNvwSFO5mvpiPTGyhEd4ZrQc=@protonmail.com> Good morning Rusty, > Also, you talked about reputation_loss_rate as being a private per-node > > thing, and being an explicit thing in the HTLC. I'm ignoring the > > former, and assuming the latter. Reputation (the score) is a private per-node thing, while the `reputation_loss_rate` is explicit in the HTLC. I am uncertain how that changes your analysis, though. In a line network like you showed, the reputation "bins" are Node1->Node2 and Node2->Node1 and so on. It may be more useful to think of the reputation bins as assigned to half-chans than to nodes. So the initial Mallory3->Node18->Mallory2 gives high reputation to half-chans Node18->Mallory3 and Node18->Mallory2, then sacrifices the Node18->Mallory3 reputation to destroy the NodeN -> NodeN+1 and NodeN+1->NodeN reputations. Along that line, reputation lost is higher as N increases. Graphing reputation lost along that line, we form a triangle, and the area of the triangle is the total reputation destroyed. Only the length of one edge of the triangle is what is lost by the Node18->Mallory3 reputation score. So yes, it seems you are correct here. Regards, ZmnSCPxj