Understanding the Lightning Network - Where Did My Sats Go?

Posted 9 months ago by LN+

Navigating the Bitcoin Lightning Network can sometimes leave newcomers puzzled with questions such as "I opened a channel a few weeks ago, and now I don't have any sats on it. Where did my sats go?" or "I opened a channel some time ago, and there was 1 million sats in it. I closed it today, but I didn't get my 1 million sats back. Where is my money?"  These are common inquiries that often stem from a fundamental misunderstanding of a crucial Lightning Network process: routing.

Unveiling the Concept of Routing

To unravel this mystery, it's essential to grasp the concept of routing within the Lightning Network. Routing allows the transfer of bitcoin (sats) across the network over multiple channels without requiring a direct channel between the sender and receiver. This process is similar to how internet packets travel from their origin to their destination through various nodes. Learn more about routing.

How Routing Influences Your Sats

When you deposit sats into a channel, those sats represent your side of the channel's balance. As your channel engages in routing payments for others, the allocation of sats between you and the channel's counterparty changes. However, it's crucial to understand that while individual channel balances fluctuate, the overall balance of your node, when considering all your channels, remains unchanged by routing activities alone.

Clarifying a Common Misconception

A crucial concept that often goes misunderstood is this: when you route funds, the channel that forwards the funds sees a reduction in its balance, but another one of your channels that receives the routed funds will see an increase. Thus, routing doesn't lead to a loss of funds.

A Typical Routing Scenario

Forwarding 100,000 and earning 5 sats in fees


Let's expand our typical scenario to incorporate this vital concept:
  1. Opening a Channel: You open a channel with 1 million sats. All these sats are initially on your side.
  2. Routing a Payment: Your channel routes 100,000 sats to another user, decreasing your balance to 900,000 sats. Meanwhile, this routed payment is received by another one of your channels, increasing its balance correspondingly.
  3. Earning Fees: By facilitating this transaction, you earn a small routing fee (ex. 5 satoshis). This fee is added to your balance, incrementally increasing the total sats across all your channels.
  4. Understanding the Overall Impact: Although the balance of the specific channel used for routing decreases, another channel's balance increases. Therefore, the total balance across all your channels remains the same, barring the fees you've earned, which slightly increase your total holdings.
  5. Closing a Channel: When you close a channel, you receive the final balance of that channel, which reflects all the routing and fee earnings. If, for instance, the closing balance was 900,000 sats, this does not account for increases in your other channels.

Monitoring Your Lightning Network Activity

Monitoring your channels is key to understanding the flow of sats. With the right tools (ex. Thunderhub), you can see how balances shift between channels due to routing and how your overall balance is affected.

The Routing Benefit: A Holistic View

Participating in routing payments enriches the Lightning Network, keeping it efficient and scalable. It's a cooperative effort that, while it may initially seem like your funds are depleting, actually maintains your overall balance and incrementally increases it through fees.

Public / Private Channels

It's crucial to grasp the difference between the two types of channels on the Lightning Network: public and private.

Public Channels are open to the entire network. They appear in the network's public graph, making them visible to all participants. This visibility allows nodes to use public channels for routing payments to nodes with which they do not have a direct connection. The ability to route payments through a node depends on the availability of sufficient capacity in the necessary direction on the involved channels.

Private Channels
, on the other hand, are not broadcast to the entire network. Visibility is restricted to the nodes directly involved in the channel, rendering them less prominent for routing on a broad scale. Despite this, private channels can still participate in routing payments. For routing through a private channel to occur, nodes outside the channel must be informed of its existence, typically through "routing hints" provided by one of the participating nodes.

Conclusion

Routing within the Lightning Network is a dynamic process that redistributes sats across your channels but doesn't inherently decrease your total holdings. By actively participating in routing, you not only support the network's efficiency but also have the opportunity to grow your total sats through accumulated fees. As you familiarize yourself with these principles, managing your channels and optimizing your participation in the Lightning Network becomes an engaging and potentially rewarding endeavor.

3 Comments

Bitnoob

Bitnoob wrote 9 months ago

Excellent and concise review.

Like to add (correct me if I am wrong):

- There are channel opening fees and channel closing fees in sats. The channel opening fees may not be obvious as the channel opening sats are deducted on top of the channel size from the bitcoin node funds (eg. channel size of 1 million sats + channel opening fees) but they are deducted from the lightning channel balance when the channels are closed.
- It is advisable to open large channels (eg. 1 million sats or more) and set low base fees and fee rate as more traffic likely flows through these channels (I think). Lightning channels opened via swaps on lightning+ have a base fee of 1 sat/vB and fee rate of 1 sat/vB (though this can later be changed by the channel opener).
- Best to leave active channels alone and not close them (even after swap agreements end) as this incurs a channel closing fees (which may eat up most of the earnings gained via routing fees).


BCash_Is_Trash

BCash_Is_Trash wrote 7 days ago

There's an important distinction between routing and forwarding that is being muddled by a lot of discussion around LN, including this post. The Lightning Network is currently a source-routed network, which means that all of the routing of a payment happens at the node originating the payment. Intemediate nodes along the payment path do not perform any routing. They perform forwarding. So the terms "routing fees" and "routing nodes," as typically used, are misnomers. Rather, one should use the terms "forwarding fees" and "forwarding nodes." Note that this is in contrast to the broader Internet, which is not a source-routed network and actually does have "routing nodes" (a.k.a. routers) all along the path between the originator of a packet and its eventual destination.


LN+

LN+ Admin wrote 6 days ago

That's a good point. Thank you for the comment.

Please login to post comments.