Author

Topic: Lightning Network fees - C-Lightning (Read 175 times)

hero member
Activity: 1260
Merit: 675
I rather die on my feet than to live on my knees
November 09, 2021, 07:12:04 PM
#3
did you find any answers in the meantime?

Hi...

I'm really sorry but I didn't even noticed this question got answered.

But no, I didn't got any "answer".

However I can only think in one situation, which is the number of hops being bigger for the smallest payment or the hops the smallest payment used having bigger fees setup!
If it's not the case, I can't think of anything else.
Anyway, tank you for replying and sorry again.
full member
Activity: 154
Merit: 177
July 05, 2021, 12:25:08 PM
#2
did you find any answers in the meantime?
hero member
Activity: 1260
Merit: 675
I rather die on my feet than to live on my knees
May 09, 2021, 06:28:19 AM
#1
Hello.

I'm using the Lightning Network and if I'm not wrong, the formula to calculate the fees is base_fee + amount_forward*(ppm/1e6). Correct me if I'm wrong or if there are other subtle nuances behind the hood. I'm using C-Lightning implementation but I think the fees formula is transparent and transversal to any implementation.

But I'm not being able to match what this formula with the fees I've been collecting from my client and also, another weird thing happening is that some forwarded payments are generating fees lower than other smaller forwards. I'll explain below with examples.

So, there are 2 things I would like to discuss: One is the fee collected not matching the formula above. Another thing is that a payment smaller than one other is generating fees lower than the smaller payment forward.

First problem:

For instance, earlier today I forward a payment of 328.258,966msat (In channel) and 328.257,223msat (Out channel). The fee collected was 1743msat.

The Out channel fee setup is:
Code:
"base_fee_millisatoshi": 1391,
"fee_per_millionth": 13,

Using the formula above I should've collected 1,391sat + 328.259,966x(13/1e6) = 5.658 sats. However I only collected 1.743sats.
So, something is wrong either with the formula or with the amount of factors I think the fee depends on.

Second problem I would like to address is a forward payment fee being smaller than the fee of one other payment which value is smaller, when the Out channel is the same, therefore the fee setup also the same.
For instance, this morning I forward 2 payments with the same Out channel. Payment 1 was 80k sats, sharp (plus the fee). Payment 2 was 50k sats sharp (plus fees).
However, payment 2 generated a higher fee than payment one, which makes no sense because payment 1 was bigger, so it should generate bigger fee, no?



So,
payment 1: 80k sats, 437msat fee
payment 2: 50k sats, 470msat fee
Jump to: