On the Impact of Attachment Strategies for Payment Channel Networks
aa r X i v : . [ c s . N I] F e b On the Impact of Attachment Strategiesfor Payment Channel Networks
Kimberly Lange
Distributed Security Infrastructures
Technical University of Berlin [email protected]
Elias Rohrer
Distributed Security Infrastructures
Technical University of Berlin [email protected]
Florian Tschorsch
Distributed Security Infrastructures
Technical University of Berlin fl[email protected]
Abstract —Payment channel networks, such as Bitcoin’s Light-ning Network, promise to improve the scalability of blockchainsystems by processing the majority of transactions off-chain. Dueto the design, the positioning of nodes in the network topology is ahighly influential factor regarding the experienced performance,costs, and fee revenue of network participants. As a consequence,today’s Lightning Network is built around a small number ofhighly-connected hubs. Recent literature shows the centralizingtendencies to be incentive-compatible and at the same timedetrimental to security and privacy. The choice of attachmentstrategies therefore becomes a crucial factor for the future of suchsystems. In this paper, we provide an empirical study on the (localand global) impact of various attachment strategies for paymentchannel networks. To this end, we introduce candidate strategiesfrom the field of graph theory and analyze them with respectto their computational complexity as well as their repercussionsfor end users and service providers. Moreover, we evaluate theirlong-term impact on the network topology.
Index Terms —Payment Channel Networks, Lightning Net-work, Autopilot, Attachment Strategies, Join Strategies
I. I
NTRODUCTION
Payment channel networks, such as Bitcoin’s LightningNetwork [1], are second-layer solutions that aim to improvethe scalability, performance, and privacy aspects of blockchainnetworks by taking the majority of transactions off-chain. Theyallow nodes to open bilateral payment channels by depositingmoney in a shared multisig address. By doing this, parties cannegotiate state changes locally in a secure and rapid fashion.As each node may establish multiple channels, a network ofpayment channels is created, which enables payments to non-adjacent nodes. While such multihop payments are routed overintermediary nodes, the protocol ensures not only that thepayments are settled atomically, but also that intermediariesare compensated for their service through transaction fees. Inthis way, nodes are incentivized to lock up funds in order toprovide the payment routing infrastructure.The Lightning Network currently exhibits a high degreeof centralization [2]–[4], which has shown to be detrimentalto the security [4], [5] and privacy [6], [7] properties ofthe network. Moreover, since the Lightning Network uses asource-routed best-effort routing protocol to conduct multihoppayments, payment reliability is not guaranteed but highlydepends on the connectivity of involved nodes [8]. Likewise,the position of routing nodes in the network topology is highlycorrelated with their fee revenue. Therefore, the question arises which connection points are preferable for nodes joining thenetwork with respect to their connectivity or revenue. Priorworks studying this question from a theoretical perspectiveindicate that profit-optimal join strategies tend to promotenetwork centralization [9]–[11]. These results therefore notonly suggest the existence of a fundamental trade-off betweenthe network’s goals of efficiency and decentralization, but alsoa conflict of interest between the local egoistical point of viewof an individual node and the global long-term developmentof the network topology.In this paper, we therefore present an empirical analysison the local and global impact of attachment strategies forpayment channel networks. We survey the field of graphtheory for strategies that aim to increase the joining node’sconnectivity and routing revenue, i.e., we propose strategycandidates from the perspectives of end-users and serviceproviders. Each strategy is analyzed with respect to its localimpact on the performance of an individual joining node basedon network simulations of the Lightning Network. Moreover,the computational complexities and resource requirements ofall strategies are evaluated in order to classify them accordingto their real-world practicability. In contrast, we study theglobal long-term impact of the discussed attachment strategieson the Lightning Network topology under the assumptionof mass adoption. To this end, we study how the network’scentralization and performance metrics change in dependenceof a given attachment strategy. We show that, while in theshort term centrality-based strategies perform best in somescenarios, they in the long term result in suboptimal network-wide transaction success rates and fee costs. To this end, weidentify two candidate strategies with the potential to combinelocal short-term and global long-term interests.The remainder is structured as follows and includes thefollowing contributions. Section II provides more detailedbackground information about the Lightning Network andintroduces the model and notations serving as a basis for ourresearch. In Section III, we introduce and discuss attachmentstrategies for the Lightning Network, matching different usagescenarios. The strategies are empirically analyzed from theuser and hub perspectives in Section IV and their long-termimpact is evaluated in Section V. After that, Section VI givesan overview of related work, before Section VII concludes thepaper.I. P
RELIMINARIES
Payment channel networks (PCNs) establish an overlaynetwork on top of a cryptocurrency. Instead of storing thedetails of every transaction on the blockchain, a PCN offers thepossibility to open payment channels and to process paymentsbilaterally off-chain. While different designs of payment chan-nels have been introduced so far [12]–[15], the most popularPCN is the Lightning Network [1]. By the beginning of May2020, it consisted of more than 4,300 nodes and around 25,000payment channels exhibiting a combined capacity of more than785 bitcoins (more than USD 8 million) . Lightning enablespotentially infinite payments between two users with only twoon-chain transactions, the first for opening and the second forclosing the payment channel. The opening transaction allowsboth parties to securely deposit money in a shared multisigaddress on the Bitcoin blockchain. After that, both users cansend bitcoins through the channel by renegotiating the balanceallocation between them. In order to close the channel, itslatest state is published on the blockchain, whereby the finalbalances are returned to the involved parties. Lightning, andPCNs in general, provide mechanisms for resolving conflictsand attempts of fraud. A. Network Model
We model the Lightning Network as a directed multi-graph G = ( V, E ) , where the vertex set V constitutes theLightning nodes and the multiset E the payment channels.Every bidirectional channel is represented by two directededges in order to separately store the individual capacities andchannel policies of both channel endpoints. Accordingly, theedge ( u, v ) stores how high u ’s share of the total channelbalance is and which settings u chose for the channel. Aseach channel locks funds and each on-chain transaction in-volves costly transaction fees, opening many channels on theLightning Network can be expensive. In order to reduce thenumber of required channels, the Lightning Network offersmultihop routing, which enables the sending of payments tonon-adjacent nodes in the network. In this case, the payment isrouted over intermediate nodes along the payment path, whichis determined by the payment’s sender and secured by HashedTime-Locked Contract (HTLC) protocols. For a more detaileddescription of the HTLC construction the reader is referredto [1], [17]. Moreover, privacy is improved by applying anonion routing scheme based on the Sphinx [18] mix packetformat.The payment’s sender typically selects the most suitableroute by running an adapted version of Dijkstra’s shortestpath algorithm [19] that considers channel capacities, fees andlocking duration in the edge weight calculation. That is, thealgorithm first discards all candidate edges with insufficientcapacities and then selects the path with minimal aggregatededge weights based on the intermediate nodes’ fee policiesand maximum lock-time. Such a weight-based algorithm is forexample utilized by the popular LND implementation, which According to the network snapshots [16] provided by [4]. accounts for more than 90% of today’s network nodes [5]. Forthe calculation of the respective transaction fees, each edgein the public network graph stores the routing fee policies,which are composed of a base fee f B and a proportionalfee f P . The base fee f B is a fixed amount that has to bepaid to the routing node for every forwarded payment; thedefault value is 1 satoshi ( = 1 · − BTC). The default valueof proportional fee f P is · − satoshi, which is multipliedwith the transaction amount | tx | of each payment. Therefore,routing higher value payments generates higher fees for therouting nodes. Concisely, the fee f u ( v, | tx | ) that has to bepaid to the routing node u for forwarding a transaction withamount | tx | to v can be calculated accordingly as f u ( v, | tx | ) = f Bu ( v ) + f Pu ( v ) · | tx | . In order to account for the weight-based routing algorithm,parts of our graph analysis is based on the fee graph G F, | tx | ,which we obtain through a transformation on G . This transfor-mation allows the network analysis to account for Lightning’srouting behavior in an approximative fashion, even when ap-plying standard weight-based graph algorithms. In particular, G is reduced to G F, | tx | by excluding all edges of insufficientcapacities with respect to a transaction amount | tx | . Theweights for each edge ( u, v ) in G F, | tx | are set to f u ( v, | tx | ) ,i.e., they denominate the routing fees that would arise fromtransferring | tx | through this channel. B. Joining the Network
Due to the costs associated with channel establishment, anode joining the network should follow a certain set of rulesfor choosing its initial connection points according to an opti-mization goal. We call such an algorithm returning a candidatenode set C ⊆ V an attachment strategy S ( G, k, cap ) → C ,which takes as parameters the public network graph G , thenumber of channels to be opened k = | C | , and the capacity cap (in satoshi) that each of the channels should hold.The respective optimization goal depends on the motivationfor joining the network. We consider the attachment strategiesfrom the point-of-view of three distinct perspectives: • End-users join the network to conduct cheap, reliable, andfast payments and therefore are interested in strategiesthat improve their local connectivity to the network. • Service providers participate as routing nodes in thenetwork in order to earn transaction fees. They are there-fore interested in optimizing their local node’s channelselection in order to receive maximal profit. • The network perspective regards the global impact ofa particular strategy and considers its impact on thenetwork’s overall connectivity and reliability over time.As these view points follow partly conflicting interests, theymay not easily be reconciled, but expose a fundamental trade-off between short-term egoistical efficiency and the long-term Note that this approximative approach is only applied when necessary forgeneral graph analysis or as part of the attachment algorithms. In contrast,the simulation framework used for the evaluation of the proposed strategiesfollows a payment protocol that closely resembles the real-world behavior, aswill be discussed in Section IV-A. evelopment of the network (cf. [8]). However, as differentattachment strategies fall on different points in the spectrumof this trade-off, we empirically investigate their usefulnessregarding these three view points.The performance of each strategy of course highly dependson the user’s behavior: if we for example assume an end-user would conduct frequent payments to only a single serviceprovider, the optimal connectivity-oriented strategy would beto establish a direct payment channel to it. However, so farno reliable data source on user behavior in payment channelnetworks is publicly available to the research community,which necessitates the introduction of a number of assump-tions with regard to the payment model. To this end, we refrainfrom introducing overly complex assumptions that may act asconfounding factors to our analysis. In particular, we assumefor the sake of simplicity that the user plans to send paymentsto destinations all over the network. Moreover, we assume thatthe capacity cap is the same for all k channels and that initialbalances are split equally between the channel endpoints. Wealso assume that every node in the network agrees to opena channel, which may not be the case in the real network, inparticular since recent research found such optimistic behaviorto entail security risks [20]. Finally, we assume new channelsto be established with the default fee settings. Note that incurrent Lightning implementations attachment strategies areused in the so-called autopilot feature that allows the clientsoftware to automatically choose and establish new channels.III. N ETWORK A TTACHMENT S TRATEGIES
In the following, we introduce candidate strategies for nodesjoining payment channel networks. We also provide a firstassessment of their applicability as well as their complexityin dependence of the number of nodes n = | V | and numberof edges m = | E | . A. Random
The
Random strategy is the simplest attachment strategy,in which the attachment points are determined by uniformrandom sampling from the node set V . This strategy can bequickly computed in O ( n ) and, while it mainly serves as abaseline for comparison, it counteracts centralizing tendenciessince it does not prefer any particular connection point. B. Highest Degree
The
Highest Degree strategy sorts all nodes V according totheir degree, and returns the k nodes with the highest degrees.As the number of different neighbors is presumably moremeaningful than the total number of channels a node v has,its degree deg ( v ) is determined in the fee graph G F , sinceit disregards multi-edges. The candidate set can be computedquickly with this strategy because deg ( v ) can be retrieved fromthe adjacency lists and sorting can be done in O ( n log n ) .Connecting to nodes with highest degrees is an extremeform of preferential attachment which is known to induce a“rich-gets-richer” effect that yields scale-free networks [21], and is likely responsible for the highly centralized substruc-tures found in the Lightning Network today. In fact, highest-degree attachment strategies were deployed in prior versionsof LND ’s autopilot feature and have been critically discussedin the community [22].
C. Betweenness Centrality
The notion of betweenness centrality [23] indicates howmany shortest paths in the network graph G a node v is partof. More specifically, bc ( v ) = P s,t ∈ Vs = v = t σ st ( v ) σ st , where σ st isthe total number of shortest paths from s to t and σ st ( v ) isthe number of shortest paths from s to t via v .In context of Lightning, nodes exhibiting a high between-ness centrality implies that they are often chosen by theweight-based routing algorithm and therefore are part ofmany payment paths. Since a large share of the network canbe reached via these nodes with minimal distance in termsof fees, they are in return promising candidates for nodeattachment. Note that this often also corresponds to overallshorter payment paths, which improves reliability.Consequently, the Betweenness attachment strategy electsthe k nodes with the highest betweenness centrality values,which are calculated via the weighted Brandes’ algorithm [24]based on the fee graph G F . As the weighted version of thealgorithm has a runtime complexity in O ( nm + n log n ) ,our implementation additionally employs the optimizationsfrom [25], which speed up the calculation of betweennesscentralities (but do not change the algorithmic complexity).Connecting to nodes with the highest betweenness centralitiesis another form of preferential attachment and likely results infurther network centralization. D. k -Center The k -Center strategy is based on the assumption thatthe joining node can improve its overall connectivity to thenetwork by establishing channels to k nodes such that thehighest distances between them and any other node in thenetwork are minimized. Ideally, this would lead to nodes indifferent parts of the network being chosen as the k newneighbors in order to minimize the length of the longestshortest payment path. This likely results in faster and cheapertransactions due to fewer nodes being part of the routes.Reducing the number of nodes and channels contained in apayment route can also decrease the risk that a transactionfails as there are less points of failure.The idea for this strategy is based on the k -center problem[26], which is defined as follows. Definition 1:
Given a complete undirected graph G =( V, E ) in a metric space and an integer k , a k -center is a subsetof nodes C ⊆ V with | C | ≤ k such that max v ∈ V d ( v, C ) isminimized, with d ( v, C ) being the shortest distance of v tothe closest node in C .It was previously proven that this problem is NP-complete andthat it is NP-hard even for an ǫ -approximation with ǫ < [26].This means that 2-approximation algorithms, which returna solution that is within twice the optimal solution valuen polynomial time, are the best possible algorithms for the k -center problem, unless P = N P . Due to the fact thatdistances in the fee graph G F are not necessarily symmetric,the Lightning Network unfortunately cannot be modeled asa weighted fee graph in metric space. We therefore use thegreedy k -center algorithm introduced in [27] on a generatedcomplete distance graph to minimize the number of hopson the longest shortest path and disregard fees or channelcapacities. To this end, the joining node first establishes aconnection to the network’s highest degree node and thenexecutes a single-source shortest path (SSSP) search to retrievethe distances for the k -center algorithm. This results in a totaltime complexity of O ( k ( m + n )) .As the k -Center strategy aims to interconnect the networkcenters, it should improve the network’s robustness and facil-itate decentralization. E. k -Median Besides looking at the longest shortest path to any othernode in the network, a promising strategy is to minimize theaverage shortest path distance to all other nodes. Assumingthat the joining node sends a transaction to any other nodewith the same probability, it is very likely favorable to requirea minimal average number of hops to any other node in orderto reduce transaction fees, latencies, and failures. Hence, wehave to solve a problem that is known as the
Single-SourceAverage Shortest Path Distance Minimization (SS-ASPDM)problem [28]. It was previously proven that an optimal solutionto the SS-ASPDM problem for a node v can be found byonly adding edges incident to v [28]. Thus, the problem canbe utilized in our use case of the Lightning Network sincea joining node may only influence the opening of channelswhich are incident to itself. Adopting the approach to only addedges incident to the source node v , the SS-ASPDM problemcorresponds to the k -median problem [28].In a graph context, the k -median problem can be formulatedas follows. Definition 2:
Given a complete undirected graph G =( V, E ) in a metric space and an integer k , the k -medianproblem strives to find a subset of nodes C ⊆ V with | C | ≤ k such that P v ∈ V d ( v, C ) is minimized, with d ( v, C ) being theshortest distance of v to the nearest node in C .Again, the problem is NP-hard [29] and only an approx-imate solution can be found within polynomial time, un-less P = N P . For solving the k -median problem in adistance graph, we establish an initial connection to the highestdegree node and then utilize the “forward” greedy algorithmpresented in [29], which results in an overall time complexityof O ( kn ( n + m ) log n ) when applied to the weighted feegraph.Similarly to the k -Center approach, the k -Median strategypromises to improve network robustness and reduce central-ization. F. Maximum Betweenness Improvement (MBI)
A node that joins the network with the intent to act as aservice provider or routing node strives for financial profit from participating in the Lightning Network. To this end, arouting node v should rather focus on optimizing its ownbetweenness centrality bc ( v ) than connecting to central nodes.Therefore, it has to solve a problem known as MaximumBetweenness Improvement (MBI) [30], which is defined asfollows. Definition 3 (MBI):
Given a directed graph G , a node v ,and an integer k , which set of edges S incident to v , with | S | ≤ k , should be added to G in order to maximize bc ( v ) ?The MBI problem has been proven to be NP-hard, but a greedyalgorithm that provides an approximate solution exists [30].This MBI strategy temporarily opens any channel that node v could set up, calculates bc ( v ) , and closes the channel again.This is repeated for all possible channels and in the end thechannel generating the highest betweenness improvement forthe joining node is elected. This channel is then establishedand the procedure is repeated until all k candidates are found,leading to an overall high time complexity in O ( kn ) .Note that this strategy is similar to the approach foundin [11], which however also optimizes the node’s fee settings.As this results in a further increased computational complexityover the already high resource requirements of Bergamini etal.’s algorithm, we in lieu of these optimizations follow themore feasible MBI strategy.IV. E
MPIRICAL A NALYSIS
In the following, we empirically analyze the performanceof attachment strategies for payment channel networks from alocal perspective, i.e., from the view of a single end-user orservice provider aiming to join the network.
A. Network Simulator, Setup, and Methodology
As a basis for the empirical analysis, we developed a time-discrete event simulator that implements the network multi-graph model (cf. Section II-A) and allows to simulate paymentprocessing as well as nodes joining the network according toa given attachment strategy. The simulator initially reads thenetwork graph from a snapshot of the Lightning Network andsimulates path finding through a weight-based route selectionalgorithm similar to the one found in
LND . While some aspectsof the real-world payment procedure—such as the HTLCprotocol negotiations—are omitted by our simulation modelfor the sake of simplicity, the simulator was carefully imple-mented to approximate the real-world behavior. To this end,transaction processing is simulated by checking and adjustingthe available balances along the payment path. During thisphase, the arising fee revenues are calculated based on theprovided fee policies and the remaining transaction value foreach hop along the way. Note that consequentially and justas in the real network, transaction success is not guaranteedeven if a path is found, as the path finding algorithm doesnot operate on the private balances, but the public capacities.We base our further analysis on a snapshot of the LightningNetwork from May 1, 2020 at 10am that was taken from the The simulator code base is publicly available in our companion repositoryat https://gitlab.tu-berlin.de/rohrer/pcn-attachment-data. S u cce ss R a t e (a) Micro Payments (100 sats) (b) Medium Payments (10,000 sats) (c) Macro Payments (1,000,000 sats) MBI Highest Degree Random Betweenness k-Center k-Median Network Average
Fig. 1: Transaction success rates in dependence of chosen attachment strategy and transaction amounts.dataset [16] provided by [4]. At this time, the largest connectedcomponent of the network consisted of more than 4,300 nodesconnected by nearly 25,000 channels, which held an overallcapacity of more than 785 BTC.In order to analyze their performance, we simulated thejoining of individual nodes according to the given attachmentstrategy, every time establishing k ∈ { , . . . , } channelswith sufficient capacity and default fee settings. We thenevaluated the connectivity and fee revenue of the joinednode through two sets of simulated payments: one set of1,000 transactions with the joined node as a fixed sourceand the destination selected by uniform random sampling,and another set of 1,000 transactions for which both sourceand destination were chosen randomly. The simulations wereconducted under the assumption of three different transactionvolumes: micro payments of 100 sats, medium paymentsof 10,000 sats, and macro payments of 1,000,000 sats (seealso [11]). If not stated otherwise, our analysis is based onthe most relaxed assumption of 100 sats. For every strategy,transaction value, and every value of k , the simulations werefurthermore repeated 30 times with different seed value inputsfor the utilized random number generator. This results in afive-digit sample size ensuring the statistical significance ofthe results. B. Transaction Success
In order to assess the impact of the attachment strategies onthe connectivity of the joining node, we analyzed the averagetransaction success rate, i.e., the share of all transaction thatactually succeeded. In Figure 1, the average success rate isshown in dependence of the number of transaction amountsand channels k that were established corresponding to therespective strategies. Moreover, the a priori network-wideaverage success rate is shown for comparison, which wasdetermined by simulating 10,000 transactions with randomlychosen sources and destinations in the initial graph configura-tion.We observe that generally node connectivity improves withthe number of established channels and that all but the Ran- dom strategy tend to result in an average success rate higherthan the network average. Moreover, strategies that prefercentral connection points, such as the
Betweenness strategy,fare better than strategies that connect the periphery of thenetwork, such as k -Center . This is likely the case becauseconnecting to very central points in the network reduces theaverage path length and thereby also the probability of routingfailures due to unavailable balances.This is supported by the fact that the assumed transactionvolume has a big impact on the average success rate: whilethe network average for micro payments is around 83% (Fig-ure 1a), it drops below 34% for medium payments (Figure 1b),and even to less than 4% for macro payments (Figure 1c). Thisobservation is of course in line with previous literature, inwhich Lightning’s limited available capacity and the resultinglow success rates for higher-volume payments have been dis-cussed for some time [4], [8], [31]. Our results underline thatcurrently only a small number of central nodes hold enoughcapacity to be able to route any high-volume payments. Whilethe heavily skewed capacity distribution results in overallvery low transaction success rates, we observe that strategiesthat preferably connect to these few central nodes—suchas Betweenness , Highest Degree , and
MBI —can increasetheir lead in such high-volume payment scenarios. However, inorder to limit the impact the current capacity constraints foundin the Lightning Network have on our results, we continue ourfurther analysis of attachment strategies under the most relaxedassumption of micro payments.
C. Transaction Fees
End-users joining the Lightning Network likely want tooptimize their connection point with regards to the resultfees that arise from sending payments. In Figure 2a thefees paid by the connecting node are shown in dependenceof the number of channels and with respect to the chosenstrategy. Again, generally all strategies result in fee costs lowerthan the network average, which is even true for
Random for more than k = 5 channels. As the fees in most casesimprove linearly with the number of established channels,ABLE I: Algorithm runtimes in dependence of chosen attachment strategy and number k of established channels (in sec.). Highest Degree
Betweenness k -Median k -Center MBI . . k T r a n s ac ti on F ee s ( i n % ) k R ou t e d T r a n s ac ti on s ( i n % ) (a) (b) MBI Degree Random Betweenness k-Center k-Median Net. Avg.
Fig. 2: Transaction fees and share of routed transactions independence of chosen attachment strategy.it can be concluded that overall better connectivity and theresulting increased routing opportunities help to reduce thecost associated with sending Lightning payments.Interestingly, the k -Median strategy is the clear favoritewith regards to fee saving, likely as it helps to increaseconnectivity between network clusters and connects these aswell as more centralized nodes. D. Service Provider Revenue
Service providers join the network with the intend to earnthe maximum amount of profit. To this end, we analyze whichattachment strategy can help to improve their fee revenue.The share of routed transactions (which in our case directlycorresponds to the fee revenue) is shown in Figure 2b. Independently of the strategy, the share of routed transac-tions improves with the overall connectivity of the joiningnodes, i.e., it increases with the number of established paymentchannels k , but tends to favor strategies that improve pathdiversity. However, the MBI strategy is clearly superior inthis regard, allowing the joining node even to route close to6% of all payments conducted in the network by establishing k = 15 channels. This comes to no surprise as this strategy isspecifically focused on maximizing the number of paymentpaths routed through the joining node, and previous workshowed the benefits of such an approach [11]. Apart from this,the k -Median strategy is a promising candidate, as it able tosecure the service provider a routing share of close to 3% ofall payments in the case of k = 15 . Note that our analysis compares the proportional fee revenues gained fromrouting in the Lightning Network and does not consider any costs for running arouting node, such as the on-chain fees associated with channel establishment.In order to estimate the net. profit of a node operator, such cost would haveto be known and subtracted from the revenue.
E. Runtime Analysis
In order for a attachment strategy to be an actual candidateto be implemented in the autopilot functionality of a Lightningclient implementation, it should deliver its results in a viableamount of time. Therefore, we measured the run times ofdiscussed strategies under real-world conditions. To this end,we deployed our strategy implementations on an t2.xlarge instance (4 vCPUs based on Intel Xeon 3.3 GHz, 16 GBmemory) on Amazon Elastic Compute Cloud (EC2) runningUbuntu Server 18.04. We then measured the execution timethat it took the algorithms to return the respective candidatesets.The results shown in Table I generally concur with ourcomplexity analysis given in Section III: while the
High-est Degree , Betweenness and k -Center strategies remainroughly constant runtimes, k -Median and especially MBI grow in a linear fashion with the number of establishedpayment channels k .This is of particular significance, since it takes MBI between2,000 and 2,500 seconds longer to finish for each additionalchannel. As this amounts to an overall runtime of around sevenhours for k = 10 , the practicability of this strategy is heavilyput under question, potentially even given its performancebenefits in terms of fee revenue.V. E VALUATING THE L ONG - TERM I MPACT
So far, we analyzed the discussed attachment strategieswith respect to their local short-term impact, i.e., from thepoint of view of an egoistical node joining the network. Inthe following, we assess the global long-term impact of thediscussed attachment strategies for payment channel networks.
A. Simulation Setup
In order to evaluate the global long-term impact, we uti-lized the time-discrete event-based network simulator fromSection IV-A to model the process of 5,000 nodes sequentiallyjoining the Lightning Network, which corresponds to morethan doubling the network size. Each node joins the networkwith k = 10 channels that are established according to thegiven strategy, which is roughly the network average nodedegree. While the future network development will probablynot exactly follow these assumptions, this approach allows usto compare the advantages and drawbacks of each strategywithout considering additionally interfering and confoundingfactors. This simulation-based analysis was conducted forall but the MBI strategy. Due to
MBI ’s significantly highercomputational requirements (cf. Section IV-E), we had to ,
000 2 ,
000 3 ,
000 4 ,
000 5 , G i n i C o e f fi c i e n t ( D e g r ee ) ,
000 2 ,
000 3 ,
000 4 ,
000 5 , Nodes Added D i a m e t e r ,
000 2 ,
000 3 ,
000 4 ,
000 5 , Nodes Added S u cce ss R a t e ( i n % ) ,
000 2 ,
000 3 ,
000 4 ,
000 5 , F ee s ( i n % ) Highest Degree Random Betweenness k-Center k-Median (a) (b) (c) (d)
Fig. 3: Long-term impact of attachment strategies on the network.refrain from including it in the long-term evaluation. Asbefore, all randomized transactions were repeated 1,000 and allsimulations 30 times to ensure statistically significant results.
B. Impact on the Network’s Topology
In order to analyze the impact each attachment strategy hason network centralization over time, we analyzed the networktopology in intervals of 500 joining nodes and recordedessential network metrics. Figure 3a shows the Gini coefficientof the node degree, which quantifies the inequality of thedegree distribution for an increasing number of added nodes.As expected, the network exhibits initially a high Gini valueof nearly . , which underlines the high degree of inequalitycurrently exhibited by Lightning’s network topology. Further-more, the results show that strategies following a preferentialattachment pattern, such as the Highest Degree or Between-ness strategies only marginally decrease the centralizationover time, while strategies that also connect the fringes ofthe network, such as k -Center and Random have a strongpositive impact on centralization. Interestingly, we observe that k -Median tends to elect the same set of k nodes over time.While these k nodes increase their connectivity, it does notresult in a significant improvement with respect to the degreeinequality.Figure 3b shows the average network diameter, i.e., thelongest shortest path in the network, which is an indicatorfor the worst-case routing complexity. Again, Random and k -Center perform best and are able to immensely reducethe initial network diameter of 13 already after attaching500 nodes. Notably, the k -Center strategy quickly allows allnetwork nodes to reach all other nodes in just four hops.In order to get an understanding of how the participationin routing is impacted over time, we analyzed the inequalityof betweenness centralities and the central point dominance.The results generally concur with our observations for nodedegrees. They also show that our current choice of establishingthe initial connection of the k -Center and k -Median strategiesto the single highest degree node results in an increased centralpoint dominance. While this is an implementation detail, itsimpact requires further investigation in the future. C. Impact on the Network’s Performance
In order to evaluate the performance of the network independence of each attachment strategy, we analyzed the av-erage success rate and the arising fees by regularly simulatingtransactions in the network. To this end, we executed batchesof 1,000 micro transactions with randomly chosen sources anddestinations after the addition of every 500 nodes.As can be seen in Figure 3c, the average network successrate generally improves with an increasing number of nodesand the additionally provided routing capacity. The evalua-tion moreover shows that again the decentralizing strategies
Random and especially k -Center benefit the overall networkconnectivity the most, letting the success rate quickly rise toclose to 100%.While this pattern is generally also reflected in the averagepaid transaction fees, as shown in Figure 3d, the resultshighlight that a high degree of centralization can be beneficialfor fee costs. In particular, while the Highest Degree strategydoes generally not offer many benefits, it does result in ratherlow average fee costs. This is likely due to the short averagepath lengths and high efficiency of star sub-structures (cf. [9],[10]). However, again the k -Center strategy proves to be themost promising candidate to minimize fee costs for the end-user in the long term, with k -Median being a close second. D. Discussion
Throughout our analysis, it became apparent that the Light-ning Network currently is heavily restricted by its overalllimited capacity and its concentration on a few central serviceproviders. We therefore found that the provided quality ofservice and user experience would immensely benefit fromany kind of higher-volume and higher-connectivity adoption.We also found that from an egoistical perspective, strategiesselecting central attachment points seem to provide the bestshort-term performance, with the exception of transaction fees,in which case the k -Median strategy showed to be the mostpromising candidate. From the global point of view, however,decentralizing strategies proved to provide the best long-termbenefits for the network overall. With regard to this conflictof interest, we empirically confirm the trade-off betweenefficiency and decentralization [8], [9].owever, our analysis showed two strategies to be feasibleand potentially capable of combining local short-term andglobal long-term interests: k -Center and k -Median . Whilethese strategies may not be the absolute optimum from theegoistical point of view, they benefit the long-term networkdevelopment the most. It therefore remains an open questionwhether users would accept non-optimal short-term strategies,if they benefit them and the whole network in the long-term.In order to balance this trade-off, real-world implemen-tations should consider to employ a set of different well-chosen strategies to establish their channels. However, theexact choices and the share of connections established througha particular strategy are up to further analysis. Our imple-mentation of the k -Center and k -Median strategies currentlybuilds on an initial centralized connection. We therefore alsodeem the potential of such “mixed” strategies, i.e., strategiesthat further randomize and distribute these connection types,a promising subject for future research. Furthermore, whilewe generally hold the inherent conflicts of interest to be hardto reconcile, we think they should further be discussed andaddressed in the community.VI. R ELATED W ORK
Most research on payment channel networks focuses onaspects such as the channel design [1], [12]–[15], the net-work’s topology [2], [4], [31], and routing algorithms [32],[33]. While most of these entries take the network topology asa given, few entries study how the network structure emergesand which algorithms for creation are preferable. To this end,Avarikioti et al. [9] follow a game-theoretic approach and showthat centralized structures can make the network more efficientand stable. In particular, the authors show that a star graph,i.e., a graph with one central hub, poses a social optimum aswell as a Nash equilibrium in terms of efficiency and stability.These results are supported by Sali and Zohar [10], whoshow the efficiency of centralized hub structures. Interestingly,Rincon et al. [34] come to the conclusion that it is nonethelessnot disadvantageous for smaller nodes, i.e., nodes with fewchannels and a limited budget, to connect to other small nodes.These connection types were even proven to positively impactthe network’s robustness and efficiency, although connectionsto larger or richer nodes were shown to improve the efficiencyeven further.Most related to our work, Ersoy et al. [11] study attach-ment strategies and have been the first to observe that profitmaximization of service providers in the Lightning Networkis connected to their position in the network. To this end, theauthors introduce the maximum reward improvement (MRI)problem, which, in contrast to the MBI problem, additionallyaims to optimize the joining node’s fee policies. While theauthors reduce MRI to MBI and show that it is also NP-hard, they provide an approximation algorithm. The resultsunderline that improving the betweenness is a successfulstrategy to increase a node’s fee revenue. As the approximationalgorithm proposed in [11] is still very costly, we deliberatelyrefrain from optimizing fee policies in our work. Instead, we opt to implement a profit-oriented strategy based on Bergaminiet al.’s [30] approximation algorithm under the assumption ofdefault fee policies.While many prior entries highlight that, in theory, attach-ment strategies optimizing for profit and efficiency tend tofavor the creation of highly centralized topologies, studieson the security [4], [5], [35], [36] and privacy [6], [7],[37]–[39] of payment channel network emphasize the riskassociated with network centralization. These contradictoryresults indicate an inherent trade-off between the networkefficiency and decentralization, also observed by Waugh andHolz [8]. As this conflict of interest is not easily resolvedto one side or the other, additional insight on the long-termeffects of certain design decisions becomes necessary. To thisend, we provide the first empirical study on the long-termimpact of attachment strategies for payment channel networks.Li et al. [40] present an algorithm that allows to calculatethe optimal distribution of initial channel balances assuming acertain budget in order to satisfy payment demands. Similarly,channel rebalancing protocols [41], [42] aim to optimally re-distribute the allocation of funds in order to ensure frictionlesspayment processing. We deem the integration of such capacityplanning algorithms into our model promising future work.VII. C
ONCLUSION
In this work, we provided an empirical study on the impactof attachment strategies for payment channel networks thatonce more exposes the fundamental trade-off between effi-ciency and decentralization. While we were able to identifytwo candidate strategies with the potential to combine localshort-term and global long-term interests, we deem the ques-tion of attachment strategies an important avenue for futureresearch and discussion on payment channel networks.R
EFERENCES[1] J. Poon and T. Dryja, “The bitcoin lightning network: Scalable off-chaininstant payments,” 2016.[2] I. A. Seres, L. Guly´as, D. A. Nagy, and P. Burcsi, “Topologicalanalysis of bitcoin’s lightning network,” in
Mathematical Research forBlockchain Economy . Springer International Publishing, 2020, pp. 1–12.[3] J. Lin, K. Primicerio, T. Squartini, C. Decker, and C. J. Tessone,“Lightning network: a second path towards centralisation of the bitcoineconomy,”
CoRR , vol. abs/2002.02819, 2020. [Online]. Available:https://arxiv.org/abs/2002.02819[4] E. Rohrer, J. Malliaris, and F. Tschorsch, “Discharged payment chan-nels: Quantifying the lightning network’s resilience to topology-basedattacks,” in . IEEE, 2019, pp. 347–356.[5] S. Tochner, S. Schmid, and A. Zohar, “Hijacking routes in payment chan-nel networks: A predictability tradeoff,”
CoRR , vol. abs/1909.06890,2019. [Online]. Available: http://arxiv.org/abs/1909.06890[6] G. Kappos, H. Yousaf, A. Piotrowska, S. Kanjalkar, S. Delgado-Segura,A. Miller, and S. Meiklejohn, “An empirical analysis of privacy in thelightning network,” arXiv preprint arXiv:2003.12470 , 2020.[7] E. Rohrer and F. Tschorsch, “Counting down thunder: Timing attackson privacy in payment channel networks,” in
AFT ’20: Proceedings ofthe second ACM conference on Advances in Financial Technologies .[8] F. Waugh and R. Holz, “An empirical study of availability and reliabilityproperties of the bitcoin lightning network,”
CoRR , vol. abs/2006.14358,2020. [Online]. Available: https://arxiv.org/abs/2006.143589] Z. Avarikioti, L. Heimbach, Y. Wang, and R. Wattenhofer, “Ride thelightning: The game theory of payment channels,” in
FC ’20: Proceed-ings of the 24th International Conference on Financial Cryptographyand Data Security , Feb. 2020, pp. 264–283.[10] Y. Sali and A. Zohar, “Optimizing off-chain payment networksin cryptocurrencies,”
CoRR , vol. abs/2007.09410, 2020. [Online].Available: https://arxiv.org/abs/2007.09410[11] O. Ersoy, S. Roos, and Z. Erkin, “How to profit from payments chan-nels,” in
Financial Cryptography and Data Security - 24th InternationalConference, FC 2020, Kota Kinabalu, Malaysia, February 10-14, 2020Revised Selected Papers , ser. Lecture Notes in Computer Science, vol.12059. Springer, 2020, pp. 284–303.[12] M. Hearn and J. Spilman. (2015) Bitcoin contracts. [Online]. Available:https://en.bitcoin.it/wiki/Contracts[13] C. Decker and R. Wattenhofer, “A fast and scalable payment networkwith bitcoin duplex micropayment channels,” in
Stabilization, Safety,and Security of Distributed Systems - 17th International Symposium,SSS 2015, Edmonton, AB, Canada, August 18-21, 2015, Proceedings ,ser. Lecture Notes in Computer Science, vol. 9212. Springer, 2015, pp.3–18.[14] A. Miller, I. Bentov, R. Kumaresan, and P. McCorry, “Sprites: Paymentchannels that go faster than lightning,”
CoRR , vol. abs/1702.05812,2017. [Online]. Available: http://arxiv.org/abs/1702.05812[15] C. Decker, R. Russell, and O. Osuntokun, “eltoo: A simple layer2protocol for bitcoin,”
White paper: https://blockstream.com/eltoo.pdf ,2018.[16] E. Rohrer. Snapshots of the lightning network. [Online]. Available:https://gitlab.tubit.tu-berlin.de/rohrer/discharged-pc-data/tree/master/snapshots[17] P. McCorry, M. M¨oser, S. F. Shahandashti, and F. Hao, “Towardsbitcoin payment networks,” in
Information Security and Privacy - 21stAustralasian Conference, ACISP 2016, Melbourne, VIC, Australia, July4-6, 2016, Proceedings, Part I , ser. Lecture Notes in Computer Science,vol. 9722. Springer, 2016, pp. 57–76.[18] G. Danezis and I. Goldberg, “Sphinx: A compact and provably securemix format,” in
SP ’09: Proceedings of the 30th IEEE Symposium onSecurity and Privacy , 2009, pp. 269–282.[19] E. W. Dijkstra, “A note on two problems in connexion with graphs,”
Numerische Mathematik , vol. 1, pp. 269–271, 1959.[20] J. Harris and A. Zohar, “Flood & loot: A systemic attack onthe lightning network,”
CoRR , vol. abs/2006.08513, 2020. [Online].Available: https://arxiv.org/abs/2006.08513[21] A.-L. Barab´asi and R. Albert, “Emergence of scaling in random net-works,” science , vol. 286, no. 5439, pp. 509–512, 1999.[22] R. Pickhardt. Is the barab´asi-albert model a rea-sonable choice for the autopilot? [Online]. Available:https://github.com/lightningnetwork/lnd/issues/677[23] L. C. Freeman, “A set of measures of centrality based on betweenness,”
Sociometry , pp. 35–41, 1977.[24] U. Brandes, “On variants of shortest-path betweenness centrality andtheir generic computation,”
Social Networks , vol. 30, no. 2, pp. 136–145, 2008.[25] M. Baglioni, F. Geraci, M. Pellegrini, and E. Lastres, “Fast exactcomputation of betweenness centrality in social networks,” in
Interna-tional Conference on Advances in Social Networks Analysis and Mining,ASONAM 2012, Istanbul, Turkey, 26-29 August 2012 . IEEE ComputerSociety, 2012, pp. 450–456.[26] D. S. Hochbaum and D. B. Shmoys, “A best possible heuristic for the k -center problem,” Mathematics of Operations Research , vol. 10, no. 2,pp. 180–184, 1985.[27] T. F. Gonzalez, “Clustering to minimize the maximum interclusterdistance,”
Theoretical Computer Science , vol. 38, pp. 293–306, 1985.[28] A. Meyerson and B. Tagiku, “Minimizing average shortest path distancesvia shortcut edge addition,” in
Approximation, Randomization, and Com-binatorial Optimization. Algorithms and Techniques, 12th InternationalWorkshop, APPROX 2009, and 13th International Workshop, RANDOM2009, Berkeley, CA, USA, August 21-23, 2009. Proceedings , ser. LectureNotes in Computer Science, vol. 5687. Springer, 2009, pp. 272–285.[29] M. Chrobak, C. Kenyon, and N. E. Young, “The reverse greedy algo-rithm for the metric K -median problem,” in Computing and Combina-torics, 11th Annual International Conference, COCOON 2005, Kunming,China, August 16-29, 2005, Proceedings , ser. Lecture Notes in ComputerScience, vol. 3595. Springer, 2005, pp. 654–660. [30] E. Bergamini, P. Crescenzi, G. D’Angelo, H. Meyerhenke, L. Severini,and Y. Velaj, “Improving the betweenness centrality of a node by addinglinks,”
ACM Journal of Experimental Algorithmics , vol. 23, 2018.[31] F. B´eres, I. A. Seres, and A. A. Bencz´ur, “A cryptoeconomic trafficanalysis of bitcoins lightning network,”
CoRR , vol. abs/1911.09432,2019. [Online]. Available: http://arxiv.org/abs/1911.09432[32] V. Sivaraman, S. B. Venkatakrishnan, M. Alizadeh, G. C. Fanti, andP. Viswanath, “Routing cryptocurrency with the spider network,” in
HotNets ’18: Proceedings of the 17th ACM Workshop on Hot Topicsin Networks , Nov. 2018, pp. 29–35.[33] V. K. Bagaria, J. Neu, and D. Tse, “Boomerang: Redundancy improveslatency and throughput in payment-channel networks,” in
FC ’20:Proceedings of the 24th International Conference on Financial Cryp-tography and Data Security , Feb. 2020, pp. 304–324.[34] D. Rincon, E. Y. Wu, S. Dewar, and D. Zhu, “Identifying beneficialconnection types in payment channel networks: The case of lightning,”
University of California Berkeley , 2020.[35] A. Mizrahi and A. Zohar, “Congestion attacks in payment channelnetworks,”
CoRR , vol. abs/2002.06564, 2020.[36] Y. Guo, J. Tong, and C. Feng, “A measurement study of bitcoin lightningnetwork,” in
IEEE International Conference on Blockchain, Blockchain2019, Atlanta, GA, USA, July 14-17, 2019 . IEEE, 2019, pp. 202–211.[37] G. Malavolta, P. Moreno-Sanchez, A. Kate, M. Maffei, and S. Ravi,“Concurrency and privacy with payment-channel networks,” in
CCS ’17:Proceedings of the 2017 ACM SIGSAC Conference on Computer andCommunications Security , Oct. 2017, pp. 455–471.[38] G. Malavolta, P. Moreno-Sanchez, C. Schneidewind, A. Kate, andM. Maffei, “Anonymous multi-hop locks for blockchain scalability andinteroperability,” in
NDSS ’19: Prooceedings of the 26th Annual Networkand Distributed System Security Symposium , Feb. 2019.[39] S. Tikhomirov, P. Moreno-Sanchez, and M. Maffei, “A quantitativeanalysis of security, anonymity and scalability for the lightning network,”
IACR Cryptol. ePrint Arch. , vol. 2020, p. 303, 2020.[40] P. Li, T. Miyazaki, and W. Zhou, “Secure balance planning of off-blockchain payment channel networks,” 2020.[41] R. Khalil and A. Gervais, “Revive: Rebalancing off-blockchain paymentnetworks,” in
Proceedings of the 2017 ACM SIGSAC Conference onComputer and Communications Security, CCS 2017, Dallas, TX, USA,October 30 - November 03, 2017 . ACM, 2017, pp. 439–453.[42] R. Pickhardt and M. Nowostawski, “Imbalance measure andproactive channel rebalancing algorithm for the lightningnetwork,”
CoRR , vol. abs/1912.09555, 2019. [Online]. Available:http://arxiv.org/abs/1912.09555[43]