# Can Lightning Network’s Autopilot Function Use BA Model as the Underlying Network? Zhen Wang, et al.

Jan 15, 2022

## 1 Introduction

Bitcoin [1], one of the representatives of blockchain technology, has been developing rapidly since its inception, but since its release Bitcoin has been suffering from problems such as latency, throughput, capacity [26]. Using payment channels [7] to enable off-chain payments has become a promising solution to the bitcoin scalability problem. For the bitcoin network, if there are multiple transactions between two accounts, there is no need for both parties to synchronize their respective fund states to the bitcoin network at the end of each transaction, The two parties can build their own transaction channel and deposit a certain amount of money, and then synchronize the status of both parties’ funds to the bitcoin network when the final transaction is completed. This ensures the final state of the funds, reduces the waiting time for both parties on the inefficient bitcoin network and increases the frequency of transactions, and also solves the storage and even privacy problems.

The Lightning Network [8] is developed from micropayment channel technology, extending the one-way payment channel into a two-way payment channel. It solves the historical contract voiding problem in the dual-channel through RSMC.1 The problem of cross-node transactions is solved by HTLC,2 which finally forms a trusted distributed payment network under the chain. As shown in Figure 1, node A and node B need to make a transaction, and nBTC can be jointly funded between A and B in a 2-2 signature address, where A contributes n1 BTC and B contributes n2 BTC, n1+n2 = n. When the transaction ends, A and B use their own keys to retrieve the funds belonging to them. Similarly, B and C can jointly fund the channel between B and C. When A and C need to transact, since there is no directly connected channel between A and C, A and C can transact through B, and B can earn a certain fee. Since its launch in January 2018, the Lightning Network has grown by leaps and bounds so far to a network of over 10,000 nodes, nearly 40,000 edges, and over 1,000 bitcoins stored in channels.

FIGURE 1. Illustration of payment channel network. A and B can jointly contribute n bitcoins to establish a channel, and when they need to trade, they can do so through the channel. And when there is no channel between A and C, the transaction can be done through B.

The rapid development of the Lightning Network has generated a great deal of interest in their topological properties. Although the transaction data in the Lightning Network is not publicly available, the channels between nodes in the network are viewable and recordable in real-time.3 Therefore, collecting data from the date of release of the Lightning Network and building the network allows us to analyze how the Lightning Network has evolved.

The efficiency of routing [9], the simulation of transactions [1018], and the robustness of the Lightning Network [1921] are utterly dependent on the underlying topology of the network. After the release of the Lightning Network white paper, most of the studies simulated the Lightning Network using the Barabasi Albert Model [22] as the underlying network, although there were studies that used star topology as the underlying structure for simulation [1014]. Since the launch of the Lightning Network, selecting appropriate connections for the newly added nodes sparked a heated discussion in the community due to the increase of its network size.4 The community discussion focused on the appropriateness of using the Barabasi Albert Model as a guiding model when setting the nodes to autopilot mode.

In general, whether the topological properties of the Lightning Network are similar to those of the Barabasi Albert Model is an urgent question to be answered, which concerns the design of routing protocols, the simulation of transactions, the robustness of the network, and various other aspects. In Martinazzi et al’s study [11,15,18,19], the degree distribution of the Lightning Network conforms to the Barabasi Albert Model, and the distribution of the edge nodes of the Barabasi Albert Model is also a good approximation of the edge nodes in the Lightning Network. However, our analysis shows that the edge nodes of the Lightning Network are not similar to those of the Barabasi Albert Model, although the distribution of degrees of the Lightning Network fits the Barabasi Albert Model of the same size with decreasing errors. There is a massive gap between it and the Barabasi Albert Model in terms of diameter, assortativity, and connectivity mechanism of the network. We explored the possible reasons for this gap. Also, the preferential connection mechanism[22] of the Barabasi Albert Model does not apply to the connection mechanism of the whole Lightning Network. By extracting the newly created connections in the Lightning Network, we argue that the newly joined nodes prefer to connect nodes with greater Betweenness Centrality than the degree-first connection mechanism. We argue that using the Barabasi Albert Model to simulate the topology of the Lightning Network is not a perfect choice.

