Weighted Packet Selection for Rechargeable Links: Complexity and Approximation

Stefan Schmid, Jakub Svoboda, Michelle YeoarXiv 2022

Abstract

We consider a natural problem dealing with weighted packet selection across a rechargeable link, which finds applications in cryptocurrency networks. The capacity of a link $(u,v)$ is determined by how much players $u$ and $v$ allocate for this link. Given a packet of weight $x$ going from $u$ to $v$, player $u$ can either accept or reject it. Acceptance decreases $u$'s capacity and increases $v$'s capacity by $x$. Rejection entails a cost linear in the weight. The goal is to minimize the sum of the initial capacity injected and the cost of rejecting packets. We show the problem is NP-hard but can be approximated with a ratio of $(1+ \varepsilon)\cdot (1+\sqrt{3})$.

What Problem Does This Paper Address?

In traditional communication networks, link capacity is usually static and independent for each direction. However, in "rechargeable" networks—most notably Payment Channel Networks (PCNs) like the Lightning Network—the capacity is a zero-sum game.

Imagine a link between Alice ($u$) and Bob ($v$). If Alice sends a 10-unit payment to Bob, her capacity decreases by 10, but Bob’s capacity to send back to Alice increases by 10. The total capacity of the link remains constant, but the "balance" shifts.

Initial capacity allocation on a link (u,v) with b_u=10 and b_v=7.

The challenge arises when a sequence of weighted packets arrives. A node must decide whether to accept or reject each packet. Accepting a packet consumes local capacity but enables future packets in the opposite direction; rejecting a packet incurs a cost. The goal is to find the optimal initial capacity allocation and packet selection strategy to minimize the total cost (initial capacity + rejection penalties).

The state of the link after node u accepts a packet of weight 10, shifting the balance to b_u=0 and b_v=17.

Methods

The authors tackle the problem through a combination of complexity theory and algorithmic design:

  1. Hardness Proof: They demonstrate that the problem is NP-hard via a reduction from the Subset Sum problem.
  2. Linear Programming (LP) Relaxation: To find an approximate solution, they first formulate a linear program that allows for "fractional" packets. The solution to this LP serves as a lower bound for the optimal cost.
  3. Capacity Approximation: Since the optimal total capacity $M$ isn't known upfront, the algorithm performs a geometric search over possible capacity values.
  4. Rounding and Pruning: The core approach uses the LP solution to make integral (yes/no) decisions. It tracks the link's state through "balanced," "left," and "right" phases, using specialized functions to strategically prune packets and maintain a strict approximation ratio.

Key Insights and Results

  • The Rechargeable Twist: Routing a packet isn't just a cost; it's a reconfiguration of the network's future ability to route.
  • The $1+\sqrt{3}$ Factor: The approximation ratio of $\approx 2.73$ emerges from the mathematical balancing act between the cost of providing initial "liquidity" and the opportunity cost of rejecting transactions.
  • Efficiency: The algorithm runs in polynomial time, specifically $O(n^\omega \cdot \frac{1}{\epsilon} \cdot \log \frac{M_{max}}{x_{min}})$, where $n$ is the number of packets.
  • Cyclic Redistribution: Nodes can "rebalance" their capacity by sending funds around a cycle, significantly lowering costs compared to isolated links.

Limitations and Future Work

While the authors provide an upper bound, a matching lower bound is still missing. Furthermore, this paper focuses on the offline problem where the packet sequence is known. Future work involves developing "competitive" online algorithms for real-time packet arrival and validating these models in live PCNs like the Lightning Network.

Note: This is a theoretical paper; no empirical datasets or benchmarks were used for training or evaluation.

Summary updated

Abstract

We consider a natural problem dealing with weighted packet selection across a rechargeable link, which e.g., finds applications in cryptocurrency networks. The capacity of a link $(u,v)$ is determined by how much players $u$ and $v$ allocate for this link. Specifically, the input is a finite ordered sequence of packets that arrive in both directions along a link. Given $(u, v)$ and a packet of weight $x$ going from $u$ to $v$, player $u$ can either accept or reject the packet. If player $u$ accepts the packet, their capacity on link $(u,v)$ decreases by $x$. Correspondingly, player $v$ capacity on $(u,v)$ increases by $x$. If a player rejects the packet, this will entail a cost linear in the weight of the packet. A link is "rechargeable" in the sense that the total capacity of the link has to remain constant, but the allocation of capacity at the ends of the link can depend arbitrarily on players' decisions. The goal is to minimise the sum of the capacity injected into the link and the cost of rejecting packets. We show the problem is NP-hard, but can be approximated efficiently with a ratio of $(1+ \varepsilon)\cdot (1+\sqrt{3})$ for some arbitrary $\varepsilon >0$.
BibTeX
@misc{schmid2022weighted,
  author = {Stefan Schmid and Jakub Svoboda and Michelle Yeo},
  title = {{Weighted Packet Selection for Rechargeable Links: Complexity and Approximation}},
  year = {2022},
  eprint = {2204.13459},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.13459},
}
Figure