UNDER DEVELOPMENT - DRAFT
Skip to main content
ln.university
LN 100 Fundamentals Lesson 06 Lesson 6 of 7 · 4 min · no measured block
Lesson 06 Model lesson revised

Fee policy as a control loop

A fee policy is the price a node publishes for sending value out of one of its channels, and senders answer by routing more or fewer payments through it. That makes it a feedback loop, because you can watch how much traffic the price attracts, compare it with the cost of replacing the liquidity, and change the price. This lesson works one break-even rule, the lowest price worth charging, on assumed figures. It builds on chapter 12 of Mastering the Lightning Network, which treats fees as one input to a sender's choice of path.

Assumed before you start
After this lesson you can
  • Name the sensor, rule, lever and delay in a fee-policy loop
  • Compute the break-even drain share from a fee and a replacement cost
  • Say why a fee change needs a waiting period before the next one
Anchor text · read alongside CC-BY-SA-4.0 · free online
Chapter 12 · anchor
Mastering the Lightning Network
Andreas M. Antonopoulos, Olaoluwa Osuntokun, René Pickhardt
"Pathfinding and Payment Delivery", the section on fees and other channel metrics. It shows that a sender weighs fees together with liquidity and the time-lock delta when it picks a path.
Read the chapter →

A fee policy is the price a node publishes for sending value out of one of its channels, and senders respond by routing more or fewer payments through it. The loop has delays, because a new price travels by gossip and senders may hold older copies, so a change shows its effect only after a wait. This lesson sets out the loop and its delays, then works the break-even rule that sets the lowest price worth charging. The model’s numbers are assumed.

The parts of the loop

PartIn a Lightning nodeWhere it comes from
SetpointThe split you want between local and remote balance on a channelYour decision
SensorYour own balances and the traffic through each channelOnly the two peers see a channel’s balance, so your node reads its own channels directly
RuleHow you turn a reading into a new priceYour decision, and the subject of the rest of this lesson
LeverThe fee fields, the HTLC limits and the disable flag in your channel_update1BOLT 7
DelayGossip propagation, and senders working from older copiesBOLT 7

The lever applies to one direction. Each side of a channel announces its own channel_update, and the direction bit says which side signed it. So the policy on your side sets the price for value leaving you through that channel, and your peer sets the price for the other direction.

What the sender does with the price

A sender weighs fee together with other costs. The book says a search for a path uses fees, estimated liquidity and the time-lock delta, or some combination of them, as the cost of each hop. A higher fee on your channel therefore moves traffic away from it only when the sender has another path of acceptable cost. If your channel is the only path, a higher fee changes the amount you earn per payment and may change nothing else.

A sender searches backward from the recipient. It uses fees, estimated liquidity, the time-lock delta, or a mix of them, as the cost of each hop. Only paths with enough liquidity for the payment and for all later fees count as candidates.

Adapted from Mastering the Lightning Network, ch. 12, Pathfinding and Payment Delivery · CC-BY-SA-4.0 · condensed, terminology aligned to this course

A node can also use the price to signal scarcity. LND lets a node publish an inbound fee, a discount on the incoming side, which Lightning Labs describes as a way to signal where liquidity is scarce. LND also allows positive inbound fees behind a configuration flag, which Lightning Labs calls risky.2

The floor: what it costs to put the liquidity back

Each forward spends outbound on one channel and adds it to another. Putting the balance back costs money: a rebalance, a swap from on-chain funds, or a new channel that you fund, which adds outbound of its own.3 Lesson 3 covers the same moves seen from the inbound side. A fee below that cost loses money on every payment that drains the channel. The cost applies only to the net drift. A payment that crosses the channel in the opposite direction puts the liquidity back for nothing, because a payment moves the line between the two balances.

So the result of a policy, per 1 000 000 sats forwarded, is the fee earned minus the replacement cost times the share that drains. The model below uses assumed figures. The fee is 300 ppm, and replacing liquidity costs 400 ppm of the amount replaced. Neither is a measurement.