Our main contributions can be summarized as follows:

• We constructed the network topology of the Lightning Network for almost 1,200 days and analyzed the topological evolution of the network.

• We point out by comparing the Barabasi Albert Model of the same size that although the error in fitting the distribution of the Lightning Network degree is getting smaller, its diameter is much enlarged due to the crosstalk between the nodes compared to the Barabasi Albert Model of the same size.

• We point out that the Lightning Network is the exact opposite of the assortativity by comparing the Barabasi Albert Model of the same size, which may come from the connection mechanism of the merchant nodes in the Lightning Network.

• We find that the newly joined nodes in the Lightning Network preferentially connect the nodes with greater Closeness Centrality than the degree-first connections.

## 2 Related Work

Current research on the Lightning Network focuses on three aspects: topological properties [15,19,20,2328], security [9,14,2935], and routing methods [11,12,17,3639]. Although all the above studies are very important aspects of Lightning Network, they are strictly dependent on the underlying topological network. In the process of simulating Lightning Network using the underlying topology, different teams have proposed different topologies [10,11,1317], but in the end, there is a preference to use the Barabasi Albert Model as the underlying network for relevant simulations, especially in the future development of the network, whether to use the Barabasi Albert Model as the underlying network for autopilot function in particular, the question of whether to use the Barabasi Albert Model as the underlying network for the automatic driving function has also become the focus of community discussions (isb, 2020). Therefore, it is a very important issue to figure out whether the topology of the Lightning network is similar to that of the Barabasi Albert Model.

In terms of the connection of nodes, Bertucci et al. [26] investigated that the competition between nodes followed the Bertrand model5 and pointed out that the centralized network structure must not be the optimal network structure. Rincon et al. [33] classified the connections between nodes in the network into three types and evaluated the contribution of different kinds of connections to the network structure. Avarikioti et al. [6] analyzed the impact of different charging mechanisms of nodes on the robustness and connectivity of the network. Avarikioti et al.[24] then analyzed the structure and the equilibrium of the Lightning Network from the perspective of the network creation game [40]. They considered a node as a decision-making individual. They analyzed the effect of the node’s policy on the optimal structure of the network from the perspective of the network creation game. Lange et al. [28] analyzed how the network would evolve under different connection strategies of nodes. This is the first article to predict the future development of the network from a network topology perspective. However, the article only directly selects Betweenness Centrality, Closeness Centrality, and degree as the connection metrics of nodes to predict the future development of the network. It is not clear whether the selection of metrics is consistent with the development of the Lightning Network.

## 3 Data and Basic Definitions

In this section, we will describe in detail how we acquire and process the data and how we build the data of the network into graphs.

### 3.1 Datasets

We collected data from the website3 for all channels of the Lightning Network from the date of birth – January 12, 2018, to April 20, 2021, for a total of 147,256 channels. From the birth of the Lightning Network to April 20, 2021, the Lightning Network has 147,256 channels, which includes channels that have been closed and channels that are still open. The information of each channel contains the following fields:

short_channel_id: a set of numbers of length 16 which represents channel identity

satoshis: channel capacity between two nodes, 1BTC = 1,00,000,000 satoshis

nodes: unique identification of nodes at both ends of the channel

open/close: contains a lot of information about the opening and closing of the channel, where the channel opening and closing time is the key information.

By keeping the short_channel_id, satoshis, nodes fields in the original data above, the channel open and close times in the open and close fields are processed as the standard time day_open_time and day_close_time. we separate the two nodes in nodes filed, since node id is unique in the network, and to speed up the process, we replace the two nodes in the nodes field with unique numbers, and denote them as node0_id and node1_id, and day_open_time and day_close_time are the time when the edges in the network are connected and disconnect time. Our processed set of fields is as follows:

short_channel_id, satoshis, day_open_time day_close_time, node0_id, node1_id.

Building the information of the channel into a network requires using the fields

node0_id, node1_id, day_open_time, day_close_time.

At this point, we can process the raw data and obtain the data that can analyze the Lightning Network channels and construct the Lightning Network’s evolution.

### 3.2 Construction of Graphs

Our goal is to construct a temporal graph of the Lightning Network, analyze the topological property changes since the Lightning Network has been online, and compare it with the same size Barabasi Albert Model. Therefore, we have processed the channel data of the Lightning Network so that we can reconstruct the growth of the Lightning Network and analyze it.

The Lightning Network can be represented using a timestamped undirected graph G = (V, E, W, To, Tc), where V represents the set of nodes in the Lightning Network, E represents the edges between nodes, i.e., the channel in the original data, and W represents the capacity in the channel, i.e., the satoshis of the original data. To and Tc represent the time when the channel is opened and closed. For example.

((7093, 12 913), 505149x622x0, 300 000, 2018/1/20/9 : 43, 2019/8/31/18 : 34).

This indicates that a channel 505149x622x0 with a capacity of 300 000 satoshis exists between nodes 7,093 and 12 913, which was opened on 2018/1/20/9 : 43 and closed on 2019/8/31/18 : 34.

We read the data in days, and we add the node and the edge to the network when the time of edge creation is read, and we delete the edge when the time of its closure is read. When the degree of the node is 0, we consider this node dead. It should be noted that the channels in the Lightning Network are available in both directions, i.e., as long as a channel exists between the nodes, then whoever initiates the transaction can do so, so we use an undirected graph for the representation. At the same time, there is more than one connected component in the Lightning Network, but the largest connected component occupies more than 95% of the nodes, so the rest of the analysis in this paper is based on the largest connected component, except for the channel analysis, because the analysis of the channel is not required to build a graph.

## 4 Methods and Results

In this section, we will first start from the topological point of view; after analyzing the three stages of development of the Lightning Network, we fit the distribution of the degrees of the Lightning Network with 100 days interval, analyze the variation of the assortativity, diameter, etc. of the network and compare it with the network of the same Barabasi Albert Model. In the section of preferential connection of nodes, we analyzed the problem of preferential connection of new nodes of the Lightning Network by obtaining the data of newly created edges.

### 4.1 Topology Analysis

##### 4.1.1 The Three Stages of Development of the Lightning Network

The idea of the Lightning Network was proposed by [8] in 2016 and officially launched on January 12, 2018, and by April 20, 2021, the Lightning Network already has 10,930 nodes and 39,962 edges. The visualization of the Lightning Network is shown in Figure 2.

FIGURE 2. Lightning Network Visualization – April 20, 2021. The presence of a large number of star structures at the edge of the network.

The development of network nodes and edges is shown in Figure 3. Where the x-axis represents the time and the y-axis represents the number. The blue line represents the development of nodes, and the yellow line is the development of edges. We can divide the development of the Lightning Network into three stages. The first stage, from January 2018 to January 2019, we call the “start-up period.” This phase is characterized by the slow growth of both nodes and edges, and the network is still in a relatively preliminary stage. The second phase is from January 2019 to June 2019, which we call the “outbreak period.” This phase is characterized by the fact that in addition to the accelerated growth of nodes, edges start to grow wildly. Edges overgrew during this phase from less than 10,000 to a peak of over 40,000. In addition to the increasing number of bitcoin transactions, a campaign called “Lightning Torch” was launched in January 2019 and played a huge role. The drive covered dozens of countries around the world and was attended by many vital influencers, resulting in an almost exaggerated growth of the network. However, after rapid growth, the Lightning Network experienced a decline in size. We call the period from June 2019 to now a “cooling-off period.” The edges in the network continue to drop and eventually stabilize around 35,000, and node growth begins to slow down. Such a trend has been maintained until now. We believe this is due to the irrational growth experienced in the last round. Due to the propagation effect, Lightning Network enthusiasts started to join the network and build more edges, but as a transaction network, after the irrational growth, the “supply” market of the Lightning Network became larger than the “demand” market. The edges between nodes are “over-resourced,” and the number of edges is decreasing. The reason why the number of edges has remained stable around 35,000 after June 2019 is also that the network is in a state of “supply and demand balance.” As you can see, after January 2021, there is a new increase in the number of nodes and edges in the network. This is because the price of Bitcoin has increased dramatically, from under \$30,000 to over \$50,000 as of April 20, 2021. What we can speculate about the development of the Lightning Network after April 20 is that it will see a new round of growth if the price of bitcoin continues to rise.

