Lightning Network Economics: Topology I: A Cost-Minimizing Lightning Network Is Bipartite, with All Net Flows from One Side to the OtherResearch Paper
Why the topology of payment-channel networks matters
The Lightning Network (LN) is a second-layer payment system for Bitcoin. Instead of recording every payment on the blockchain, two parties lock funds in a payment channel and settle many payments off-chain; payments between parties without a common channel are routed along paths of channels. Locking funds is costly, and the amount a channel needs grows with the net flow it carries. Which channel topology supports a given pattern of payments at least total cost is therefore an economic design question for the network's participants.
Guasoni, Huberman and Shikhelman (SSRN 4439190, 2023; published in Management Science, 2024) study this question for a general cost function, assuming only a few qualitative properties derived in their earlier work on channel economics ([GHS22], Lightning Network Economics: Channels). This mission covers §3.1 of the paper, local channel reconfiguration: a relaying node can be bypassed at lower cost, odd cycles are never optimal, and a cost-minimizing network is bipartite with every net flow going from one side to the other. Three companion missions (II–IV of this series) cover hermetization by a routing hub (§3.2) and bounds on the global minimal cost (§3.3).
Setting
Let be a finite set of nodes. A payment flow is a vector of net flows with . A Lightning Network on is an anti-symmetric real matrix , , where is the net flow from to in the channel between them and means there is no channel. The network supports if
A channel cost function is with
- (MO) for ;
- (SY) ;
- (CI) ;
- (SA) for .
The cost of a network is , the sum of over its channels. A network is cost-minimizing for if it supports and no Lightning Network on the same node set that supports has smaller cost.
The paper's channel notation: is a channel with net flow from to , and is a channel in which sends and sends , so the net flow from to is .
Formalization targets
Goal: Corollary 3.3
If is cost-minimizing for , there is a set with such that the channel graph ( iff ) is bipartite with parts , and
The statement is conditional and does not assert that a minimizer exists.
Milestones
- Theorem 3.1. For distinct and , the structure is not cost-minimizing; if the structure supports the same flow at strictly lower cost, and if so does .
- The in-and-out claim (proof of Corollary 3.2). In an arbitrary network supporting , if and for some , the network is not cost-minimizing.
- Corollary 3.2. A network containing a cycle of odd length is not cost-minimizing.
- Corollary 3.11 (a sibling corollary of Theorem 3.1, not on the path to the goal). If for distinct , , no star network is cost-minimizing.
Significance
Corollary 3.3 says that in an optimal Lightning Network every node is a pure sender or a pure receiver, and that no node relays payments. This sits in tension with the observed LN, which is organized around large routing hubs; the paper reconciles the two in §3.2 by allowing new nodes. Corollary 3.11 shows that the star, the intuitive candidate for a cheapest topology, is optimal only with a single net payer or a single net payee.
The results are proved in the paper, with short arguments in its Appendix A, and they have no machine-checked proof. This mission adds a precise version of the model, in which the meaning of "cost-minimizing", the sign conventions and the corrected cost axioms are fixed, and a formal proof of the chain Theorem 3.1 → odd cycles → bipartite structure for an arbitrary cost function satisfying the axioms.
Difficulty
Theorem 3.1 on its own is a two-line computation. The difficulty is in applying it inside an arbitrary network. When and already share a channel, adding or to it requires for reals of either sign. That inequality is not among the axioms and has to be derived from them. The odd-cycle step needs a pigeonhole argument on channel orientations around a cycle. The bipartite step needs either König's characterization of bipartite graphs or a direct construction of the parts from the flow directions. The naive formalization that re-states Theorem 3.1 only for a network with exactly two channels does not reach the corollaries.
Formalization scope
- The node set is an arbitrary finite type
V, not . The matrix isΛ : V → V → ℝ, becauseλis a Lean keyword. - Sign convention. Support is the row-sum display of §2.1, under which a net payer has . The paper's examples (§2, Figure 1, proof of Theorem 3.1) use the opposite sign. Every statement here is invariant under , and Theorem 3.1 is stated with "the same flow" given by
Supports, which is independent of the sign. - Cost is the form , which needs no order on .
- Cost-minimizing compares with networks on the same node set ; a network with an added hub (§3.2) is not an alternative.
- Axiom correction (SA). The paper prints (SA) as " for ", which fails at , so every theorem would hold vacuously. The formalization uses , the form verified in Appendix D. The stronger axiom (SA+) is not used in this mission.
- Cycles are injective maps
Fin k → V, odd, with cyclic successorfinRotate k. A channel is a nonzero entry in either direction. - Bipartite is Mathlib's
SimpleGraph.IsBipartiteWith A Aᶜon the channel graph, with the flow-direction clause stated separately as the stronger content. - The star is the network whose only channels join each to the hub with net flow ; Corollary 3.11 assumes .
Trivializing formalizations are ruled out: the cost function is arbitrary subject to the axioms (no or linear cost); cost-minimization ranges over all networks on , not over a fixed edge set; is not fixed to three nodes; the in-and-out claim is stated for arbitrary networks; and and are complementary, so they cannot overlap.
König's theorem is in Mathlib (SimpleGraph.two_colorable_iff_forall_loop_even) and proved on the platform (FamousTheorems.two_colorable_iff_no_odd_cycle_6b), so it is not posed here. The derived two-sided subadditivity of , and a lemma rerouting a relayed flow inside an arbitrary network, are reusable in the other missions of the series. Contributions of such auxiliary lemmas are welcome.
Selected references
- P. Guasoni, G. Huberman, C. Shikhelman, Lightning Network Economics: Topology, SSRN working paper 4439190, version of February 3, 2023. https://ssrn.com/abstract=4439190 (published in Management Science, 2024, https://doi.org/10.1287/mnsc.2023.03872).
- P. Guasoni, G. Huberman, C. Shikhelman, Lightning Network Economics: Channels, working paper, 2022 ([GHS22] in the paper; the source of the cost axioms).
- D. Kőnig, Theorie der endlichen und unendlichen Graphen, Akademische Verlagsgesellschaft, Leipzig, 1936.
- J. Poon, T. Dryja, The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments, 2015 (as cited in the paper). https://lightning.network/lightning-network-paper.pdf