← Tech docs

How an idle channel finds a sellable price.

June 2026

When a channel is refilled, its outbound floor is set high enough to recoup the refill cost (last_refill_ppm × 1.1). That is the right price while the channel is forwarding. But a channel can end up priced out of its own market — the floor sits above what anyone will pay — and then it just sits there earning nothing. This note answers how a stuck channel gets walked back down to a price that actually sells. It ties together three moving parts: the clearing fee, the market multiplier, and the floor decay. The base layers it builds on are in how outbound fees get set.

What is the "clearing fee"?

The price a channel would rest at on pure demand signals, ignoring the refill-cost floor — the target the floor is trying to reach:

clearing = sigmoid(local_ratio) × (1 + market_multiplier)

The sigmoid is the base curve (low local → high fee to defend; high local → low fee to sell), and the multiplier is the slow demand adjustment in [-0.5, +1.0]; e.g. sigmoid=388 mult=-0.50 floor=2669(↓from 2861) → 2669. There the clearing fee is 388 × (1 − 0.5) ≈ 194 ppm and the floor, still at 2669, is the target it is heading toward.

How does the market multiplier track demand?

It is a coarse, volume-blind proxy for "is anyone forwarding through this channel," and it moves on two clocks:

  • Nightly drift. recompute_signals nudges ±0.15 — up if a forward landed in the last 24h, down if silent ≥3 days (or never forwarded), nothing in between — clamped to [−0.5, +1.0]. A channel silent for days steps down 0.15/night until it pins at the −0.5 floor and can go no lower.
  • Fast-drain bump. The 2h loop adds an up-only +0.40 when a channel is below 20% local and dropping forwards for lack of liquidity (an INSUFFICIENT_BALANCE event), capped at +1.0, applied the same cycle. Successful forwards drive the nightly +0.15; dropped forwards drive the intra-day +0.40. Nothing in the 2h loop ever lowers the multiplier.

It is volume-blind on purpose: a 1-sat forward bumps it exactly as much as a 1M-sat one. Past the +1.0 ceiling a hammered channel can defend no further with price — the leftover demand is lost revenue, and the real fix is more inbound liquidity, not a higher fee.

How does the floor walk toward that target?

The refill-cost floor is a ratchet, not a snap-back. While the channel is idle, the gap between the floor and the clearing fee halves on a fixed half-life:

new_floor = clearing + (old_floor − clearing) × 0.5 ^ (idle_days / FLOOR_DECAY_HALFLIFE_DAYS)

FLOOR_DECAY_HALFLIFE_DAYS = 3.0     # gap halves every 3 idle days
FLOOR_DECAY_IDLE_SECONDS  = 259200  # but only after 3 days of silence (grace)
FLOOR_DECAY_MIN_PPM       = 25      # never decays below this

Decay does not start until the channel has been silent for three days — a grace period before discounting — and never drops the floor below 25 ppm. It is time-based, recomputed every 2h run from dt = now − last_update, so the 2h cadence just samples a continuous curve; total decay over a day is the same however often it runs.

Why is it fast at first and slow at the end?

Because it is exponential: each step moves a fixed fraction of the remaining gap. E.g., starting from a floor of 2861 with a clearing fee of 194 (gap ≈ 2667), the first halvings shed hundreds of ppm per day. As the floor nears the clearing fee the gap shrinks, so each halving moves fewer absolute ppm — it crawls the last stretch and asymptotically approaches, never quite touching, the clearing price. The channel spends most of its discount budget getting into the sellable range quickly, then fine-tunes.

What happens the moment a forward lands?

This is the subtle part. Decay only runs while the channel is idle, and the inputs to the clearing fee only move while it is active, so the two states are mutually exclusive. A "forward" means an HTLC routed through the channel by someone else — your own outbound payments do not count. The instant one lands:

  • Decay pauses and the floor freezes at its current level — it does not snap back up to the full refill floor.
  • The floor stays frozen until 3 more days of silence, then decay resumes from the frozen level.
  • The floor re-arms to the full last_refill × 1.1 only on a fresh refill — a new cost to recoup — never on a forward.

The point is to avoid whipsawing a channel we just spent days discounting back up to an unsellable price the moment it makes one sale.

What if the channel is idle because it's empty?

Decay's whole diagnosis is "idle = priced too high". But a depleted channel is idle for a different reason: there is nothing left to sell. The two cases look identical in the forwarding log — and they are distinguishable in the failure log. A dropped forward (INSUFFICIENT_BALANCE) is a sender who already accepted the advertised fee — it is baked into their onion — but found the channel out of stock. That is demand at the current price, the one thing decay's diagnosis says doesn't exist.

So dropped forwards gate decay exactly like real forwards do: the floor decays only on true silence — no forwards and no drops for the idle window. Without this, a depleted channel whose price the market is actively validating would keep discounting anyway, and every sat the eventual refill delivers would sell below a proven price — dragging the channel's earned_ppm (and with it the rebalance budget cap) down and blocking the very refills that would fix it. Drops hold the floor; they never lift an already-decayed level back up (the no-whipsaw rule applies unchanged).

Can the target run away upward while we chase it?

No — and that is by construction. While the channel is idle, silence only pushes the multiplier down and the balance is static, so the clearing fee can only drift down or hold; it cannot rise above the floor without activity. A forward mid-decay both freezes the floor and (via the nightly busy bump, plus the drain lowering local_ratio) can lift the clearing fee above the frozen floor. When decay later resumes it converges toward the new, higher target — nudging the floor slightly up. That is intended: the channel proved it can sell and showed real demand, so the clearing price genuinely is higher than we had discounted to. Upward movement and active decay never coexist, so you never chase a target running away.

When does the decayed fee actually broadcast?

The floor level updates every 2h, but a fee only goes to LND when it clears the same hysteresis gate every fee change uses: skip if the move is both <10 ppm and <10% relative; otherwise a change ≥30 ppm always broadcasts (even inside the 6h cooldown), as does crossing a 20%/80% balance edge. So a fast-decaying channel shedding ~40+ ppm per cycle broadcasts every cycle, while a slow one moving ~10 ppm/cycle batches up under the cooldown and broadcasts roughly every 6 hours.

The three clocks, summarised

  • Floor decay — every 2h, time-based: down toward the clearing fee while truly silent ≥3 days (no forwards and no insufficient-balance drops); frozen by either; re-armed up only by a fresh refill.
  • Fast-drain mult bump (+0.40) — every 2h, only when a channel is depleted and dropping forwards: up only, capped at +1.0.
  • Routine mult drift (±0.15) — nightly: up if a forward in 24h, down if silent ≥3 days.

The net intent: a freshly refilled channel defends its cost while it is selling, and a priced-out channel is gently walked down to a price the market will actually pay — without whipsawing between the two.

Like the thinking? Run it on your own node.