Understanding Bitcoin Lightning Network Forwarding Fee Earnings
Posted 4 months ago by LN+
Routing fee calculation is often confusing for Lightning Network operators, so here is a quick overview to explain how it works and how it's calculated.
As a Lightning Network node operator, you are only paid forwarding fees when a payment is forwarded successfully, as opposed to a failed forward request. The fee is calculated based on the outgoing channel. The incoming channel's fees you set on your node are irrelevant for fee calculation. Therefore, if you expect to forward many payments to a specific node, set the fees on the channel to that node according to your needs.
There are two types of fees:
Base Fee
This is the simpler fee to understand. For every single payment transaction forwarded, you receive a certain amount of satoshis (sats) that you set for the channel. For example, if you set 1 sat for the base fee and you forward 5 transactions, you will earn 5 satoshis. This fee ensures that you are compensated for the storage and processing power associated with each transaction on your node. It's crucial to note whether it's set in terms of satoshis or milli satoshis (msat). If it's set in msat, 1,000 msat is equal to 1 satoshi.
Fee Rate
This fee typically causes misunderstanding due to its denomination and the small numbers involved. Depending on the software used, the fee rate is either set in parts per million (PPM) or percentage. For the fee rate, once again it's important to note whether the fee rate is set in terms of satoshis or milli satoshis. For instance, in the popular Thunderhub application, setting a fee rate of 500 on a channel means 0.05%, and the denomination is in satoshis, not milli satoshis.
Nomenclature
When you query and set the fees of a channel in various Lightning implementations, the naming of the base fee and fee rate differs slightly.
Here is an example of a report on a channel in LND:
Here is an example of a report on a channel in LND:
"base_fee_msat": "1000", "fee_per_mil": "500", "fee_rate": 0.0005
Let's break it down:
- base_fee_msat is the base fee set in msat (milli Satoshis). Thus, 1,000 msat means 1 satoshi earned per successfully forwarded transaction.
- fee_per_mil is the fee rate in PPM (parts per million). Thus, for every 1,000,000 satoshi forwarded, you earn 500 satoshis.
- fee_rate is the same as the fee_per_mil expressed in percentages for convenience.
The same channel would look like this in Thunderhub:
- Base Fee is set in satoshis (not msat!)
- Fee Rate is set in PPM. The percentage is calculated for you on the fly next to the label.
Here is an example of a report on a channel in CLN:
"fee_base_msat": 1000, "fee_proportional_millionths": 500,
Let's take it line by line:
- fee_base_msat is the base fee set in msat (milli Satoshis).
- fee_proportional_millionths is the fee rate in PPM (parts per million).
- CLN doesn't provide the fee rate in percentage terms.
Examples of Fee Calculation
Let's consider examples to understand how much you earn with a setting of a Base Fee of 1 sat and a Fee Rate of 500 set in Thunderhub on a channel.
Example 1: Single Transaction of 1 Million Satoshis
- Base Fee: 1 satoshi per transaction = 1 satoshi
- Fee Rate: 500 PPM means you get 500 satoshis per million satoshis forwarded. Thus, the fee earned is 500 satoshis.
- Total: 1 + 500 = 501 satoshis fee
Example 2: Five Transactions of 200,000 Satoshis Each
- Base Fee: 1 satoshi for 5 transactions = 5 satoshis
- Fee Rate: 500 PPM for 200,000 sats is 100 satoshis each, times 5 is 500 satoshis.
- Total: 5 + 500 = 505 satoshis fee
Handling Very Low Fees
Now, what happens if the fee is very low? Let's say the base fee is zero and the fee rate is 25 PPM, and you route 10,000 satoshis. The fee would be 0.25 satoshis. Since the smallest amount in Bitcoin is 1 satoshi, you can't earn and be paid 0.25 satoshis (or 250 milli satoshis). However, the money is not lost. If you were to route four such transactions through the same channel, the partial satoshi earnings will add up, and you will earn a single 1 satoshi (1,000 milli satoshis) eventually.
Understanding these fee structures and how they are applied will help you better manage your node and optimize your earnings from forwarding payments on the Lightning Network.
0 Comments
Please login to post comments.
Lightning Network Node
LightningNetwork.Plus
Rank: 8 / Gold
Capacity: 414,534,117 SAT
Channels: 121
Latest news
Is It Better to Open Few Large or Many Small Channels on Bitcoin Lightning?
Posted 4 months ago
Introducing LN+ Pro Membership: Elevate Your Node to New Heights
Posted 4 months ago
MicroStrategy's Impact and Potential in the Bitcoin Ecosystem
Posted 4 months ago