# What is correct way to count LN node stats

I am running a LN node. Set up monitoring to collect stats. Now i am wondering, how can i get correct conclusions about what collected information actually is.

My question is about forward (transaction?) count. According to my stats i had 14 settled forwards.

There are ~8350 nodes over there, my node according to 1ml.com is ~#450 in channel/capacity rank. so we can assume that i am average active node i think. so then 8350*14=116900 settled forwards over network?. i am not sure what this number mean and can we compare this to 409570 on-chain transactions for last 24 hours.

I had also some 2-3 offchain pay and 1 paid invoice which was my own node made, do i need to add the to calculation above or not?

If this completely incorrect way to count and compare transactions, please describe a correct one.

I would approach this problem a little bit differently as counting in general is pretty difficult and the assumption of being an average node is pretty strong (not to say as I lay down below probably wrong) My approach however uses also a strong (and also probably wrong) assumption though I think it is not as strong / wrong as yours.

In my video in which I lay out the math for optimizing routing fees / earnings on the lightning network I start with a probability distribution to derive an expectation value for my routing fees that I want to optimize to gain maximum routing fees.

Instead of assuming your node is average I would ask about the likelihood of being on a path of a transaction between two arbitrary nodes? As I lay down in the video this boils down to the betweeness centrality of your node on the fee graph of the lightning network. The fee graph is the network you get when adding the routing fees as edgeweights (it is a little tricky as they dynamically depend on the payment amoun. You could start with just using the basefee). Generally your centrality raises with you lowering your fees and maintaining more channels. In your case after computing your centrality you would divide the number of settled routing attempts by the centrality of your node to get an estimate of the overall payments made by the network.

As a datascientist I would say that even your data points (n=13 settled routing attempts) are statistically probably not sufficient. However larger nodes could probably use their data to make a pretty good guess.

Also as a disclaimer I should say that my result with the betweeness centrality depends on the relativly strong assumptions that the distribution of who pays whom is uniform so it would be equally likely that you pay any other node. This seems to be another very strong assumption but it is extremely hard to get a better a priori distribution for it. If it was available it could easily be weighted into the formula of the betweeness centrality. Also I assumed that payments all have the same amount to compute the betweeness centrality. This is also wrong but could also be modelled to the centrality measure if the amount distribution was known.

• can't say i am satisfied with answer, but it seems correct.. May 14, 2019 at 9:56
• Why not satisfied? The fact that it can only be estimated and a lot of assumptions have to be put in? Or more my way of presenting it (with which I also was not too happy - but I thought I was overcritical) May 14, 2019 at 10:46
• rather because a lot of assumptions have to be put in.. i thought there is a way to get more accurate data with less effort. At some point that is good for privacy as it happens now, but makes hard to analyse network for random person. May 14, 2019 at 12:37