pull down to refresh

This video shows the liquidity distribution of a simulated node with a fixed capacity, but an increasing number of channels.

Liquidity Distribution of a Node with Multiple Channels:
If we assume that the liquidity of each individual channel connected to a node is uniformly distributed, then the liquidity across all channels will shift from a uniform distribution to a normal distribution as the number of channels increases. This phenomenon is a direct consequence of the Central Limit Theorem (CLT).

Step-by-Step Explanation:

  1. Single Channel Liquidity (Uniform Distribution):
    • Assume each channel connected to a node has liquidity that is uniformly distributed between 0 and its total capacity.
  2. Multiple Channels and Central Limit Theorem:
    • When the node is connected to multiple channels, each with uniformly distributed liquidity, the total liquidity of the node is the sum of the liquidity in all its individual channels.
    • According to the Central Limit Theorem, when you sum a large number of independent, identically distributed random variables (such as the liquidity of each channel), the distribution of the total liquidity approaches a normal distribution regardless of the original distribution of each channel's liquidity (which in this case is uniform).
    • As the number of channels increases, this aggregation process transforms the node's overall liquidity distribution from uniform to normal.
  3. Mean and Standard Deviation of the Node’s Liquidity:
    • The mean of this normal distribution will be half of the node's total capacity because, on average, half the liquidity will be in the channel and half will be available elsewhere (such as the other side of the channel).
    • The standard deviation will decrease as the number of channels increases. More channels with similar capacities will reduce the variability of the node's total liquidity, causing the normal distribution to be narrower.

Key Intuition:

  • Small Number of Channels: When the node has only a few channels, the liquidity distribution remains closer to uniform because the liquidity in each channel can vary more significantly.
  • Large Number of Channels: As the number of channels increases, the liquidity becomes more predictable and centralizes around the mean (half the total capacity of the node). This leads to the overall distribution of liquidity for the node approximating a normal distribution due to the combined effect of multiple uniformly distributed variables.
  • Implication for Network Modeling: The liquidity distribution transformation from uniform to normal as the number of channels increases suggests that nodes with many channels behave more predictably in terms of liquidity allocation. For nodes with fewer channels, liquidity might fluctuate more drastically, making such nodes less predictable in their liquidity patterns.
(Video by me, explanation generated by ChatGPT, but edited for accuracy)
Vague memory only, but doesn't this theorem require larger samples than just 25 nodes? You can't make the assumption that it is normally distributed at priori, can you?
reply
In this case, it has more to do with the number of channels. I sample distributions for each channel and then take their sum. This process is repeated 10000 times per plot.
Until the number of channels reaches 30, the distribution looks more 'uniform' than normal.
reply
Ok got it. Tnx for clarification
reply
In other words: LN is a Hub-and-Spoke network where Hubs tend to connect to other Hubs and spokes are more likely to connect to other spokes
Is that accurate?
reply
I knew I had written about it already. https://mathmosis.substack.com/i/53118467/assortativity
"The Lightning Network exhibits high disassortivity, which is intuitive given that many nodes are user nodes with few channels. These nodes are more likely to connect to well connected nodes than to ill-connected nodes. On the other hand, BA models exhibit a neutral assortativity."
reply
What you're describing is assortativity, which I haven't analyzed personally.
But maybe I'll write a synopsis of this paper
reply