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

Liquidity Operations

Manage inbound/outbound balance with loops, swaps, rebalancing, and peer liquidity.

advanced7 days

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

./sign-in

On this page

Learning objectives

  • Diagnose inbound vs outbound shortages
  • Evaluate Loop/swaps and rebalancing strategies
  • Understand liquidity ads at a high level

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
channel liquidityLightning Looprebalancinginbound capacityliquidity ads

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 (liquidity context)

Reflection prompts

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

Lab // Shortage diagnosis

Complete Steps 2–3. On Polar/regtest, inspect a channel’s local/remote balance and write which shortage you have (inbound vs outbound) and which op tool you would reach for first.

evidence required

  • ·Balance split excerpt (local/remote or Polar UI)
  • ·Diagnosis: inbound shortage vs outbound shortage
  • ·Chosen tool (rebalance / loop in / loop out / peer liquidity) and why
  • ·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.

You already understand inbound vs outbound from the Channels chapter. This lesson covers operations: how to fix imbalances once you diagnose them.

Complete Step 1 // Required reading in the study plan above, then continue here. This opens Routing & Liquidity.

Step 2 — Core idea: diagnose, then choose a tool

A node with lots of bitcoin locked but zero inbound capacity still cannot get paid. Liquidity ops is the business of routing revenue and merchant receive capacity — loops, swaps, rebalancing, and peer management.

Analogy: A highway with all cars stuck on one side of a toll bridge. You need flows (or trucks repositioning cars) to free lanes in both directions.

Loading diagram…

Different shortages call for rebalancing, loops, or peer liquidity.
ShortageTypical moves
Need outboundCircular rebalance; receive more; open/fund carefully
Need inboundLoop in; liquidity ads / peer liquidity; dual-fund peers

Capital has cost

Every sat locked has opportunity cost. Measure routing revenue vs capital before scaling channels.

Done when: You can pick a first tool from a balance screenshot without guessing.

Step 3 — Diagnose your lab channel (lab)

Inspect balances. Name the shortage. Choose a tool and justify it in one sentence (you do not have to execute Loop on mainnet).

Done when: Lab evidence (balances + diagnosis + tool choice + source) is complete.

Next lesson

Routing — liquidity-aware path selection across the public graph.

further reading

  • docsLightning Loop
  • articleLiquidity advertisements

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.

  • Lightning Loop docs

    Study how Loop moves liquidity between on-chain and channel balances; comment on doc gaps.

    gfi
    inbound capacityon-chain swaps
    35 min·intermediateopen 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

prevDual Funding & SplicingnextRouting

On this page

Press Shift + ? for keyboard shortcuts.

Press R to research on Bitcoin Search.

No questions yet — be the first to ask.