Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

LockDown: Balance Availability Attack Against Lightning Network Channels

  • Conference paper
  • First Online:
Financial Cryptography and Data Security (FC 2020)

Abstract

The Lightning Network (LN) is a payment network running as a second layer on top of Bitcoin and other Blockchains. This paper presents the possibility of performing a balance lockdown in the LN due to misbehaving nodes associated to a given channel. We formalize and introduce a practical attack, minimizing the economic cost of the attack. We present results that validate our claims, and provide experimental results and potential countermeasures to handle the problem.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The capacity that M has to open with A is the double of the payment value since the payment is performed by M but also has to return to M to extend the time that the payment is blocked.

  2. 2.

    Notice that if both inequations hold, then \(p_1 + p_3 > p_2 + p_4\) and M would prefer to block outgoing paths as in the “Shorter loop” case.

  3. 3.

    For simplicity, we assume \(\theta \) as a relative block height value.

  4. 4.

    This bound is just an implementation parameter. There are already channels in the LN with larger values. The availability of larger channels reduces the number of channels for the attack, as well as total fees to pay for every open channel and the total cost of the attack.

  5. 5.

    Such information can be obtained, for instance, with the instruction describegraph of the lnd implementation.

  6. 6.

    One may assume users changing some LN implementation parameters. However, the \(T_{max}\) value is not expected to be one of those easily modifiable parameters.

  7. 7.

    See, for instance, transaction:

    f42012119a50afda6717a29957fba043d8afba9b0ff9a0f1132670232eb61feb It is the funding transaction corresponding to the Channel Id 675095741575593984 opened on January 22, 2020, by node

    031a02081118bcbd899756f8cdd9feaf5dbf3f1014a1d811e33e8f5a4d8079e2fe.

  8. 8.

    For instance, Channel Id 671792808627666945 with total capacity 0.0005 BTC has been closed with the following close transaction d2f676a3085f46d6636f1197ab3fec2855bc7c8fffb3cb48b83396220ad1dc0a.

  9. 9.

    SPSP, Simple Protocol for Spontaneous Payments, https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-June/001327.html.

  10. 10.

    For instance, a payment route in which all nodes run an eclair implementation can be at most 7 hops.

  11. 11.

    Although the \(\theta \) is an absolute block height value, here we will refer as a relative value to simplify the explanation.