Model · a fee against the cost of putting liquidity back

A model on assumed figures. Each row is arithmetic on 1 000 000 sats forwarded, a fee of 300 ppm, and a replacement cost of 400 ppm of the amount that must be put back. The slider moves between the rows.

1 000 000 sats forwarded at 300 ppm, with a replacement cost of 400 ppm, at five drain shares
Share of forwarded volume that drains the channel Fee earnedReplacement costResult
0 % 300 sats0 sats300 sats
25 % 300 sats100 sats200 sats
50 % 300 sats200 sats100 sats
75 % 300 sats300 sats0 sats
100 % 300 sats400 sats-100 sats

Without JavaScript, and in print, this block shows the five rows of the table.

The break-even share is the fee divided by the replacement cost, which is 300 / 400 = 75% in this model. A channel whose traffic drains less than that share pays for itself at this fee. A channel that drains more loses money until the fee rises or the cost of replacement falls. The floor for a fee is therefore the replacement cost times the share you expect to put back.

The replacement cost is the number the rest of this strand prices. What capital costs in bitcoin gives the baseline that any lease or swap should beat. We have not measured how traffic responds to a change in fee, so this lesson does not claim a ceiling above the floor.

Running the loop

The delay decides how the loop must run. A new policy has to reach the senders by gossip, and BOLT 7 notes that payers may use older parameters for some time. BOLT 7 also asks a node to keep accepting its previous parameters for 10 minutes after a change. A reading taken inside that window mixes two prices.

Four habits follow from the delay.

BOLT 7 also lets a node prune or ignore a channel whose latest channel_update in either direction is older than two weeks, so a policy that is never refreshed can age out of other nodes’ graphs.

Check yourself · 3 questions no score, no record
  1. 01 The model below uses a fee of 300 ppm and a replacement cost of 400 ppm. The channel drains completely, so every forwarded satoshi must be put back. What is the result per 1 000 000 sats forwarded, and at what share of drain does the result reach zero?
  2. 02 You raise the fee on a channel. An hour later its traffic has not changed. Should you raise it again?
  3. 03 You lower your fee on a channel to attract payments from a peer. Does the lower fee also make payments from that peer cheaper to send into your node?

Notes

  1. The levers are the fields of channel_update that a node sets for its own side of a channel: fee_base_msat, fee_proportional_millionths, htlc_minimum_msat, htlc_maximum_msat, cltv_expiry_delta and the disable flag. The delta is a safety margin from lesson 4. It is not a price lever.BOLT 7, channel_update
  2. Inbound fees are an LND feature, described in the Lightning Labs Builder's Guide (read Nov. 6, 2026). They are published as a discount on the fee of the outgoing channel, and a node that does not understand them still routes through the channel at the full fee. Other implementations may handle them differently, so check your own before you rely on them.Lightning Labs, Inbound Channel Fees
  3. Lightning Labs' Builder's Guide describes refilling a depleted channel through a rebalance or a swap from on-chain funds (Loop In in its terms). The guide was read on Nov. 6, 2026.Lightning Labs, Managing Liquidity
  4. The guide says that updating channel fee policies frequently is not recommended, because peers may see the node as less reliable. The statement comes from the guide, and BOLT 7 does not make it.Lightning Labs, Managing Liquidity

Source & license

This page adapts Mastering the Lightning Network by Andreas M. Antonopoulos, Olaoluwa Osuntokun, René Pickhardt, licensed CC BY-SA 4.0. Adapted passages are marked in the text with a hairline rule and a source line. Changes: condensed, terminology aligned to this course's glossary, and extended into a control-loop model that the book does not contain.

This page is therefore also CC BY-SA 4.0. Copy it, translate it, teach from it, republish it under the same license, with attribution to the works above and to ln.university.