Apples and Oranges: On How to Measure Node Centrality in Payment Channel Networks

The Bitcoin Lightning Network (LN) disrupts the scenario as a fast and scalable method to make payment transactions off-chain, alongside the Bitcoin network, thereby reducing the on-chain burden. Understanding the topology of the LN is crucial, not only because it is key to performance, but also for ensuring its security and privacy guarantees. The topology of the LN affects, among others, the ability to successfully route payments between nodes, its resilience (against both attacks and random failures), and the privacy of payments. Existing research on LN topology focuses on studying the degree, betweenness, and closeness as metrics that better describe the centrality of nodes. However, to the best of our knowledge, previous studies do not encompass the network as a whole because of the limitation of using only the capacity of channels as its principal property. The contributions of this study are two-fold. On the one hand, this paper discusses the application of classic centrality metrics for evaluating the centrality in the LN. On the other hand, we provide alternative metrics to evaluate centrality. Our approach extends the analysis by adding metrics (strength, Opsahl, current-flow betweenness) and network properties (capacity, fee, balance, channel, and pending Hashed Timelock Contracts (HTLCs)). Based on the results obtained using these metrics, we provide an in-depth analysis of the metric that best defines the centrality of this network.


I. INTRODUCTION
Blockchain-based cryptocurrencies address double-spending problem by storing all transaction history in an immutable ledger, blockchain, to account for ownership of each coin or balance. Such an approach has its obvious scalability problems pointed out from its beginning [7], [8] and multiple solutions have been proposed. From all of them, two-layer approaches are nowadays one of the most used ones. Such solutions use an upper layer approach constructed over blockchain-based technology. One of those proposals is the Payment Channel Networks (PCN), a network that routes payments between users, being the LN over Bitcoin, the most used PCN at present. Payment channels build PCN by linking pairs of users on the network. An untrusted mechanism, used by the underlying blockchain, allows establishing a channel that connects The associate editor coordinating the review of this manuscript and approving it for publication was Yilun Shang. each pair of users. For instance, Bitcoin LN establishes its channels using a funding transaction that locks channel funds in a multisignature address controlled by both channel members. Since network users may open multiple channels with multiple users, the result is a P2P network of payment channels. Furthermore, PCNs allow the interesting property of payment atomic execution through multiple hops. Such property allows routing a payment between users A and B even if those users are not directly connected by a payment channel. The only need is that both users are linked through a payment path. The atomicity execution ensures that the multihop payment, although conceptually performed by multiple single payments between user pairs in the path, cannot be partially executed so in case one of the payment hops is executed the whole payments in the path will take place.
Having such a vision of PCN, the natural question that arises is to what extent the decentralization and untrusted model tied to the base blockchain layer have been extended VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ to those second layer proposals. To that end, measures on the centralization of PCN, such as the Bitcoin LN, has been published in multiple works [3], [11], [14], [17], [18], [24], [25]. However, as we point out in Section VII, most of those approaches do not capture the semantics of the PCN itself and only provide the first-level analysis of standard centrality measures of graph theory.
In this paper, we analyze different centrality measures of the Bitcoin LN both from a theoretical and from a practical point of view. We have chosen the Bitcoin LN to perform our practical analysis, although our theoretical approach can be applied to any PCN. We base our theoretical analysis on the very basic properties of the LN such as channel, capacity, balances, and fees. These properties can be directly identified in other PCN over which our model can be also applied. Our approach is novel in the sense that our analysis deepens into the semantics of the network properties that are specific to a PCN. Those related to channel capacity, channel balance, and payment processing fee.
The main contributions of the paper are: 1) We provide a general model for the LN, that takes into account not only the capacity of channels but also balances, fees, and other policy parameters. 2) We discuss the semantics of applying classical centrality metrics to evaluate the LN and explain how can they be used to evaluate LN properties. We also highlight important restrictions to take into account when evaluating the centrality of PCN. 3) We provide additional metrics to evaluate the centrality in the LN and explain why they are better suited for this purpose. 4) We analyze the centrality in the LN over a period of two years, using the model and semantics previously described. The paper is organized as follows. In Section II we describe a model for the LN. This model is then used throughout the rest of the paper to represent LN instances. Then, Section III discusses the usage of classic centrality metrics to evaluate the centrality in the LN, highlighting the risks and pitfalls of doing so without taking into account the particularities of this network. After that, Section IV examines the concept of a path in the context of the LN and the consequences it has when computing centrality metrics. After the discussions, Section V summarizes the metrics we propose to use to evaluate the centrality in the LN, and Section VI provides the results of evaluating centrality over real LN snapshots. Section VII surveys the existing related work and finally, Section VIII presents the conclusions of the paper.

II. A MODEL FOR THE BITCOIN LN
Several literature papers (see Section VII for more details) model Bitcoin LN via graph theory tools. However, all the proposals reviewed are based mainly on very general information about the channels, such as their mere existence between two users and their capacity. But, they rule out other more subtle information that greatly affects the flow of money between users, such as: how both parts of the channel divide the capacity of a channel (i.e., their balance in the channel), or how the routing and HTLC apply the fees.
In this section, we propose a finer model to represent a snapshot 1 of the LN. We model the LN as two graphs G 1 and G 2 , together with two functions, f V and f E , that map elements of one graph with elements of the other graph. G 1 is an undirected graph and G 2 is a directed graph. The rationale behind this decision is that there are properties of the channels that are better modeled with an undirected graph, but other properties are better represented with a directed one. Having thus two graphs, allows us to create a rich representation of the network. Moreover, this double representation allows us to apply graph-theoretic metrics to measure the nodes of the network in a significant way. Next, we describe the details of the two graphs that represent the LN using the proposed model, details summarized in Table 1.
Let G 1 = (V 1 , E 1 ) be an undirected graph, that contains static channel information that can be extracted from the blockchain.
Nodes v i ∈ V 1 represent users of the LN identified by their public keys. Edges e ij ∈ E 1 represent open channels between those users. The outpoint (transaction identifier and output index) that funds the channel uniquely identifies each edge.
The graph G 1 may be a multigraph because many different channels can be opened between a pair of nodes. Moreover, the graph is indeed undirected, because the outpoint that defines is a 2-out-of-2 multisig output, where none of the two public keys has any advantage nor privileged position, and thus both participants have the same role in the relationship.
Edges encode channel information that can be extracted from the funding transaction, e.g., the capacity of the channel. We use the double subindex notation in an edge e ij to indicate the index of each incident vertex of the edge, that is, Note that, since G 1 is a multigraph, we add an index to identify the multiple edges of the same two nodes, e (ij) k = e ijk . For simplicity, we omit this third index from the notation whenever it is not specifically needed. We denote by c ij the capacity of edge e ij , with c(e ij ) = c ij .
Let G 2 = (V 2 , E 2 ) be a directed graph, that contains dynamic channel information that is reflected in off-chain commitment transactions and P2P LN messages exchanged between nodes.
The set of nodes v i ∈ V 2 represents public keys and is the same set of nodes of G 1 , that is V 2 = V 1 . The set of edges e ij ∈ E 2 represents the current state of the channels between those public keys. Each edge is uniquely identified by the outpoint (transaction identifier and output index) that funds the channel and the source node they refer to. The graph G 2 may be a multidigraph because many different channels can be opened between a pair of nodes. 2 Edges in E 2 encode more detailed information about the channel than data stored in the edges of E 1 . The extraction of such information does not come from on-chain transactions but the commitment transactions exchanged from the LN nodes and also from the LN P2P messages that the nodes broadcast. Regarding commitment transactions, we can classify their outputs 3 in two types, depending on which of the two parties is the receiver. Therefore, we model each pair of commitment transactions as two directed edges: the edge e ij = (v i , v j ) from v i to v j will encode v i 's balance in the channel and offered HTLCs and, reciprocally, the edge e ji = (v j , v i ) from v j to v i will encode v j 's balance in the channel and offered HTLCs. We denote by b ij the balance of edge e ij , b(e ij ) = b ij ; and by h ij the balance blocked in HTLC of edge e ij , h(e ij ) = h ij .
Furthermore, edges in E 2 also encode additional information extracted from channel policies sent within the LN P2P network, such as the fee that is charged to use the channel, f ij , measured in satoshis per byte, and the minimum amount of satoshis that can be routed through that channel, m ij .
Finally, we also define two functions, f V and f E , for mapping nodes and edges between G 1 and G 2 . Let f V : V 2 → V 1 be a bijective function that maps nodes of the graph G 2 with nodes of the graph G 1 . Let f E : E 2 → E 1 be a noninjective surjective function that maps the edges of graph G 2 with the edges of graph G 1 . 2 Again, since G 2 is a multidigraph, we add an index to identify multiple edges of the same two nodes, e (ij) k = e ijk . For simplicity, again, we omit this third index from the notation whenever it is not specifically needed. 3 Commitment transactions have four types of outputs which are: local outputs, remote outputs, received HTLC, and offered HTLC. Note that, regarding the defined model for the LN presented so far, the following restrictions must be preserved: 1) The set of nodes of both graphs is the same, that is, there exists exactly two edges in E 2 , e ij and e ji . Therefore, |E 2 | = 2 · |E 1 |. 4) Let e ij = (v i , v j ) and e ji = (v j , v i ) be the edges of E 2 , the balances and pending HTLC values must be consistent with the total capacity channel, so it must hold that: To sum up, Fig. 1 shows a toy example of an LN snapshot with 3 nodes and 2 channels using the proposed model.

III. A DISCUSSION ON CLASSIC CENTRALITY METRICS APPLIED TO LN NODES
In this section, we review different classical centrality measures proposed in the field of graph theory. As well, we analyze to what extent they preserve the centrality meaning when they are computed over a graph that models a payment network, like the LN.

A. SYMMETRIC GRAPHS
In his seminal paper laying the foundations of centrality metrics in social networks [9], Freeman used the star graph as a starting point to guide his exposition. In a star graph (Fig. 2), intuition leaves no doubt as to which node is more central. Furthermore, this node is not only the center point of the star graph, but also the most central position imaginable on any graph of a similar size order. But why is this node central? It has three structural properties: it has the highest degree (i.e., the most number of neighbors), it is in the shortest paths between other nodes, and its distance to other nodes is minimal. These three properties are the basis of the three most basic centrality metrics for nodes in networks: degree, betweenness, and closeness centralities.
Given a graph of n nodes with adjacency matrix A n×n = [a ij ], where a ij is a binary value denoting whether there exists an edge between nodes v i and v j , degree centrality is defined as the number of neighbors of a node: The shortest path between two nodes is a path of the shortest length. Let σ st be the number of the shortest paths between s and t; and σ st (v) the number of those paths that pass through v. Then, betweenness centrality is defined as the fraction of the shortest paths between all pairs of nodes of the graph that pass through v: The distance d between two nodes in a graph is the length of the shortest path between them. Closeness centrality is defined as the inverse of the sum of distances between one node and all the other nodes of the graph: But to what extent are these centrality metrics relevant to evaluate nodes in the LN? Indeed, a node with a high degree is a node with lots of channels, which provides it with robustness (since it does not rely on a single or a few channels to be able to operate in the network). Moreover, a high degree also implies direct channels with more other nodes in the network and thus independence. On the other hand, a node with high betweenness is a node that is in the middle of payments between other nodes, in case the shortest path is used to choose payment routes. This allows it to have some degree of control and information about those payments (e.g., it knows the amount, HTLC values to estimate the overall number of hops, can decline participation, can delay payments), and also to obtain revenue from them in the form of fees. Finally, a node with high closeness may benefit from making payments with fewer hops, which may have consequences on both the fees to pay and the privacy of its payments.

B. SYMMETRIC WEIGHTED GRAPHS (CAPACITY)
However, these three basic metrics assume all channels are equally important (have the same contribution) to the importance of the node. Nonetheless, this is hardly the case: lightning channels have a capacity, that limits the amount of bitcoins a payment can move through them. For instance, take as an example the weighted double star graph shown in Fig. 3. To create it, one could just add v 6 to the simple star graph (Fig. 2) and connect it to v 2 , v 3 , v 4 and v 5 ; and where channels' capacity is represented as edge weights. Now, one could argue that node v 6 is more central than node v 1 , since, although they both have exactly four channels and are in the same structural position on the graph, node v 6 can make payments of a higher amount in all of its channels.
Degree, betweenness, and closeness centralities have also been defined to take into consideration edge weights. Newman [20] and Barrat et al. [2] extends degree centrality to consider weights, where the strength of a node is defined as the sum of the weights of its connections (its incident edges): where w ij is the weight of the edge between nodes v i and v j . Brandes [5] and Newman [20] generalize the centralities of betweenness and closeness for weighted graphs using the sum of the weights of the edges of a path to define its length. Therefore, the shortest path between two nodes is not the path using the least number of hops, but the one that has the least sum of weights, and distance between nodes is defined in the same terms (i.e., the sum of weights of the edges in the shortest paths between them): 55472 VOLUME 10, 2022 where d w and σ w are distance and number of the shortest paths taking into account the sum of weights as the length of paths. Getting back to our example (Fig. 3), node v 6 has now a higher weighted degree centrality (C w D ) than node v 1 (40 and 4, respectively). Yet a problem arises when applying weighted betweenness (C w B ) and closeness (C w C ) centralities to evaluate the centrality of LN nodes. In their standard formulation, weight is interpreted as the cost of using that edge, whereas capacity is not the cost but the maximum amount that can be transacted through the channel. As a consequence, both betweenness and closeness centralities are higher for v 1 than for v 6 , since all shortest paths between other nodes always pass through v 1 , and v 1 has a lower distance to all other nodes in the graph. To circumvent this problem, some authors have used the multiplicative inverse of capacity as edges' weight [18] when computing betweenness and closeness centralities. With this definition, v 6 has now more weighted betweenness centrality than v 1 (6 and 0, respectively); and also higher weighted closeness (3.3 and 0.98, respectively), as shown in Table 2.
Again, it is important to understand what these metrics evaluate concerning LN nodes. Nodes with high weighted degree centrality are nodes that have a lot of capacity to operate within the network: they can potentially transact a higher amount. However, in contrast with unweighted high degree nodes, they will not always have strong robustness or independence, since C w D does not capture how this weight is distributed (i.e., it can be concentrated in a single channel). Section III-B1 explains how can we incorporate both the strength and the degree into the evaluation.
Note, also, that a node with high weighted betweenness centrality is a node that is in the middle of payments between other nodes that choose the shortest paths with higher capacities as payment routes. We argue that this is a very artificial use of the metric, that does not capture how payment networks operate. On the one hand, the restriction that only the path with the highest capacity (i.e., the lowest cost using the inverse of the capacity as weight) is going to be used does not make much sense in a payment network: any channel that has enough balance is valid, and the best path will be chosen based on other considerations such as fees. Sections III-D and III-E2 will explain how to deal with this. On the other hand, this does not take into account other restrictions in the routes, covered in Section IV.
Analogously, weighted closeness is again not very useful since it does not make sense to consider capacity as a cost or distance between nodes. Sections III-D will explain another approach that can better capture nodes' closeness.

1) WEIGHT AND STRENGTH
Node strength as defined in the previous section only takes into account the total engagement of the node, yet obliterates how is this involvement distributed across different connections. Therefore, although node strength is presented as a generalization of node degree for weighted networks, it fails to capture the original meaning of degree. Opsahl [22] et al. proposed a different formulation to combine both degree and strength: This formulation depends on the parameter β to tune the contribution of the number of connections and the strength of the node into the centrality score: if β is 0, C wβ D is equal to the node degree; if β is 1, C wβ D is the node strength as defined by Newman; values of β between 0 and 1 provide higher C wβ D for nodes with a high degree, whereas values of β > 1 provide higher C wβ D for nodes with a lower degree. However, when evaluating the robustness of a node or ability to make payments in the network, C wβ D still falls short. For instance, if we take a graph like the one shown in Fig. 4, nodes v 1 and v 6 have the same degree and strength. Consequently, regardless of the β value chosen, C wβ D is always the same for both nodes. However, intuitively node v 1 is better connected to the network, because of how its strength is distributed across its connections. An attack (or failure) of any of his channels would just affect 1/4 of its capacity. On the contrary, a directed attack over the v 2 v 6 channel will strongly affect v 6 , making him lose most of its capacity to operate with the network. A variant of the Opsahl metric can take this into account: This measure is indeed able to capture the differences between v 1 and v 6 ( Table 3).
Again, if α is 0, C wα D is equal to the node degree; if α is 1, C wα D is the node strength as defined by Newman. For nodes with the same strength and degree, values of α between 0 and 1 provide higher C wα D for nodes with strength equally divided between channels, whereas values of α > 1 provide higher C wα D for nodes with strength concentrated in the same (or a small number of) channels (cf. v 1 and v 6 ).

C. DIRECTED WEIGHTED GRAPHS (BALANCE)
All the metrics presented so far are computed over the capacity of the nodes' channels, and thus provide information about the possible payments the node may be involved with.
Taking into account the model presented in the previous section, all of them can be computed over graph G 1 . However, they fail to capture another important detail of payment networks, the current balances of nodes in the channel. That is, at a certain instant of time, these measures do not take into account how is the capacity of the channel distributed between the two ends of the channel to evaluate its centrality. If we consider, for instance, the network from Fig. 4, the channel between v 1 and v 2 has a capacity of 10. However, the ability of both nodes to operate within the network will not be limited by this capacity, but by the balance that each of them has at that moment. If all the capacity is on v 2 's side, v 1 will not be able to make payments (or route outgoing payments) through that channel, and thus its strength will be reduced from 40 to 30 (assuming he has all the possible balance in the other three channels).
Channel balances may be represented with a direct graph, where the weight of the edges represents the balance the source node has in a channel, which corresponds to graph G 2 of our model presented in the previous section. The sum of the two edges (one in each direction) that represent a channel is thus at most the capacity of that channel. Using this representation, we can use the directed versions of the metrics presented above to evaluate the centrality of a node. Fig. 5 represents a possible distribution of balances for the network shown in Fig. 3. The edges with a balance of zero have not been drawn for readability. Most channels are completely unbalanced, with all the capacity available in just one direction. The exception is the channel between nodes v 2 and v 6 , whose capacity is split equally between both nodes.
Degree-based centrality metrics over directed graphs distinguish between outgoing and incoming edges. For instance, indegree and outdegree (C D − and C D + , respectively) take into account the number of incoming or outgoing edges, respectively; and strength is also computed separately for incoming and outgoing edges. Metrics based on paths consider only those paths that are valid considering the direction of the edges. Table 4 summarizes the centrality metrics for the directed graph example shown in Fig. 5.

D. SYMMETRIC WEIGHTED GRAPHS (FEE)
As we have seen in Section III-B, weighted betweenness and closeness centralities using capacity as weight are not able to capture the importance of a node, because these metrics are based on shortest paths and distances taking into account channel capacity as a cost.
Instead, using channel fees as weight is more representative of what rational nodes may implement since fees are indeed a cost of using the channel. Therefore, nodes with a high weighted betweenness centrality with fees as the weight will be in the middle of payments between other nodes that try to optimize the cost of their payments by choosing the cheapest routes. Moreover, nodes with a high weighted closeness centrality with fees as weigh will be nodes that can make payments with the lowest fees.
However, note that this approach, using a simple symmetric graph constructed by channels, has also a problem: channels can only be used if they have enough capacity and balance in the desired direction. Furthermore, dealing with payments in the LN, additional restrictions also apply, as we will explain in Section IV.

E. FLOW BASED CENTRALITY METRICS
One of the problems of using betweenness centrality as defined in the previous section is that it is based on shortest paths. Even when considering weight, nodes that may offer connectivity to the network, but that are not found in the middle of these shortest paths are not considered to have any influence.
Let's consider again nodes v 1 and v 6 from 3 and note that betweenness centrality (C 1/w B ) is 0 for v 1 and 6 for v 6 ( Table 2). These values may seem to indicate that node v 1 will never be in the middle of payments between other nodes. However, in a payment channel network, this may not be the case: with the information, we currently have in the graph, payments of less than or equal to 1 would have no reason to prefer to be routed through node v 6 over node v 1 . Flow-based centrality metrics allow overcoming this limitation.

