030df199c4aade24c5f2 asked 7 months ago
Counting fees for route
Hello,
I am not sure if I understood something badly, but I want some explanation:
I have configured fees for routing trought my channel for specific node via ThunderHub:
base fee: 15
fee rate: 7500
I have checked LNDg routing table and saw for example:
routed amount:
100 018
fees earned:
17,001
PPM earned:
170
or other example:
routed amount:
27 969
fees earned:
5,474
PPM earned:
196
So could someone tell me, how was this calculated? I thought that when I configure fees on ThunderHub they are fixed, but as I see it is working in other way. How it is calculated and why there are changes between PPMs?
I thought before, that Base fee is fixed (no matter how many sats are transfered) and also that PPM should be fixed, but I think that I do not understood it well.
Thank you for info :)
I am not sure if I understood something badly, but I want some explanation:
I have configured fees for routing trought my channel for specific node via ThunderHub:
base fee: 15
fee rate: 7500
I have checked LNDg routing table and saw for example:
routed amount:
100 018
fees earned:
17,001
PPM earned:
170
or other example:
routed amount:
27 969
fees earned:
5,474
PPM earned:
196
So could someone tell me, how was this calculated? I thought that when I configure fees on ThunderHub they are fixed, but as I see it is working in other way. How it is calculated and why there are changes between PPMs?
I thought before, that Base fee is fixed (no matter how many sats are transfered) and also that PPM should be fixed, but I think that I do not understood it well.
Thank you for info :)
7 Comments
LN+ Admin wrote 7 months ago
Theory
- Fee rate is in PPM (parts per million) and it's paid proportional to the size of the payment. For example, 100 ppm would correspond to 0.01%, thus if you route a 1,000,000 Satoshi payment successfully you will be paid: 100 Satoshis (100 parts per each million).
- Base fee is in Satoshis and it's paid every time you forward a payment regardless of size. For example if you set it to 2, you will get paid 2 Satoshis for any single successful routing event.
- In total, you would get 102 Satoshis for the above example.
Your situation
Your base fee of 15 should pay you 15 sats and the fee rate of 7,500 PPM should pay you 0.75%.
So for the example routed amounts:
100,018 x 0.75% + 15 = 765.135 Satoshis
27,969 x 0.75% + 15 = 224.7675 Satoshis
(You would have to round down to full Satoshis.)
Given you results are 17,001 and 5,474, I hypothesize that your fee rate is provided in mSAT (milliSatoshis), thus 7,500 is not PPM is not per Satoshi but per mSAT, in other words you get 7.5 SAT per 1 million routed Satoshis.
Your fees earned is the total fees and it's also in mSAT, so it's effectively 17 SAT and 5.5 SAT respectively.
The PPM earned is calculated by dividing your total earning by the the routed amount (and this has nothing to do with the fee rate PPM, unless your base fee is zero). For example, 170 makes sense here because you earned 17 SAT per 100K roughly.
So for the example routed amounts:
100,018 x 0.75% + 15 = 765.135 Satoshis
27,969 x 0.75% + 15 = 224.7675 Satoshis
(You would have to round down to full Satoshis.)
Given you results are 17,001 and 5,474, I hypothesize that your fee rate is provided in mSAT (milliSatoshis), thus 7,500 is not PPM is not per Satoshi but per mSAT, in other words you get 7.5 SAT per 1 million routed Satoshis.
Your fees earned is the total fees and it's also in mSAT, so it's effectively 17 SAT and 5.5 SAT respectively.
The PPM earned is calculated by dividing your total earning by the the routed amount (and this has nothing to do with the fee rate PPM, unless your base fee is zero). For example, 170 makes sense here because you earned 17 SAT per 100K roughly.
030df199c4aade24c5f2 wrote 7 months ago
Thank you for your message, maybe it is on msats, but as I saw on Thunderhub (see screenshot) it is in SATS.
and RTL is showing this:
So what to do? Is this data right and I need to update some fees with bigger numbers, or setting are okay, but there is some problem in platform?
Thank you :)
and RTL is showing this:
So what to do? Is this data right and I need to update some fees with bigger numbers, or setting are okay, but there is some problem in platform?
Thank you :)
030df199c4aade24c5f2 wrote 7 months ago
So I tried to change that Fee Rate from 7500 to 30000.... and this happened:
Transaction with 100019 fee received 18
So I do not understand, how this works at all.
Thank you for help.
Transaction with 100019 fee received 18
So I do not understand, how this works at all.
Thank you for help.
LN+ Admin wrote 7 months ago
This makes sense to me:
18 SAT is made of 15 SAT base fee, and 3 SAT fee rate which is calculated as 0.00003% of 100,019.
30,000 mSAT = 30 SAT (Parts per Million), so for 100K, it's 3 SAT.
The only thing that's confusing me here is RTL's "mili mSAT". I think they mean "mSAT" or "miliSAT".
18 SAT is made of 15 SAT base fee, and 3 SAT fee rate which is calculated as 0.00003% of 100,019.
30,000 mSAT = 30 SAT (Parts per Million), so for 100K, it's 3 SAT.
The only thing that's confusing me here is RTL's "mili mSAT". I think they mean "mSAT" or "miliSAT".
030df199c4aade24c5f2 wrote 6 months ago
Thank you for aswer, I really do not know, it is confusing for me also. Sometimes it ignore Base fee of 15, so I will receive maybe only 3 sats etc,
LN+ Admin wrote 6 months ago
That's interesting. Are you sure you're looking at the same channel doing these routings with different fee earnings? There has to be a good explanation! I hope you can figure it out and share it.
030df199c4aade24c5f2 wrote 6 months ago
Of course, I can attach screenshot, in some rows I have changed percentual Fee rate, but base fee was same 15, but it was not count there.
Please login to post comments.