References

  1. Decker, C., Wattenhofer, R.: A fast and scalable payment network with bitcoin duplex micropayment channels. In: Pelc, A., Schwarzmann, A.A. (eds.) SSS 2015. LNCS, vol. 9212, pp. 3–18. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21741-3_1

    Chapter  Google Scholar 

  2. Di Stasi, G., Avallone, S., Canonico, R., Ventre, G.: Routing payments on the lightning network. In: 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), pp. 1161–1170. IEEE (2018)

    Google Scholar 

  3. Donet Donet, J.A., Pérez-Solà, C., Herrera-Joancomartí, J.: The bitcoin P2P network. In: Böhme, R., Brenner, M., Moore, T., Smith, M. (eds.) FC 2014. LNCS, vol. 8438, pp. 87–102. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44774-1_7

    Chapter  Google Scholar 

  4. Elements Project. c-lightning - a lightning network implementation in C (2019). https://github.com/ElementsProject/lightning

  5. Herrera-Joancomartí, J., Navarro-Arribas, G., Ranchal-Pedrosa, A., Pérez-Solà, C., Garcia-Alfaro, J.: On the difficulty of hiding the balance of lightning network channels. In: Proceedings of the 2019 ACM Asia Conference on Computer and Communications Security, CCS 2019, Asia, pp. 602–612. ACM, New York (2019)

    Google Scholar 

  6. Khosla, A., Schwartz, E., Hope-Bailie, A.: Interledger RFCs, 0018 DRAFT 3, Connector Risk Mitigations. Github (2019). http://j.mp/2m2OvfP

  7. Malavolta, G., Moreno-Sanchez, P., Kate, A., Maffei, M.: Enforcing security and privacy in decentralized credit networks. In: NDSS, Silentwhispers (2017)

    Google Scholar 

  8. Malavolta, G., Moreno-Sanchez, P., Kate, A., Maffei, M., Ravi, S.: Concurrency and privacy with payment-channel networks. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pp. 455–471. ACM (2017)

    Google Scholar 

  9. McCorry, P., Möser, M., Shahandasti, S.F., Hao, F.: Towards bitcoin payment networks. In: Liu, J.K.K., Steinfeld, R. (eds.) ACISP 2016. LNCS, vol. 9722, pp. 57–76. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-40253-6_4

    Chapter  Google Scholar 

  10. Poon, J., Dryja, T.: The bitcoin lightning network: scalable off-chain instant payments (2016)

    Google Scholar 

  11. Robinson, D.: HTLCS-considered-harmful. In: Stanford Blockchain Conference, Stanford, CA, USA, January 2019. http://j.mp/2m7BsKf

  12. Rohrer, E., Malliaris, J., Tschorsch, F.: Discharged payment channels: quantifying the lightning network’s resilience to topology-based attacks. CoRR, abs/1904.10253 (2019)

    Google Scholar 

  13. Roos, S., Moreno-Sanchez, P., Kate, A., Goldberg, I.: Settling payments fast and private: efficient decentralized routing for path-based transactions (2017). arXiv preprint arXiv:1709.05748

  14. Samokhvalov, A., Poon, J., Osuntokun, O.: Basis of lightning technology (BOLTs) (2018)

    Google Scholar 

  15. Samokhvalov, A., Poon, J., Osuntokun, O.: The lightning network Daemon (2018)

    Google Scholar 

  16. Samokhvalov, A., Poon, J., Osuntokun, O.: Lightning network in-progress specifications. Bolt 4: onion routing protocol (2018)

    Google Scholar 

  17. Tang, W., Wang, W., Fanti, G., Oh, S.: Privacy-utility tradeoffs in routing cryptocurrency over payment channel networks. CoRR, abs/1909.02717 (2019)

    Google Scholar 

Download references

Acknowledgments