FIGURE 3. Lightning network nodes and edges growing with time.

##### 4.1.2 Degree Distribution

The degree distribution refers to the proportion of nodes corresponding to the degree in the network. By constructing the Lightning Network as a simple undirected graph, we can calculate the degree distribution of nodes as time changes. First, we tested whether the degree distribution of the Lightning Network conforms to the scale-free property. In a scale-free network, the probability that a node with node degree k is selected to generate a new connection satisfies the following equation [22,41,42]:

The P(k) represents the probability of being selected nodes, where k is the degree of the node and α is the parameter, usually between 2 and 3. To verify whether the Lightning Network meets the scale-free property, we fit it using the python package powerlaw, which is more advanced than previous fitting tools and is also easier to use [43]. We give the fitted parameters α and error sigma by powerlaw.

Figure 4 gives the complementary cumulative distribution of degrees of the Lightning Network every hundred days, where the x-axis is the degree of the node, and the y-axis tabulates the probability that the node is greater than the degree corresponding to the x-axis. Invariably, the Lightning Network shows a decline in the distribution at the tail, which indicates the presence of hub nodes with vast degrees connected to other nodes in the network. The red line is the result of the fit using powerlaw, and Table 1 gives the fitted parameters α and the corresponding error sigma. It can be seen that except for the slightly larger error at the beginning of the development of the Lightning Network, the error of the Lightning Network fit after 400 days is less than 5%, which indicates that the Lightning Network is a scale-free network. The error at the beginning may be that the size of the network is still relatively small.

FIGURE 4. Complementary cumulative distribution of degrees per 100 days of the network and parameters fitted using powerlaw.

TABLE 1. Parameters and errors of the fit.

##### 4.1.3 Disassortativity

In a network, nodes between different degrees may be random or inclined. Degree assortativity is mainly used to examine whether nodes of similar degrees tend to connect. A network is said to be assortative or positively correlated if nodes with large (small) degrees tend to connect nodes with large (small) degrees overall. If nodes with a large (small) degree tend to connect nodes with a small (large) degree, then the network is said to be disassortative or negatively correlated [44]. The equation for assortatvity is as follows:

$r=kikj−kikjki2−ki2×kj2−kj2(2)$

Where ki and kj are degrees of the nodes at either end of a link and

$<>$

represents the average overall links. It varies between -1 and 1: For r > 0 the network is assortative, for r < 0 the network is disassortative, and for r = 0 the network is neutral. If a network’s assortativity is positive, hub nodes tend to be connected with other hubs and vice versa.

We calculated the assortativity coefficient for the network. The x-axis is the time, and the y-axis is the assortativity coefficient. Since the number of nodes in the first 2 days of the network is small, we cannot calculate the assortativity coefficient for the network. The assortativity coefficient from the third day is shown in Figure 5, except for the third day and the fourth day, the value is greater than 0. From the fifth day until the last day, the assortativity of the network is less than 0. This indicates that the network is disassortative, i.e., Smaller nodes tend to be connected to larger nodes and vice versa.

FIGURE 5. Network assortativity changes.

