Routing Attack

Attacks on the routing layer, from fee distortion to jamming and balance probing.

Basically

In plain words, attacks targeting Lightning Network payment routing, including fee manipulation, channel jamming, and balance probing.

Key Takeaways

  • Routing attacks exploit the Lightning Network's payment forwarding mechanics: attackers can lock up liquidity through HTLC jamming, discover private channel balances via probing, or manipulate routing fees to redirect traffic.
  • Channel jamming remains an unsolved problem: an attacker can disable routing nodes by filling their channel capacity or HTLC slots with payments that never settle, and the cost to the attacker is near zero.
  • Proposed mitigations include upfront fees, HTLC endorsement, reputation systems, and circuit breakers, but no single solution has been widely deployed yet, making routing resilience an active area of Lightning research.

What Is a Routing Attack?

A routing attack is any deliberate exploitation of the Lightning Network's payment routing infrastructure. Because Lightning payments traverse multiple hops between sender and receiver, each intermediary node becomes a potential target. Attackers can degrade routing performance, leak private balance information, or profit unfairly by manipulating how payments flow through the network.

Unlike on-chain Bitcoin attacks that require significant hash power or capital, many routing attacks are cheap to execute. The Lightning Network relies on nodes voluntarily forwarding payments and locking liquidity in HTLCs. This cooperative model creates attack surfaces that traditional payment networks avoid through centralized gatekeeping. Understanding these attacks is essential for node operators, wallet developers, and anyone building on Lightning infrastructure.

Routing attacks fall into three broad categories: jamming attacks that deny service, probing attacks that violate privacy, and fee manipulation attacks that distort economic incentives. Each exploits a different aspect of Lightning's onion-routed payment architecture.

How It Works

Channel Jamming

Channel jamming is the most studied routing attack and remains the Lightning Network's most significant unresolved vulnerability. The attacker sends payments through a target node's channels but deliberately prevents those payments from completing. This locks the target's inbound liquidity and HTLC slots, preventing the node from routing legitimate payments.

There are two distinct variants of channel jamming, each exploiting a different resource constraint:

Liquidity Jamming

Liquidity jamming targets channel capacity. The attacker routes large payments (or many medium-sized payments) through the victim's channels. By using hodl invoices or deliberately slow settlement, the attacker keeps HTLCs pending for as long as the timelock allows.

Consider a routing node with a 1 BTC channel. If an attacker routes 0.9 BTC through it via a hodl invoice, 90% of the channel's capacity is locked for the HTLC's entire duration. Legitimate payments requiring more than 0.1 BTC through that channel will fail.

The attacker controls both the sending and receiving nodes. Since the payment never completes, no routing fees are paid. The attack cost is limited to the capital the attacker must lock in their own channels and the on-chain fees to open them.

Slot Jamming

Slot jamming is more efficient than liquidity jamming because it targets HTLC slots rather than capacity. Each Lightning channel can only hold a limited number of concurrent HTLCs (typically 483 per direction, as defined in the BOLT specifications). The attacker fills these slots with tiny payments that never resolve.

Because the minimum HTLC amount can be as low as 1 satoshi, an attacker can jam 483 slots using fewer than 483 satoshis of locked capital per channel. This makes slot jamming extremely cheap: a few hundred sats can completely disable a channel's routing ability.

Balance Probing

Balance probing attacks exploit the error messages returned by failed payment attempts to determine channel balances. Although Lightning uses onion routing to protect payment paths, the error codes reveal whether a channel had sufficient balance to forward a specific amount.

The attacker constructs payments with invalid payment hashes (ensuring they always fail) and sends them through target channels at varying amounts. By performing a binary search on the amount, the attacker can determine the exact balance of any channel within a few dozen attempts:

This technique reveals the distribution of funds in a channel, which is supposed to be private. Knowledge of channel balances can be used to deanonymize payments, front-run routing opportunities, or identify high-value targets for other attacks. Research into PTLCs and blinded paths may reduce probing effectiveness over time.

Fee Manipulation

Fee manipulation attacks exploit the dynamic nature of Lightning routing fees. Nodes can change their fee policies at any time, and the network relies on gossip to propagate these updates. Attackers exploit the delay between fee changes and network-wide awareness:

These attacks are harder to detect than jamming because they resemble normal fee adjustments. The distinction between aggressive business strategy and malicious manipulation is often ambiguous.

Use Cases

Understanding routing attacks matters in several practical contexts:

Mitigations

Upfront Fees

The most discussed mitigation for channel jamming is upfront fees: a small, non-refundable payment charged for forwarding an HTLC, regardless of whether the payment succeeds. This makes jamming economically costly because each held HTLC now has a price.

The challenge is calibration. Fees high enough to deter jamming may also discourage legitimate payments, especially multi-hop routes where upfront fees accumulate at each hop. Research continues on models where upfront fees scale with hold time rather than being fixed.

HTLC Endorsement

HTLC endorsement is a reputation-based approach where nodes vouch for the quality of forwarded payments. A node marks an HTLC as "endorsed" based on the history of the peer that sent it. Nodes reserve a portion of their HTLC slots and liquidity exclusively for endorsed HTLCs.

This creates a two-tier system: endorsed payments get priority access to resources, while unendorsed payments use only unreserved capacity. An attacker who jams using unendorsed HTLCs can only consume the unreserved portion. To obtain endorsement, the attacker must build a positive reputation through legitimate forwarding, which has a real cost.

Circuit Breakers

Circuit breakers are local node policies that automatically restrict traffic from peers exhibiting suspicious behavior. If a peer sends an unusual volume of HTLCs that fail or take too long to resolve, the circuit breaker limits or blocks further HTLCs from that peer.

Circuit breakers are already deployable today as node plugins, making them the most practical immediate defense. However, they are reactive rather than preventive and can be circumvented by attackers who distribute their activity across many nodes.

Channel Reserve and Policy Tuning

Node operators can reduce their exposure by tuning channel parameters. Increasing the channel reserve reduces the amount of liquidity available for routing (and thus for jamming). Setting lower maximum HTLC values, shorter CLTV deltas, and higher minimum HTLC amounts all narrow the attack surface at the cost of reduced routing capability.

Risks and Considerations

Channel jamming is often described as the Lightning Network's most critical unsolved problem. The fundamental challenge is asymmetry: the cost to the attacker is near zero (only opportunity cost of locked capital), while the damage to routing nodes can be severe (complete loss of routing revenue and service disruption).

Privacy-focused mitigations can conflict with anti-jamming measures. For example, upfront fees require identifying the payer (at least to the first hop), and reputation systems inherently reduce anonymity. The tension between privacy and accountability shapes much of the ongoing research in this space.

Probing attacks highlight a broader challenge with Lightning privacy. While onion routing protects the identity of senders and receivers, it does not prevent observation of channel states. Solutions like blinded paths and payment decorrelation through PTLCs address different facets of this privacy gap but introduce their own complexity.

For builders on Lightning, routing attacks are not theoretical: they have been demonstrated in research and observed on the live network. Any application relying on Lightning routing should incorporate retry logic, path diversity via atomic multipath payments, and monitoring for abnormal routing behavior.

This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms