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.
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.
Thank you for your message, maybe it is on msats, but as I saw on Thunderhub (see screenshot) it is in SATS.
image.png38.1 KB and RTL is showing this: image.png28.4 KB 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?
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".
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.
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. image.png260 KB