1) FLOW NETWORKS
Flow networks are used to model different problems, from pipes moving water to electrical or information networks.
A flow network is a directed graph that has a nonnegative capacity in each edge (c : V ×V → R ≥0 ). Nonexistent edges are assumed to have a capacity of 0. A flow network has two special nodes: a source s and a sink t.
A flow is defined in a flow network as a function that assigns a real number f to each pair of nodes (f : That is, at each edge the flow f must be lower or equal than the capacity c (capacity constraint), and the flow must be preserved at each node except for the source and the sink (flow conservation constraint).
The value |f | of a flow is: Given a flow network, a source, and a sink, the maximumflow problem consists in finding flow f of maximum value |f |. Let f st be a flow of maximum value between nodes s and t. Let f st (v) be a flow of maximum value between nodes s and t passing through node v.

2) BETWEENNESS CENTRALITY BASED ON FLOW
Freeman [10] extended the betweenness centrality metric based on flow, where a node is more central to the extent where more flow between pairs of other nodes in the graph depends on it. That is, to define the flow centrality of a node v is through the amount of flow between any pair of nodes in the graph that needs to pass through v divided by the sum of the maximum flow values of any pair of nodes in the graph: Table 5 shows the flow centrality measure for the example graph from Fig. 3. In contrast with traditional betweenness centrality measures based on weight and its inverse (C w B and C 1/w B , respectively), flow based betweenness centrality (C F ) is able to capture the ability of nodes to be in the middle of payment paths. Node v 6 is more central than v 1 , to the extent that payments between other pairs of nodes will be able to be of a higher amount than payments through v 1 . However, node v 1 may still be in the middle of payments between other nodes, given that it has a tenth of the C F of v 6 . In contrast to C 1/w B , where the node is not considered to be on the shortest paths and is therefore assigned a centrality of 0).
Flow based betweenness centrality allows to measure the importance of a node in a payment network to the extent it is in the middle of payments between other pairs of nodes (and therefore collect metadata about those payments and potentially profit from them).

3) BETWEENNESS CENTRALITY BASED ON CURRENT FLOW
Brandes [6] proposes a centrality metric based on variations of betweenness and closeness, but with a different model in which information spreads efficiently similar to electrical current. The proposed metric overcomes the limitations related to execution times and space requirements that arise with computing large networks. Regardless of the approaches taken in flow betweenness, about including nongeodetic paths in a node's total score and measuring the amount of flow that passes through a node, its paths must be optimized to achieve their maximum value, and thus, solve real situations in which information moves randomly.
A similar approach taken by Newman [21] measures betweenness centrality based on random walks, same as current-flow betweenness (C CF ) which measures the portion of current flow that passes through a node v between all possible node pairs in the network. The C CF of a node v can be defined as the amount of current that flows through a node averaged over all node pairs s and t. To be more specific, C CF of a node v is the average of the current flow over all sourcetarget pairs: .
where I V (st) represents the current flow through a node v between source s and target t and 1 2 n(n − 1) is a normalizing constant. Table 6 shows the current flow centrality measure for the example graph of Fig. 3. We compare again the traditional betweenness measures based on weight and its inverse, as well as, the flow betweenness. On the contrary, to the previous metrics, current flow based betweenness VOLUME 10, 2022 centrality (C CF ) captures the flow that passes through a node in the middle of payment paths. Similar to flow betweenness, node v 6 is more central than v 1 , therefore the flow of payments between other pairs of nodes will be greater than payments through v 1 . However, nodes v 2 to v 5 are even more central than v 1 because those nodes can process more flow than node v 1 .

a: FLOW-BASED METRIC SELECTION
Luo [16] states that C F and C CF share a similar behavior for measuring the frequency of a node v among a couple of nodes s and t. However, these metrics differ in that C F bases its calculation by comparing the maximum possible paths containing node v. Furthermore, this metric can be described as the proportion of the volume of flow that passes through v when the flow reaches the maximum value [1]. However, this metric might ignore paths that are central in the network when they are not crossed by any unit of flow for pairs of nodes s and t [15]. On the other hand, C CF measures the frequency of a node v in a random-walk, a name that is also given to this metric [6], [19], between nodes s and t when calculating all paths existing between those nodes. Unlike C CF , C F is not a realistic metric since it only considers a small subset of possible paths between nodes. At the moment when we consider the complexity of both metrics, C F can be calculated in time O(m 2 n), instead, the complexity of C CF is O((m + n)n 2 ) using matrix methods. This comparison indicates that the computation demand of C CF is comparable to C F . Therefore, based on the aforementioned, we select current-flow betweenness as a metric to obtain the frequency of a node that occurs on a path.

IV. CONNECTIVITY IN THE SCOPE OF A PAYMENT NETWORK
The edges between nodes and the paths that form those edges define connectivity in classical graph theory. A path in a graph is a sequence of incident edges such that neither vertices nor edges are repeated. Although not introduced explicitly, the paths are the basis of some of the centrality measures we have reviewed in the previous section, such as betweenness and closeness centrality.
However, such a basic definition of a path may not be suitable in the scope of a payment network like the LN, since not all paths defined in this simple manner are valid payment routes in the modeled payment network. There exist some additional restrictions for a path to be a valid payment route.
Therefore, to provide more accurate centrality measures for the modeled LN, we redefine the concept of a path.
We define a payment path for an amount σ as a path with the following restrictions: 1) There is enough balance in all the channels to fulfill the payment.
2) The length of the path is smaller or equal to 20.
3) The number of existing HTLCs in each channel is less than 14. 4) The policies of the nodes in the path are compatible.
a) There exists a set of timeouts for all HTLCs in the path that fulfill the conditions on the nodes' policies for all nodes in the path. b) The amount of payment is higher than the minimum (σ > min_htlc). Note that the first restriction is a general restriction of any payment network while the other ones are more specific to the current LN implementation and are extracted from its specifications. For restriction 2, we refer to BOLT 4 Section Packet-Structure. Instead, restrictions 3 and 4b refer to BOLT 2 Sections Adding an HTLC-Rationale and The open_channel Message respectively. Finally, for restriction 4a, it refers to BOLTs 2 and 7 Sections cltv_expiry_delta Selection and Recommendations for Routing respectively.

V. PROPOSED CENTRALITY MEASURES IN THE SCOPE OF LN
Once reviewed all possible centrality measures that can be directly computed on the graph that model the LN, either the symmetric one G 1 or the directed one G 2 , 4 we now propose and justify which of them are suitable to measure the centrality of the nodes of the network and which is the property that such centrality measure provides, in terms of robustness/resilience or surveillance/control. Table 7 summarizes all the metrics considered in the measures presented in Section VI. The first column of the table identifies the measure and the second one provides the exact formula used to compute such metric. The third column provides information about the graph over which the metric is computed. Note that some metrics may have a different meaning if computed on a symmetric (G 1 ) or a directed (G 2 ) graph. The Weight column indicates which parameter of the LN is selected as the weight for the calculation (in the case of a weighted metric).
The Restrictions column indicates which restrictions have been considered when applying some specific measures. Note that two clear sets appear when dealing with restrictions: measures based on direct connectivity (degree) and measures based on indirect connectivity (path). The restriction that we have taken into account for direct connectivity is the existence of the channel (so the corresponding edge in the graph) and whether or not such a channel is enabled in the policy information that the node broadcasts. Regarding measures using path connectivity, we have applied the concept of payment path defined in Section IV with the restrictions indicated. Finally, the last column of the table provides a brief description of the meaning of each measure.

VI. MEASURING THE LN
The moment a pair of nodes open and, at some point, close a payment channel, these two transactions are the only ones added to the blockchain. In theory, the payer and the payee can send an unlimited number of transactions to each other without committing them to the blockchain. A payer may send such transactions with the aid of the global view of the PCN topology, which is the main input for the routing algorithm that requires one to be aware of the structure of the network. In consequence, each node has to gather routing information through broadcasting messages (channel_announcement and channel_update) through the peer-to-peer network.
Although the transmitted messages contain information such as channel capacity, fee, and signatures, they lack to disclose the channel's balance due to privacy reasons. This factor could incur in that a payment may fail due to the uncertainty that sufficient funds are available to route a transaction. However, the payer may attempt to send a payment a given number of times, in which one could be successful. To avoid such a failure of insufficient funds, especially on multihop payments, LN uses HTLC to ensure balance security. Similarly, in case of a stuck payment, HTLC allows reverting it, by the expiration of the transaction time locks. However, to process HTLC, the nodes involved in payment must be online. Otherwise, funds locked could take place for some time, or even, in the worst case, the funds could be stolen by an adversary.
Based on the depiction of the LN model described in Section II and the description of restrictions in Section IV, we evaluate the results of the simulations obtained from the implemented metrics explained in Section III. Altogether, we analyze 12 metrics divided into 5 scopes (degree, strength, Opsahl, betweenness, and closeness) as described in Table 7. Likewise, based on their scope we apply specific restrictions as are enabled channels (degree, strength, and Opsahl) and valid payment path (betweenness and closeness).
Our goal is to draw conclusions regarding the evolution of the metrics over time, i.e., since its conceptualization, we want to know if LN has been prone to be more or less centralized. As well, since our approach makes use of restrictions on paths, it makes us wonder whether or not their use affects the results of the computations and if this is the case, how much error is injected. On the other hand, from the analysis of metrics as betweenness, we are interested to know the degree of error injected if normal betweenness is used, as well as if there are lots of differences between the results of the different metrics based on the rank correlation coefficient.

A. SNAPSHOTS, DATASET AND THE NETWORK
In order to make multihop payments, LN clients need to know the current state of the network, that is, which other nodes there exist, what channels do they maintain, and what are policies applicable to those channels. A snapshot of the LN is a graph representing the current state of the network from the point of view of a node.
Although a snapshot captures the composition of the network, its scope does not cover the totality of channels that might exist. The view of the network depends on the information that a node collects, and probably private channels between other pairs of nodes will not be reflected. Therefore, our analysis is limited to public channels since roughly 13.48% are private channels [13].
In this paper, we use a dataset of LN snapshots captured by Elias Rohrer [23], [24]. The dataset contains snapshots of the network every 6 hours, over a two-year period (from October 2018 to November 2020). For our analysis, we subsampled the dataset and selected one weekly snapshot. We omitted periods where data were corrupted. Moreover, whenever the snapshot represents a disconnected graph, we restrict our analysis to the biggest connected component (that always contains more than 99% of the nodes of the network). Table 8 summarizes the main properties of the selected snapshots.
The first consideration to take into account is related to the channels, which can be either enabled or disabled.  We consider a channel to be disabled when either of the policies of both nodes in the channel is set to disabled = True or the whole policy is set to node_policy = null. Fig. 6 shows the grouped distribution of the channels between pairs of nodes based on their capacities for the 55478 VOLUME 10, 2022 snapshot corresponding to Jul. 31, 2019. For instance, Fig. 6(a) shows that there are 1.1 · 10 4 node pairs that created channels with capacities between 10 5 and 5 · 10 5 satoshis, of which 5.7 · 10 3 channels are disabled.
Even so, this range of channel capacities is not the one with the highest accumulated capacity among the channels. Fig. 6(b) shows that between 10 7 and 5 · 10 7 satoshis in channel capacities, there is a cumulative capacity of 4.8 · 10 10 of satoshis of which 5.8 · 10 9 satoshis are on disabled channels. Of this grouped distribution, 16.7 · 10 9 satoshis are the capacity setting that has the highest accumulated capacity with an amount of 23.3 · 10 9 between 1,248 pairs of nodes. Similarly, for that accumulated capacity, 2.3 · 10 9 remain among 143 disabled channels. These properties shape the LN topology that makes it peculiar, even more so, if we consider restrictions in the computation of the centrality metrics.
Another interesting property of the network is shown in the last column of Table 8, where it shows the number of pairs of nodes with more than one channel (multiple channels [4]). Fig. 7 shows the results of the aforementioned column, considering both the enabled and disabled channels for the snapshot with the highest number of channels (Jul. 31, 2019). Note that a vast majority of node pairs share at least one channel and a small percentage have two or more that correspond to hub nodes on the LN.

B. THE EFFECTS OF RESTRICTIONS ON CENTRALITY
As we explained in Section IV, not all paths on the LN graph can be used as payment paths. Therefore, additional restrictions must be considered to ensure that a given path can be used to make a payment on the LN. In this section, we provide the results of our experiments by calculating the centrality measures directly on the LN graph. Then, we compare these results with the same metrics calculated taking into account the restrictions on valid payment paths and enabled channels. Due to space constraints, results from one single snapshot (Sept. 4, 2019) are included. For the remaining snapshots, similar results were obtained in the analyzed graphs.
As shown in Table 9, we run two different simulations to compute the centrality measures.
In the 1 st simulation, two general restrictions are considered that remain throughout the 2 nd simulation. On the one hand, to be able to use a channel in a payment path, the policies of both nodes in the channel must be configured as enabled (restriction 0 in Table 9). On the other hand, restriction 2 of Section IV indicates that payment paths cannot have more than 20 hops. Therefore, we use the value given in the LN specification for the routing protocol 5 [13]. Note that both restrictions are deterministic and enforced by standard LN payment protocols.
In the 2 nd simulation, we apply all restrictions defined in Section IV in which multiple parameters are defined. First of all, we set to 100k (10 5 ) satoshis the amount of the payment in our simulation, so the minimum balance needed in restriction 1 should be that value. Furthermore, as indicated above, we consider the limit of 20 hops for restriction 2. Regarding restriction 3, the LN specification for opening a channel 6 states that 483 is the limit for the number of pending HTLCs. Even though, we set the value of 14 as the limit for the number of HTLCs existing for each channel. Moreover, through a seed, we generate pseudorandom HTLCs, holding the same random generation for both simulations. This process is executed for each channel with its corresponding payment amounts and timeouts. The former reduces the balance in the channel until, at most, balance = 0. The latter increases for each channel the total timeout up to the upper limit given by time_lock_delta, which corresponds to the validation of restriction 4a. Finally, the minimum HTLC needed in restriction 4b is fixed to σ = 10 5 .
Note that, in addition to these parameters defined for given restrictions, other values are needed in the payment network for the simulations. In particular, the balance of each node in the payment channel is required to decide whether a payment can be forwarded through that channel. Although for privacy reasons, channel balances are not publicly available, it has been proven that it is possible to learn channel balances executing any of the attacks already described in the literature [12]. However, for ethical reasons, we do not perform these attacks on the live network, so in both simulations, we generate the channel balances through a constant distribution, i.e., half the capacity is assigned to each side of the channel.
Even though we use the parameters of the simulations as a starting point to evaluate the network as a whole, we can indeed tweak such values to create different scenarios and therefore evaluate such a network to improve its payment algorithm. For instance, we can use average payment amounts expressed in satoshis for the restrictions 1 and 4b. We can consider one satoshi as the minimum interval, which is the default minimum HTLC given by the LN policy, and 10 5 satoshis as the maximum interval, since values above this interval have the highest failure rate for the payment path. This scenario can increase the number of nodes participating in payments, but can also be reduced by the fees charged for each hop in a payment path.
Similarly, we can obtain a varied engagement of the nodes in the network using distributions other than the constant for the balance, such as uniform, normal, exponential, or beta distributions. Such diverse assignations of the balance may describe a scenario closer to the network reality. Likewise, for restriction 4a, we can draw a scenario in which the timeouts increase on each pending HTLC. This modification affects the availability of channels for a payment path since it is constrained by time_lock_delta. These scenarios are an option to have a deeper analysis focused on improving the payments, but we limit the scope of our analysis.
In the next sections, we provide the results for each of the metrics, showing the cumulative distribution function (CDF) of the centrality values of all the nodes in the graph. We split the results into two different measures, degree-based measures and path-based measures, indicating both results for the 1 st and the 2 nd simulation.

1) DEGREE-BASED
Degree-based centrality measures are degree Table 7 for details). The first three values can be measured over the modeled graph G 1 since such measures do not involve any edge direction of the graph. However, for incoming and outgoing measures of strength and Opsahl, G 2 needs to be used. Note that even when the pending HTLCs modify the channel balance, we get the same results for degree-based measures in both simulations. Since, although HTLCs reduce the capacity of the channel, this reduction only applies to metrics that consider incoming/outgoing values (balances), but not those that do not consider it (capacity). Consequently, even though the channel balance is essential at the time of payment, it is irrelevant in case the channel is disabled.
Regarding Node Degree, Fig. 8 contains the values of this metric that are the same for the 1 st and 2 nd simulations. As well, taking into account restrictions makes the network average degree goes down from 12.25 to 7.18, and the median from 3.0 to 0.0. The average RMSE of node's degree is 18.73. From the plot, we can observe that, when not taking into account restrictions, almost 50% of nodes are wellconnected with 3 or more connections. However, such good connectivity is reduced to 30% of nodes when restrictions are considered. These differences are the result of a network with lots of channels disabled with 29,882 out of 72,274 channels which represent 41.34% disabled channels. As we review the remaining metrics, we will further explain this behavior in the next paragraphs. Differences between restricted and unrestricted measures are also prominent when analyzing Strength and Opsahl metrics that derive from the capacity 7 of the channels. As shown in Fig. 9, average node strength has a reduction of 16.64% (from 28.54 · 10 6 to 23.79 · 10 6 satoshis), and the median of 100% (from 972 · 10 3 to 0 satoshis). Also, in Fig. 10, the reduction on average Opsahl centrality (for α = 0.5) is 26.26% (16.18 · 10 3 to 11.93 · 10 3 satoshis) and the median once again 100% (1.67 · 10 3 to 0 satoshis). These differences are the result of 83.34% (TotalUnrestrictedCapacity = 84, 173, 823, 510 and TotalRestrictedCapacity = 70, 158, 741, 106) of the overall capacity is on enabled channels.    Table 7 for details). Note that all those metrics are computed using edge direction, so in our model definition and simulation they are computed over G 2 . That means in the directed graph that represents the network with its balances, fees, and the blocked balance h ij by the existing HTLCs. The total value h ij for each channel and its timeout is randomly set through a seed that generates the same values for both simulations, which affects the balance of each side in the payment channel. Fig. 11 and 12 show the results of each simulation for the betweenness and closeness centrality respectively with its variations as described previously in Table 7. At the moment, we compare the results of the metrics with weights for each simulation. There is a fluctuation in the values according to how the restrictions were used to compute the given metric. For instance, on the average betweenness betweenness betweenness for 1 st simulation, the reduction is 22.70%, however, this percentage compared with the 2 st simulation is 14.52%.

Path-based centrality metrics are Betweenness
Instead, the average weighted_betweenness weighted_betweenness weighted_betweenness has values of 2.90% and 1.76% respectively, which shows a certain relationship given by the decrease in the balance because of existing HTLCs. On the contrary, for the average weighted_betweenness_cap weighted_betweenness_cap weighted_betweenness_cap which are 13.74% and 6.20% respectively, the aforementioned relationship does not last since the centrality measure has to consider paths with greater capacity to make a payment. Finally, the current_flow_betweenness current_flow_betweenness current_flow_betweenness metric has an average of 12.17% and 8.39% respectively, which when comparing its average ratio with weigthted_betweenness weigthted_betweenness weigthted_betweenness metric, its results (1.45 and 1.57 respectively) are similar. Based on these results and the fact that betweenness indicates how much control has a node over the network, the centrality should be measured by a combination of factors such as: fee, capacity, and balance instead of relying on a unique property of the channel. Table 10 summarizes the values of both simulations for the betweenness centrality.
Subsequently, we took a similar approach with closeness metrics, as shown in Fig. 12, to determine how reachable is a specific node. Along with whether it would be the most central node in case it is located at a node distance from each other. For the closeness closeness closeness, its average is 47.75% and 34.93% respectively, which follows a similar explanation about its marked difference due to the presence of existing HTLCs in the channels. On the other hand, for the weighted_closeness weighted_closeness weighted_closeness, the average is around 100% and 50% respectively, in which, the results show almost a flat trend that could be due to the presence of nodes with a large degree, i.e., a given number of nodes are reachable quite easy. In any case and regardless of the specific metric used, restrictions heavily affect the results. This tendency determines that centrality has to be defined by not only one metric but for a set of them considering more than one property of the network. Table 11 summarizes the values of both simulations for closeness centrality.

C. RELEVANCE OF NODES ACCORDING TO CENTRALITY
Once we review the results of the metrics as a whole, it is appropriate to take a closer look at the most relevant nodes from the snapshot of Sept. 4, 2019. In doing so, we intend to find out how important some nodes on the network are to carry out payments either by the number of channels connecting them to the network or by the total capacity among those channels. For our analysis, we select five nodes. Four out of 5,897 nodes show high connectivity and Bitrefill Thor and WalletOfSatoshi.com are the pair of nodes with the most channels with 153 between them, none of which is disabled. On the other hand, the node that opened the most channels is 1ML.com node ALPHA with 830 of which 400 are disabled. However, LightningPowerUsers.com is the node that has the most channels with 1,255 of which 473 are disabled. Finally,  ACINQ is the node with the highest capital distributed among its channels with 4.89 · 10 9 satoshis. Table 12 shows, for the nodes mentioned above, the results and their positions within the degree-based metrics among the most relevant nodes. It is worth mentioning that these results come from G 1 where only the enabled channel restriction is considered. LightningPowerUsers.com has the highest degree, so it can be considered as the main hub 8 in the network. Instead, 1ML.com node ALPHA can be seen as a beacon 9 since it has the most open channels with other nodes. Even though, its strength is the lowest compared to the other four nodes. Also, ACINQ has the highest strength among the nodes, which is one of the preferred metrics for analyzing a weighted network. This result could mean that this specific node has a high level of involvement in the network, although its degree is not the highest. Due to the greater number of channels connecting WalletOfSatoshi.com and Bitrefill Thor, we can assume this pair of nodes is a bridge. 10 Although WalletOfSatoshi.com has a higher degree, it has a low strength compared to Bitrefill Thor. By analyzing Opsahl, which combines degree and strength with a tune parameter α = 0.5, once again LightningPowerUsers.com has a relative importance in the network. Nevertheless, even 8 Defined as a node that connects with many other nodes 9 Defined as a node that handles information about the awareness of the network topology. 10 Defined as a pair of nodes that create a tie between nodes that would otherwise be disabled to perform payments without a direct connection. without the highest degree, ACINQ is the node with both the highest strength and Opsahl. As a consequence, the importance of a node is not only due to the number of channels that connect it to its neighbors, but also due to its participation in the network.

2) PATH-BASED
On the other hand, Table 13 compiles the results and their positions within the path-based metrics for the same five nodes. Thus, we analyze them through the betweenness metrics, with restrictions on the valid payment path mentioned in Section IV. Overall, these metrics give us an idea of the extent to which a node participates in the transactions between other nodes. As well, it indicates that a node could control the network since its income is proportional to how central it is with respect to the payment route. Again, LightningPowerUsers.com is the one with the highest betweenness scores, the same as the degree metric. The importance of this node lies not only in its numerous connections but also in how it stands among its neighbors, which makes it a broker. 11 Although ACINQ generates the highest fee income and has the greatest strength and Opsahl, it handles less capital compared to LightningPowerUsers.com. Besides, 1ML.com node ALPHA, which has a low strength, its betweenness metrics results are quite higher compared to the bridge nodes. The reason could be because this node creates most of the channels that allow it to connect with the network without making mostly payments.  On the contrary, when we compare the bridge nodes, the relevance of Bitrefill Thor decreases with respect to WalletOfSatoshi.com. This fact is more evident on the metric weighted_betweenness_cap, which means that WalletOfSatoshi.com has a higher capital distributed among its neighbors. As well, the revenue from fees charged by this node is slightly higher, which could mean that this node could be continuously chosen as a payment intermediary. Finally, the current_flow_betweenness metric restates the behavior seen so far. Nodes with a higher degree and betweenness, especially with weighted_betweenness_cap, have a higher probability to participate in payment routes, i.e., these nodes withstand a higher traffic load than most of their neighbors.
Lastly, Table 14 contains very similar results between the five nodes for the closeness metrics. Although, when we analyze closeness values, the LightningPowerUsers.com node keeps a higher centrality. It indicates that the node is well connected at a short distance from the other nodes and could efficiently distribute payments. Regarding the weighted_closeness metric, the results of the five nodes are the same, which means that each node applies the same fee. Therefore, they can be used to route payments without diminishing their centrality.

D. METRICS CORRELATION
The metrics that we propose are conceptually more suitable for measuring centrality in payment networks. However, these metrics have the drawback that they are computationally more expensive to calculate. In consequence, we are interested in observing the correlation between the metrics that we propose and other simpler ones. Since, if the correlation is high, then we can use the simplest ones as a proxy as long as there are computational restrictions. For that purpose, we use Spearman's rank correlation to determine the degree of association (strength and direction) of a monotonic relationship between two metrics. The value of the coefficient ranges from −1.00 to 1.00, depending on how the two variables are related, for the strongest negative and positive correlation, respectively. The sign of the coefficient corresponds to the direction of the relationship, i.e., if it is positive, one variable increases as the other tend to increase, meanwhile, if it is negative, one variable decreases as the other tends to increase.
For the first part of this analysis, we use the snapshot from Sept. 4, 2019, to compare the results of the metrics from the 1 st and 2 nd simulations. In addition, we decided to show the correlation coefficients of the metrics using a heat map, since it helps to visualize the variance between multiple metrics, show similarities between them as well as detect if there is any correlation between them. In Fig. 13, whose results are analogous to both simulations, there is a low-to-medium relationship between the betweenness metrics, which remains when compared to the degree metric. On the other hand, there is a strong relationship between weighted_betweenness and weighted_betweenness_cap metrics. In that case, the coefficient value is the same (0.62) among the results of both simulations, even though, in the 2 nd simulation: (1) the balance of the channels decreases because of the existing HTLCs and (2) the restrictions applied in the network. For the last part of this analysis, and as mentioned above, the snapshot set used in our study covers data for the span of a couple of years. These data allow us to obtain a wide range of information to analyze. We compared the results of the 1 st simulation between three snapshots since Oct. 2018, with a lapse of one year between the other two snapshots. Thus, we can infer, based on the results shown in Fig. 14, that the degree metric keeps a constant correlation with the metrics of betweenness, weighted_betweenness (capacity and fee), and current_flow_betweenness. For instance, on 2018 the strength of association of degree metric against these four betweenness metrics was 0.22, 0.21, 0.20, and 0.29 respectively, as well in 2020 the results kept slightly similar values 0.23, 0.23, 0.21, and 0.30 respectively.
Similarly, among these same four metrics hold a strong correlation compared with the remaining metrics. In fact, comparing the results between 2019 and 2020 shows that the relationship strengthens over time. For instance, in 2019, the relationship between betweenness and the metrics of weighted betweenness (fee and capacity) and current flow betweenness is 0.31, 0.35, and 0.17, respectively. The results of the same metrics increased for 2020 with values of 0.41, 0.44, and 0.26, respectively. Although, when we compare both weighted betweenness metrics (fee and capacity), these metrics keep an even stronger correlation, the highest value being 0.67 for them in 2020. As the LN structure adjusts over time, the correlation comparison between snapshots gradually decreases for the betweenness and closeness metrics. For instance, in the case of weighted betweenness (fee and capacity) in Oct. 2018 they maintained a degree of relationship between 0.51 and 0.46, respectively. By Oct. 2020 it was reduced to −0.04 and −0.11, respectively. Based on these results, the main conclusion could emerge to explain the correlation of the centrality metrics. For a given pair of metrics, the correlation values between different snapshots vary more than five percentage points from each other. However, these metrics can provide insight into the evolution and behavior of the network. This conclusion lies in its lack of dependence between one and the other metric, but they are also necessary because they do not have redundant information.

VII. RELATED WORK
Our work builds on prior research to expand the analysis of centrality measures, and thus, to get a deeper grasp of the semantics of Bitcoin LN properties. The period over which these works took place goes from as long as the one performed in [3] to a more concise one as in [25]. Additionally, research as [14], [17], [18], [25] modeled LN, through graph theory tools, from a general point of view by getting together basic data of channels such as: channel existence among users and its payment capacity. Regarding to the model used to depict LN, research [3], [11], [14], [18], [24], [25] represent the network as an undirected weighted graph. The weighted property employed on the analysis was the capacity, considering that funds on channels have an unknown distribution and channels' direction changes constantly. Table 15 outlines some studies that expose the network topology with their characteristics and attributes as well as some metrics. However, these proposals dismiss meaningful properties of the network related to channel capacity, the balance of each node that shares a channel and fees used for payment processing. From the set of proposals mentioned above, the model on [3] is the only one that depicts the graph as a multigraph, i.e., this model considers the probability that nodes may have multiple channels between them. On top of that, [24] describes LN's topology on its simplest representation as a graph with nodes and channels without considering either weight or direction.
Based on these premises, we collect snapshots for a lapse of two years to evaluate the evolution of the network concerning centrality measures. As part of our research, we propose to model LN through G 1 12 and G 2 13 graphs. Each one encompasses the whole information of the network without leaving aside network characteristics that are essential at the time to comprehend the payment flow between buyers, sellers, and intermediate hops. Therefore, modeling of both multigraphs has to preserve the restrictions defined in Section II, since each one allows us to analyze this payment network in different contexts. Specifically, G 1 handles information related to LN properties such as: multiple channels between a pair of nodes that might or not be enabled to perform payments, and payment capacity. Similarly, G 2 , besides those LN properties of G 1 , handles information of channels such as balance, balance blocked in HTLC, and channel policies (fees and minimum payment amounts routed by the channel).
On the other hand, most researches provide highlights about the centrality measures such as degree [14], [17], [24], betweenness [11], [14], [24], [25] and closeness [11], [14], [25]. Also, some approaches [3], [17], [24] state the LN structure is best characterized by a centralized network, which is compatible with a core-periphery network [14]. In addition, each proposal attempts to determine the centrality metric that best defines this payment network, beyond the usual measures. For instance, [14] uses a core-periphery structure, [3] focuses on estimating the income by traffic volume and number of failed payments, [24] finds out the average maximum flow and the expected payment success ratio, and [18] determines the average local efficiency among all nodes. Nonetheless, they lack emphasis on LN properties that define more precisely the flow of satoshis between users, based on the fees that modify the payment capacity of the channel.
To the best of our knowledge, no proposal captures the relevant details of payment networks, since the reviewed works do not consider the distribution of balance, fees, blocked balance on HTLC, the minimum payment amount, and channel availability. These approaches only consider the channel capacity that may be involved with payment to evaluate its centrality.

VIII. CONCLUSION
In this paper, we study node centrality in the network of channels of the LN. To do so, we first provide a model for the network that incorporates many properties (such as balances, disabled channels, or fees) and restrictions (such as payment path lengths or minimum payment values) omitted in previous studies. We justify why these properties are 12 Undirected weighted multigraph with static channel information 13 Directed weighted multigraph with dynamic channel information relevant for studying centrality, and we propose a set of metrics to evaluate the node centrality in the context of payment channel networks. Finally, we use the proposed model and metrics to study the centrality of the LN for a period of two years.
Our results show that there are significant differences in the centrality values when these additional properties and restrictions are taken into account. Overall, the error injected into path-based metrics ranges from 1.14 to 12.82 percentage points. Although, for the weighted_closeness metric, its deviation is 50 percentage points due to a sizable reduction in the number of channels. On the other hand, when comparing normal betweenness against the other betweenness variations, the error injected by the first one is greater than the rest of the results. For instance, there are 7.04 (weighted_betweenness) and 0.64 (weighted_betweenness_cap) percentage points of difference with normal betweenness.
Some of the metrics we propose to use are computationally expensive to compute. Therefore, we also studied the correlation between different metrics to analyze if some metrics can be used as proxies for others. In our simulations, we found that the betweenness metrics hold a low-tomedium relationship, which is held when compared to the degree metric. Although, the strongest relationship belongs to weighted_betweenness and weighted_betweenness_cap. In contrast, throughout a couple of years of study, the degree metric holds a constant correlation with the betweenness metrics. But these same betweenness metrics have a strong correlation with each other, which gets stronger over time. Based on the different results, we can state that the computationally simple metrics can be used as intermediaries for the calculation of complex ones.
Finally, we can draw as the main conclusion that to provide a global understanding of the centrality in LN, we must consider most of the results of the metrics. We cannot rely on a single metric to define the centrality of the nodes, however, it is advisable to take the degree metric as a starting point. From there, we can analyze the network based on restrictions, its properties (fee, balance, existing HTLC, and enabled channels), or a combination of both.