Bitcoin Forum
April 18, 2024, 06:50:59 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Lightning Network fees - C-Lightning  (Read 152 times)
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1190
Merit: 650


I rather die on my feet than to live on my knees


View Profile
May 09, 2021, 11:28:19 AM
Merited by LoyceV (14), dkbit98 (1)
 #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

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713423059
Hero Member
*
Offline Offline

Posts: 1713423059

View Profile Personal Message (Offline)

Ignore
1713423059
Reply with quote  #2

1713423059
Report to moderator
1713423059
Hero Member
*
Offline Offline

Posts: 1713423059

View Profile Personal Message (Offline)

Ignore
1713423059
Reply with quote  #2

1713423059
Report to moderator
1713423059
Hero Member
*
Offline Offline

Posts: 1713423059

View Profile Personal Message (Offline)

Ignore
1713423059
Reply with quote  #2

1713423059
Report to moderator
ndalliard
Full Member
***
Offline Offline

Activity: 154
Merit: 177



View Profile
July 05, 2021, 05:25:08 PM
 #2

did you find any answers in the meantime?
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1190
Merit: 650


I rather die on my feet than to live on my knees


View Profile
November 10, 2021, 12:12:04 AM
 #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.

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!