Since there are some thresholds in the configuration of the Lightning Network, nodes with payment needs that want to access the network, these service providers offer excellent options to easily access the Lightning Network using their products by paying only the appropriate amount of money. As an example, the fifth-largest node in the network, OpenNode6, is dedicated to providing access to commercial payments. OpenNode currently has a total of 793 channels, accounting for 1.787% of the total number of channels in the network. Other nodes such as CoinGate7, with 1,214 channels or 2.736% of the total number of channels in the network, provide similar services. There are not a few such nodes in the network. Instead, as shown in Figure 2, many similar nodes exist at the edges of the network, forming a local star structure, which could be the reason for the disassortativity of the Lightning Network.

We also calculate the assortativity of the Barabasi Albert Model of the same size, and we can observe that the assortativity of the Barabasi Albert Model is almost the exact opposite of that of the Lightning Network. However, it also shows some disassortativity. It gradually stabilizes around -0.03 as the network size increases, while the lightning network finally stabilizes around −0.2, a difference of two orders of magnitude.

Current research [45] has shown that the assortativity affects the efficiency of information dissemination in the network, and the existence of larger nodes in the lightning network as hub nodes can accelerate the process of information dissemination to a certain extent. At the early stage of lightning network construction, the community was committed to developing the lightning network into a peer-to-peer structure, and as a result, relevant routing algorithms were designed, and the topology of the network was constructed. However, as the size of the network increased, hub nodes still appeared. Perhaps as the network grows in size and changes in property, the network’s routing protocols may need to be updated to accommodate the new topology.

##### 4.1.4 Diameter

The diameter of a network is the maximum value of the shortest path between any two nodes in the network. Thus, it is a fundamental criterion used to measure the level of connectivity of a network. In general, individuals in a smaller diameter group are connected through fewer intermediates, and transfers between individuals may be faster than in a larger diameter group [44].

The diameter of the Lightning Network evolves, as shown in Figure 6. Its diameter rises rapidly, reaches 12 within the first 200 days, and maintains 12 for the vast majority of the subsequent time, reaching a maximum diameter of 14, but then drops back to 12. Meanwhile, we compare the diameter of the Lightning Network with that of a BA network [46] of the same size, where the same size means that both networks have the same number of nodes and the similar number of edges. The results are shown in Table 2. Surprisingly, although the size is the same, the diameters of the two networks are vastly different. The trends are also entirely different. The diameter of the Lightning Network is at least twice as large as that of the BA network most of the time. The diameter of the Lightning Network rises slightly and then stabilizes at 12, while the diameter of the BA network is decreasing.

FIGURE 6. Diameter change of the network.

TABLE 2. Changes in network diameter before and after removing tandem nodes and comparison with BA model.

Why the diameter of the Lightning Network is such a trend, we explored the reason for its creation by finding the maximum shortest path between nodes. Figure 7 shows the visualization of the Lightning Network on day 100, and it is easy to see that there are many tandem connections between nodes at the edge of the network. Figure 8 shows the visualization of the Lightning Network on day 200, and we can see that this crosstalk becomes more serious. Between day 100 and day 200, the diameter of the Lightning Network increased from 9 to 12 and has been maintained up to now. We extracted the longest and shortest paths at each stage and found that these longest diameters were associated with one of the crosstalk structures [15 307, 6,504, 2,947, 13 555, 9,610, 13 606, … … ]. We removed this tandem structure, recalculated the diameter change of the network every 100 days, and found that the network’s diameter decreased, as shown in Table 2. This indicates that the presence of this crosstalk structure has been influencing the diameter of the network. Although the longest crosstalk structure in the network was removed, the network’s diameter still reached 11 because other crosstalk structures in the network affected the network’s diameter. The crosstalk phenomenon between nodes caused the rapid increase in node diameter at the beginning of the development of the Lightning Network. This crosstalk has been influencing the network’s diameter. From the [23], it is known that there are three reasons for nodes to establish connections in the Lightning Network: 1. Business/Financial Interests, 2. Gratification from social connections and promoting participation in the network, and 3. privacy, transparency, and autonomy of the community. As the tandem connection between nodes does not lead to increased benefits and may cause a decrease in transaction efficiency or even an increase in transaction costs. This tandem also does not lead to a sense of participation in the autonomous community because it is only one connected node and does not generate influence. So one possible reason is that it is a social behavior. The act of social crosstalk between nodes expands the diameter of the network, and this phenomenon is prevalent in the Lightning Network.

FIGURE 7. Day 100 Visualization of networks and their tandem nodes. A large number of tandem structures can be seen at the edges; The solid red line shows the network’s diameter.

FIGURE 8. Day 200 Visualization of networks and their tandem nodes. As the network grew in size, the same sequence of day 100 strung together more nodes and formed a ring in the network (top left part of the figure), which has been having a massive impact on the network’s diameter.

### 4.2 Channel and Node Preference Connection Analysis

In this section, we will analyze the Lightning Network channels from a channel point of view and the tendency of the connections between the nodes.

##### 4.2.1 Channel Analysis

Channels are the foundation of the Lightning Network transactions, and a specific capacity exists for the nodes at both ends of the channel to make transactions (as shown in Figure 1). The nodes top up the capacity at both ends of the channel after it has been established. Thanks to the robust privacy design of the Lightning Network, only the starting node, and the destination node can know the specific information between the nodes of the transaction [11]. Therefore, the Lightning Network channel analysis helps us understand more deeply the composition of the funds of each node in the Lightning Network and clarify the status of the channel.

Whether a channel in a Lightning Network is disconnected after it is established depends on the nodes at both ends. There are three modes of channel disconnection in the Lightning Network: Cooperative close, Force close, and Fraudulent Force close. In a cooperative close, both channel participants agree to close the channel and settle the final state of the channel onto the blockchain. If only one participant is online or if the participants disagree on the state of the channel, one participant can perform a force close of the channel without the cooperation of the other participant. If a node in the channel tries to broadcast a transaction that is not recognized by both parties, this channel closure is called Fraudulent Force Close. A penalty transaction punishes a malicious node for attempting a fraudulent force close. The penalty transaction transfers the malicious node’s portion of the funds in the channel to the node that they were attempting to defraud8.

The status of channel openings and closures in the Lightning Network is shown in Table 3, from January 12, 2018 to April 20, 2021, the Lightning Network has generated a total of 147,256 channels, of which 44,200 channels are still open and 103,056 channels have been closed. Among the 103,056 channels that have been closed, the largest number of channels were closed in the cooperative mode as shown in Table 4, reaching 69,088. The number of channels closed in the force close mode is 32,439. It is reassuring to note that only 32 channels were closed as fraudulent froce closures over this long period of time. The remaining 1,497 channel closures are not recorded in our data.

TABLE 3. The number of channels opened and closed.

TABLE 4. The number of channels with different closing methods.

We calculated the lifetime of the closed channels based on when the channels were opened and closed. As shown in Figure 9, where the x-axis is time, and the y-axis is the duration of channel survival, we took the logarithm of the corresponding values. What can be derived from the figure is that there are few channels with survival times greater than 800 days, the number of edges with survival times between 50 and 800 days is approximately linearly distributed, and the number of edges with less than 50 days is again more. The largest number of edges with a survival time of 1 day is 3,699, and there are also nearly 3,000 edges with a survival time of fewer than 24 h. This may indicate that single small transactions are more present in the network.

FIGURE 9. Channel life time distribution.

In terms of the capacity of the channels, the difference between different channels is vast, as shown in Table 3, the largest capacity of the channels is up to 5,00,000,000 satoshis (5BTC), and the smallest capacity is 1,050 satoshis (0.00 000 105BTC). The average is 3,1,32 ,041 satoshis, and the median is 5,97 ,920 stoshis. We can speculate that the vast majority of channel capacities in the network are small. The specific distribution of the capacity of the channels is shown in Table 4. Channels with a capacity of fewer than 100,000,000 satoshis (1BTC) are in an absolute position, accounting for more than 99.7% of the total. This is because it is more cost-effective to use the Bitcoin network for larger transactions, and the Lightning Network itself is designed for small amounts of transactions. Therefore, channels with capacities greater than 1BTC are in the minority, and these channels with huge capacities almost always come from the merchant nodes in the network. For example, for nodes larger than 4BTC, the relationship between these nodes is derived by comparing them with the data on 1 ml.com9. Unsurprisingly, these channels with huge capacity are connections between merchant nodes in the Lightning Network. For example, the channel with short_channel_id 649417x2162x1 connects the fourth largest node in the Lightning Network, Bitrefill10, and the second-largest node, bfx_lnd111. Among them, bfx_lnd1 has a total capacity of 106 BTC, accounting for 8.431% of the entire network capacity, and 339 connections exist, accounting for about 0.7% of the number of channels in the entire network. And the three channels 660987x443x0, 656429x1122x0, 678588x1581x0 are all associated with the largest node in the Lightning Network, ACINQ12, which has a total capacity of 148 BTC, accounting for 11.728% of the entire network capacity.

##### 4.2.2 Preferential Connection Mechanism for Nodes

Looking for an answer to this question, we can think in several ways.

First, inspired by the scale-free property of the Lightning Network, we check whether the directionality of the newly connected tilts of nodes conforms to the degree-preferential attachment model. In the degree-preferential attachment model proposed by Barabasi and Albert [22], new nodes tend to be connected to existing nodes with higher degree rather than existing nodes with a lower degree. Mathematically, the probability of connecting a new node is shown in Eq. 1.

Then, starting from Closeness Centrality [47] and Betweenness Centrality [48]. Closeness Centrality describes the distance from a network node to other nodes. The Betweenness Centrality represents the number of shortest paths through a node.

Closeness Centrality of a node v is given by the expression

where N is the number of nodes in the graph and d (u, v) is the distance between node u and v. Closeness Centrality measures how close a node is to all other nodes.

Betweenness Centrality of a node v is given by the expression

$BCv=∑s≠v≠tσstvσst(4)$

where σst, where σst is total number of shortest paths between node s and t, while σst(v) is the number of those paths, that pass through v.

Under the assumption that the Lightning Network uses the shortest path for transactions, Betweenness Centrality and Closeness Centrality have practical implications. When the nodes in the network have high Betweenness Centrality, the nodes can earn more fees. On the other hand, when the nodes in the network have high Closeness Centrality, the nodes theoretically spend less when making their transactions [24].

To determine whether nodes in the Lightning Network establish new connections, we first need to obtain the newly established connections in the Lightning Network and know who initiated the connections. Still, our data do not provide the relevant information. We first extracted the dates when all nodes in the Lightning Network first appeared to solve this problem. The purpose of this is based on a straightforward fact: a node that wants to enter the network must have established a connection with another node by itself, because if no connection exists by itself, then this node cannot be discovered by other nodes so that it cannot be selected by other nodes to create any new connection. So when this node appears for the first time, it means that this node has actively established connections with other nodes in the network. This way, we get the data for the new connection.

To be able to explore the tendency of the nodes to be connected, we calculated the degree of the nodes in the network, Closeness Centrality, Betweenness Centrality. and to make the data uniform, we filtered the data between day 500 and day 1,000 because the network is almost in a stable state during this time, the edges almost remained constant and the nodes grew very little.

If the nodes in the network use the degree-preferential attachment model [22], then nodes with larger degrees are more likely to acquire more connections. However, as shown in Figure 10A, where the x-axis is the degree and the y-axis is the number of new connections in the response interval. It can be concluded that there is no degree-preferential attachment for new connections in the network, but rather a situation where the number of connections gets smaller as the degree increases. Most of the nodes in the network are connected to nodes with degree less than 200, which indicates that nodes do not have a strong tendency to connect to nodes with greater degree.

FIGURE 10. (A). Distribution of the degrees of the nodes connected by the newly added nodes (B). Distribution of the closeness centrality of the nodes connected by the newly added nodes. (C). Distribution of Betweenness Centrality of the nodes connected by the newly added nodes.

The same result appears for Betweenness Centrality. Figure 10B shows where the x-axis is the Betweenness Centrality of the nodes, and the y-axis is the number of connections that respond. The larger the value of the Betweenness Centrality of the nodes in the network, the fewer connections they attract. Most of the nodes are connected to nodes with smaller Betweenness Centrality. This indicates that the tendency to connect nodes with more significant Betweenness Centrality is also not strong.

Figure 10C shows the relationship between newly created edges and Closeness Centrality, where the x-axis is the Closeness Centrality of the node and the y-axis is the number of responsive connections. This is quite different from the distribution of degree and closeness, where the attraction to the node rises as the Closeness Centrality of the node increases, reaching a maximum around 0.35, followed by a decline. This indicates that nodes in the network with greater Closeness Centrality are more likely to be connected to newly entering nodes if they have greater Closeness Centrality than degree and Betweenness Centrality. Nodes tend to connect to nodes with greater Closeness Centrality.

It has been shown that among the attacks against degree and centrality, the attacks against degree can cause more damage with a significant decrease in the average degree and average connectivity while being split into multiple connected components [20]. If the Barabasi Albert Model is used as the underlying network, its degree prioritization will connect with more severe security risks as the network size increases. They are using Betweenness Centrality as the connectivity goal is more in line with the development of the network and the security of the network.

## 5 Conclusion

In this paper, we investigate the differences between Lightning Network and Barabasi Albert Model in terms of assortativity, diameter, and node-preferred connectivity, starting from whether the Lightning Network is similar to the Barabasi Albert Model, and discuss the reasons behind the special properties generated by the Lightning Network.

Our analysis shows that as the size of the Lightning Network continues to expand, its assortativity shows an entirely different trend from that of the Barabasi Albert Model, although the error in its fitting coefficients becomes smaller. We think this may be related to the death of the merchant nodes and edges in the Lightning Network. Currently, there is still a threshold for ordinary people to use Lightning Network, and when the merchant nodes provide simple access, there will be many endpoints that establish connections with the merchant nodes, while the death of edges may cause the creation of assortativity. The Lightning Network diameter is larger than the Barabasi Albert Model of the same size, and we found that it is related to the crosstalk between nodes in the network by extracting the diameter connections in it.

In terms of the tendency of nodes to connect, we first analyzed the channel closure, the distribution of the capacity. We found that only a few channels in the network are closed in a penalty way, indicating that the Lightning Network’s security mechanism is excellent. Also, we found that the high-capacity channels in the network are established between massive nodes in the network, while most of the channels have shallow capacity. This is ideally in line with the original design of the Lightning Network. In terms of the connection propensity of nodes, we extracted the edge-building information of newly joined nodes in the network and performed the propensity analysis of node connections. We found that nodes in the network are more inclined to connect with nodes closer to greater Closeness Centrality than degree and Betweenness Centrality.

Our findings suggest that although the Lightning Network is similar to the Barabasi Albert Model in the degree distribution, there is a significant gap in assortativity and diameter again. The assortativity and diameter are vital parameters for the network to face cascade failures and improve network efficiency. therefore, Our findings can provide insights into the simulation and autopilot function of lightning networks.

## Data Availability Statement

The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.

## Author Contributions

The characteristics examined by ZW were selected, RZ and YS completed the analysis of the various indicators of the network, and all authors participated in the preparation of the article as well as its improvement.

## Funding

This research was supported by the Zhejiang Provincial Natural Science Foundation of China under Grant No. LY20F030012; in part by the National Natural Science Foundation of China under Grant No. 62176080.

## Conflict of Interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

## Publisher’s Note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

## Acknowledgments

We thank Mr. fiatjaf for providing the data of the Lightning Network.