Work partially supported by the BART (Blockchain Advanced Research & Technologies) initiative (cf. https://www.bart-blockchain.fr/en/), the European Commission under grant agreement 830892 (H2020 SPARTA project), and the Spanish Government under Grant RTI2018-095094-B-C22 “CONSENT”.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Joaquin Garcia-Alfaro .

Editor information

Editors and Affiliations

A Simnet Network

A Simnet Network

To perform our experiments, we create a Lightning simnet network with eleven nodes, \(M,A,B_1, \cdots , B_9\). Node M will be the adversary and A the victim. Nodes \(B_1, \cdots , B_9\) will represent victim’s neighbors. To test all implementations in our simnet, we run different implementations for different nodes. More precisely, the following configuration has been taken. Nodes \(M, A, B_1,B_2,B_3\) run the LND implementation with version 0.5.2-99-beta, nodes \(B_4, B_5, B_6\) the c-lightning with version v0.7.0 and nodes \(B_7, B_8, B_9\) run eclair with version version=0.2-SNAPSHOT. Over this configuration, we have created 10 payment channels, as shown in Fig. 4(a).

With this settlement, M performs a payment to himself, following the route \(M \rightarrow A \rightarrow B_1 \rightarrow A \rightarrow B_2 \rightarrow A \rightarrow B_3 \rightarrow A \rightarrow B_4 \rightarrow A \rightarrow B_5 \rightarrow A \rightarrow B_6 \rightarrow A \rightarrow B_7 \rightarrow A \rightarrow B_7 \rightarrow A \rightarrow B_9 \rightarrow A \rightarrow M\).

The correct execution of such experiment proves that the payment has been processed by all nodes and that routes can effectively contain loops. Notice that the loops tested in this experiment are the shortest possible which validates the shorter loop case of our attack (see Sect. 3). Notice that the implementation selected for each node ensures that such behavior is equivalent in all implementations.

Figure 4(b) shows a new scenario where we have added a payment channel between nodes \(B_6\) and \(B_9\). With this scenario, M performs a payment to himself, following the route \(M-A-B_6-B_9-A-B_6-B_9-A-M\).

Again, the test shows that the payment is correctly processed by all nodes and it proves that all implementations can also accept the longer loop case, since we have chosen A, \(B_6\) and \(B_9\) all with different implementations.

Fig. 4.
figure 4

Simnet scenarios

Once we have ensured that routes with cycles are possible to execute in any implementation, we would like to study how to maximize \(\varDelta _{p}\), the time that a payee can lock a payment p. Such value can be estimated using information of the nodes that are included in a route. More precisely, values \(\delta \) and \(T_{max}\) of each node and the node position in the route determines the maximum time a payment can be blocked.

In our scenario, the adversary controls both the first and the last node of the route. We first describe how, as a first node, the adversary can determine the maximum \(\varDelta _{p}\) for a particular route. Then, we will detail how the adversary, as the last node of the route, may block the payment during \(\varDelta _{p}\) and how, after that time, he can cancel the payment without paying any fee to the routing nodes and, furthermore, leaving all the channels in the same setting than the initial phase of the attack being able to reexecute the attack without any cost.

As pointed out in Sect. 2, the parameters that determine the actions of each node of the route are \(T_{max}\) and \(\delta \). The first one, \(T_{max}\), is the maximum amount that a node allows an outgoing payment in a channel to be locked. And the second one indicates the difference, in blocks, that each hop in the route requires. Such parameters are different for every lightning implementation as Table 4 shows. When a node receives a payment, he sets an expiration timeFootnote 11, \(\theta \), for the payment, and subtracts his \(\delta \). In case that the resulting value is lower than his \(T_{max}\), then he will keep forward the payment, in other case, the node will refuse the payment, the route will be discarded and the payer will need to find another route. Then, the best strategy for an adversary to maximize \(\varDelta _{p}\) is to simulate the route assuming that each node, instead of discarding the payment, will set the new \(\theta \) as his \(T_{max}\). For instance, suppose the following route \(M-B_i-B_j-B_k-M\) and assume that \(B_i\) is a lnd implementation, \(B_j\) is an eclair implementation and \(B_k\) is a c-lightning implementation. Assuming the default values of Table 4, the simulation performed by M will start with \(\theta = \infty \). When processing the first hop, \(B_i\) has a lnd implementation which means \(T_{max}=5000\) and \(\delta =144\) so for that hop, we can compute \(\theta = 5000 - 144 =4856\). In the next hop, \(B_j\) runs an eclair implementation, hence \(T_{max}=1008\) and \(\delta =144\). In that case, since the received \(\theta = 4856\) is greater than 1008 we will set \(\theta = 1008 - 144= 864\). Then \(B_k\) runs a c-lightning with \(T_{max}=2016\) and \(\delta =14\) and the received \(\theta = 864\) is lower than 2016, we can calculate \(\theta =864 - 14 = 850\). Since this is the last hop, \(\theta =850\) is the time during which the channel can be blocked. With this procedure, M can compute the optimal \(\theta \) value that he will include in the first hop to maximize \(\varDelta _{p}\). In that case \(\theta =850 + 14 + 144 + 144 = 1152\) will provide a maximum \(\varDelta _p\), in that case 850

Table 4. Default parameters for different implementations.

Rights and permissions

Reprints and permissions

Copyright information

© 2020 International Financial Cryptography Association

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Pérez-Solà, C., Ranchal-Pedrosa, A., Herrera-Joancomartí, J., Navarro-Arribas, G., Garcia-Alfaro, J. (2020). LockDown: Balance Availability Attack Against Lightning Network Channels. In: Bonneau, J., Heninger, N. (eds) Financial Cryptography and Data Security. FC 2020. Lecture Notes in Computer Science(), vol 12059. Springer, Cham. https://doi.org/10.1007/978-3-030-51280-4_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-51280-4_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-51279-8

  • Online ISBN: 978-3-030-51280-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics