Skip to content

Bidirectional Upfront Payment and Type 2 Loop Attacks Mitigatiion #5

@ariard

Description

@ariard

I think a new dependency in the way routing nodes are accounting, advertising and verifying their fees must be underscored better before consider Bidirectional as "balance-safe" for intermediary hops.

Type 2 Loop Attacks are usually defined as long-held HTLCs by the final recipient or an intermediary hops thus freezing liquidity across all the links used by the payment path. This attack is made possible due to a fundamental building block of LN, a safety CLTV delta, deduced at each hop to allow in-order settlement of incoming/outgoing HTLCs. And thus avoiding a routing node to severe a balance disequilibrium across its relay links.

This liquidity timevalue is a resource like another and to prevent its abuse, its usage should be accounted as part of a relay cost structure. Along a payment-path, CLTV timelocks are higher on the topologically first links and thus routing fees required by those nodes will be higher.

Within context of Bidirectional, we should expect new hodl_fees to bind to the above routing fees computation, which may hinder a routing node's balance equilibrium.

E.g, with the following topology:

Alice ---> Bob ---> Caroll

Alice-Bob's HTLC nLocktime is superior to Bob-Caroll's one. H.a , "Alice's hodl_fee" required from Bob is superior to H.b "Bob's hodl_fee" required from Caroll.

Bob must correct this fee difference by a) advertise an unconditional fee F such as F - H.a > H.b and b) enforce that any payment routed through him commits to a F satisfying the equation.

It sounds like mitigating against Type 2 with Bidirectional will come with some change in the routing requirements. Routing fees for a given hop must integrate both incoming/outgoing channels' channel_update rather than only the incoming channel_update.

I don't see this as a blocker, but maybe a bit tricky to get it right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions