Feedback
Sign in./start

Site navigation

Theme

Learn

  • Roadmaps

Build

  • Projects
  • Developer Tools

Contribute

  • Open Source Projects
  • Issues
  • Reviews
  • First Contribution
  • BountiesSoon
  • Feedback

Prove

  • Builders

Ecosystem

  • Partners
  • Get Funded↗
  • HackathonsSoon
Sign in./start-building

Become an Open Source Builder. Learn. Build. Contribute. Prove.

Feedback welcome — open a GitHub issue.

Learn

RoadmapsStart Building

Build

ProjectsDeveloper Tools

Contribute

Open Source ProjectsIssuesReviewsFirst ContributionSupportFeedback

Prove

Builders Directory

Account

Sign in

Legal

PrivacyTermsCredits

© 2026 Pull // code MIT · curriculum CC BY-SA 4.0

PrivacyTermsCredits

lesson // lightning

Routing

Liquidity-aware path selection using fee budgets, channel hints, and reliability scores.

advanced6 days

Public lesson — sign in to track progress on this roadmap.

./sign-in

On this page

Learning objectives

  • Explain source-based routing at a high level
  • Factor fees, CLTV, and capacity into route choice
  • Use explorers to build intuition for public graph structure

study // plan

Lessons are primers. Start with Step 1 (required reading) when present, then follow the numbered steps in the article. Depth comes from primary sources, labs, reflection, and evidence.

Research on Bitcoin Search
Lightning routingfee budgetpath selectionMission Control

Step 1 // Required reading

Complete these before the numbered steps in the lesson body. Links are listed here once — not repeated below.

  • bookMastering the Lightning Network

    Ch. 8: Routing on the Lightning Network

Reflection prompts

  1. Explain Routing to a teammate without jargon - what problem does it solve?
  2. What would break in production if you misunderstood Routing?
  3. Which BOLT (or implementation doc) is the source of truth for this topic, and what did you verify there?

Lab // Path factors worksheet

Complete Steps 2–3. On Polar, attempt a multi-hop pay (or inspect a failed attempt). List fee, CLTV, and liquidity factors that mattered. Optionally skim Amboss for one public path intuition.

evidence required

  • ·Pay attempt result (success or failure) from Polar/CLI
  • ·Short list: fees, CLTV/capacity, reliability — which dominated?
  • ·Link to Ch. 8 section you used
  1. 01

    Worked mental model

    Re-read the diagrams in this lesson once out loud in plain language. If you cannot explain the flow to a friend without jargon, pause and revisit the Mastering Bitcoin / Mastering Lightning chapters linked in Resources. Chapter references are intentional, not decorative.

  2. 02

    Hands-on habit

    Every protocol idea should be paired with one local experiment. That habit turns reading into builder instinct.

    1. Reproduce the happy path on regtest (or Polar for Lightning)
    2. Break it on purpose (wrong fee, expired invoice, offline peer)
    3. Write down what error you saw and which layer produced it (wallet, node, mempool, peer)
  3. 03

    Glossary check

    Pick three terms from this lesson and define them in one sentence each without opening notes. Weak definitions mean the lesson is not finished yet.

  4. 04

    Resource order

    Use Resources in order: narrative book chapter first, then BIP/BOLT for precision, then implementation docs for commands. Jumping straight to RPC flags without the mental model creates brittle knowledge.

Routing is liquidity-aware path selection. The payer (usually) constructs a path across the public graph plus hints, then onion-encrypts hop instructions. Every hop must have enough outbound on the forward edge.

Complete Step 1 // Required reading in the study plan above, then continue here.

Step 2 — Core idea: cheap ≠ successful

Routing success rates define UX. A path that looks cheap on fees still fails if any hop lacks outbound. Fee-aware, reliability-aware pathfinding separates toy demos from production wallets.

Analogy: You plan a road trip with toll costs and bridge weight limits. If a bridge is “full” (insufficient balance), you detour — often without knowing exact traffic until you try.

Loading diagram…

Build a path from gossip + hints, then send an onion.

Factor in: fees, CLTV budget, max HTLC / capacity, private channel hints from invoices, and learned reliability (mission-control style).

Probe carefully

Liquidity is not fully public. Nodes learn from failures without leaking customer details into logs carelessly.

Done when: You can name three inputs to route choice beyond “lowest fee.”

Step 3 — Try a path (lab)

Multi-hop pay on Polar. Note which constraint bit you if it fails. Optional Amboss skim for graph intuition.

Common mistakes

  • Optimizing only for lowest fee and ignoring success probability
  • Ignoring max HTLC / capacity constraints
  • Forgetting private channel hints from invoices

Done when: Lab evidence (attempt + factor list + source) is complete.

Next lesson

Onion Routing — how hop payloads stay private.

further reading

  • toolAmboss
  • docsLND Mission Control

review // club

Review club

Practice on real Lightning OSS changes tied to this chapter. Read the diff, use the checklist, and optionally paste your review comment URL in your lab notes.

  • LND mission control / pathfinding

    Review a mission-control or pathfinding PR and note how failed attempts update edge scores.

    pr review
    failure learningfee budgets
    55 min·advancedopen on GitHub
review checklist
  1. Does the change solve the stated problem?
  2. Are edge cases and rollout behavior covered?
  3. Are tests or test vectors included?
  4. Is the diff minimal and clearly explained?

More repos and GFIs on /discover and /issues.

progress // sign in

Reading is public. Sign in to mark lessons complete, sync across devices, and unlock your roadmap.

./sign-in-to-track

discussion

Discussion

prevLiquidity OperationsnextOnion Routing

On this page

Press Shift + ? for keyboard shortcuts.

Press R to research on Bitcoin Search.

No questions yet — be the first to ask.