Channel Highlighter

This feature enables you to write simple expressions to highlight channels. This is extremely useful to unearth vital information about your channels, and their performance.

Lightning > Channels > Highlighter

It is important to familiarize yourself with the Channel Highlighter as a stepping stone towards using Automated Fees and Automated Rebalancing.


The syntax is a Python expression; it is simply evaluated against all channels by being put through an eval; if the expression evaluates as True then the channel is highlighted, if False then it isn’t.

The expression is re-run every 30 seconds, so as channel attributes change, so do the highlights.

The expression has access to the channel (or c object for short). That is, the object. You can refer to to see all the attributes available. However we’ll try and cover the most common ones here.

By alias

Let’s say you want to highlight all your LNBIG channels:

'LNBIG' in c.alias

By pubkey

Highlighting channels by pubkey will be very useful later on, to ignore specific channels during rebalances for example:

c.remote_pubkey == '021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d'

By Channel ID

c.chan_id == 785824259055878146

Inactive channels


Or == False

Unbalanced channels

Highlighting low outbound channels can be done using either ratios or absolute sat values.

c.ratio < 0.1

The channel ratio is the channel’s: local balance / capacity. By default, local balance doesn’t including pending remote HTLCs, so this would result in your channel highlights blinking as HTLCs make the ratio cross the 0.1 threshold. To mitigate for this behavior, you can use:

c.ratio_include_pending < 0.1

Unbalanced channels using balanced ratios

Orb interally computes the ideal ratios for your channels; these are referred to as the balanced ratios. If all your channels are at their balanced ratios, then your node is perfectly balanced.

The following highlights all your channels who’s ratios are below their balanced ratios:

c.ratio < c.balanced_ratio

Likewise with channels with ratios above their balanced ratios:

c.ratio > c.balanced_ratio

Unbalanced channels using absolute sat values

The following expression highlights channels with less than 100k sats.

c.local_balance < 100_000

Once again, if you’d like to include pending HTLCs to avoid blinking highlights:

c.local_balance_include_pending < 100_000

Channels that are in profit

Orb deducts rebalances from a channel’s profit, thus it enables you to select profitable channels:

c.profit > 1000

Channels that are earning

Orb internally tracks transactions and payments, and exposes that information for easy access. Thus highlighting channels that made more than 1000 sats in routing fees is easy:

c.earned > 1000

If you often connect to drains, then your channels may be better at routing in than out, in which case you can use:

c.helped_earn > 100_000

Channels that are earning both ways

By combining expressions, we can find channels that earn both in and outbound:

c.earned > 1000 and c.helped_earn > 100_000

Channels that are not earning

Orb can easily help you identify channels that are not earning, and therefore ought to be closed:

c.earned < 1000 and c.helped_earn < 10_000

By capacity

You can highlight very large, or small channels:

c.capacity >= 100_000_000

Or channels between certain capacities:

c.capacity >= 1_000_000 and c.capacity <= 1_000_000

Pending HTLCs

c.pending_htlcs != []

Pending in

[x for x in c.pending_htlcs if x.incoming] != []

Pending out

[x for x in c.pending_htlcs if not x.incoming] != []

With satoshis sent / received

c.total_satoshis_sent > 1_000_000
c.total_satoshis_received > 1_000_000

Unsettled balance

c.unsettled_balance > 1_000_000

Commit fee

c.commit_fee > 1000


not c.initiator

Balanced ratio

c.balanced_ratio <= 0.1

Fee Rate

c.fee_rate_milli_msat <= 100_000

Time Lock Delta

c.time_lock_delta >= 40


c.min_htlc_msat > 1_000


c.max_htlc_msat > 1_000_000_000

Fee Base

c.fee_base_msat > 100_000