🛠️ Tech docs

Under the hood

How the toolkit thinks and how it works — the design calls behind it and the mechanics of the moving parts. Written to be reviewed and argued with.

Design notes

The reasoning behind the main design decisions, and the trade-offs taken.

June 2026

How the pieces fit together.

The whole picture in one diagram — node, engine, database, CLI, cron, the HTLC listener, Claude, Telegram and dashboard — and exactly how each part talks to the others.

Read →
June 2026

How outbound fees get set.

The layered fee calculation — sigmoid base, market multiplier, soft cost floor, hysteresis — with the real defaults, and why one input always wins rather than a blend.

Read →
June 2026

How an idle channel finds a sellable price.

The floor decay, the market-clearing target, the fast-drain bump and freeze-on-forward — how a priced-out channel is walked back down to a price the market will pay.

Read →
June 2026

Budgeting rebalances.

How the refill budget anchors to one measured price, escalates on failure, is capped by a profitability gate, and how a QueryRoutes dry-run reads the live route price to land an affordable refill now or skip one no route can settle — chunking on liquidity limits, flagging channels that can't be profitably refilled.

Read →
June 2026

Primary and fallback rebalance routes.

How the planner lays out one primary route per depleted channel plus fallbacks, then lets two ledgers — not branches — decide which actually fire.

Read →
June 2026

Inbound fees and the liquidity ladder.

Why a channel that can't be profitably rebalanced is defended with a negative inbound fee, how the discount is sized and capped to keep the summed forward fee positive, and the rebalance → discount → structural ladder.

Read →
June 2026

How to clear a structural flag.

What the structural-liquidity flag means, the three ways it clears, the auto-loop blind spot that makes it persist on a steady sink, and the one recovery case (refill-to-healthy) it deliberately ignores.

Read →
June 2026

Choosing peers.

Why peer ranking is tier-segmented, how centrality prefilters and 2-hop diversity reranks the candidates (all from a nightly-cached graph), why fee level is left out — and the targeted suggest_peers finder that names the exact peer to open toward a draining sink, QueryRoutes-validated.

Read →
June 2026

What the dashboard shows, card by card.

A walk through the ⚡ LND Health dashboard — every card top to bottom: node status, balances, per-channel P&L, off-site backup, the lost-revenue watch, sat-flow map, rebalances and alerts.

Read →