On the Difficulty of Hiding the Balance of Lightning Network Channels

On the Difficulty of Hiding the Balance of Lightning Network Channels

On the Difficulty of Hiding the Balance of Lightning Network Channels Jordi Herrera-Joancomartí Guillermo Navarro-Arribas Alejandro Ranchal-Pedrosa [email protected] [email protected] alejandro.ranchal_pedrosa@ Universitat Autònoma de Barcelona Universitat Autònoma de Barcelona telecom-sudparis.eu Cybercat Cybercat Telecom SudParis Cristina Pérez-Solà Joaquin Garcia-Alfaro [email protected] [email protected] Universitat Rovira i Virgili Telecom SudParis Cybercat Abstract transaction fees [17]. It uses a peer-to-peer network, to trans- The Lightning Network is a second layer technology running fer raw information data. Some of the links in the peer-to- on top of Bitcoin and other Blockchains. It is composed of a peer network are identified as payment channels. Payment peer-to-peer network, used to transfer raw information data. channels allow payments to be routed between Lightning Some of the links in the peer-to-peer network are identified Network clients. as payment channels, used to conduct payments between two The Lightning Network not only provides better scalabil- Lightning Network clients (i.e., the two nodes of the channel). ity. It also enables users to perform payments privately, and Payment channels are created with a fixed credit amount, with low or negligible fees. In its current specification [31], the channel capacity. The channel capacity, together with payments are conducted with an onion-routing protocol [9], the IP address of the nodes, is published to allow a routing to provide each node in the route with the minimum informa- algorithm to find an existing path between two nodes that tion required to relay and retrieve payments. A node other do not have a direct payment channel. However, to preserve than the origin and the destination does not know who is users’ privacy, the precise balance of the pair of nodes of the origin node or the destination node; it only knows from a given channel (i.e. the bandwidth of the channel in each whom and to whom forward the payment. direction), is kept secret. Since balances are not announced, Channels are created with a fixed credit amount, the chan- second-layer nodes probe routes iteratively, until they find a nel capacity. Channels can be used to perform payments successful route to the destination for the amount required, between the two nodes of the channel. The channel capac- if any. This feature makes the routing discovery protocol less ity, together with the IP address of the nodes, is published efficient but preserves the privacy of channel balances. In to allow a routing discovery algorithm to find an existing this paper1, we present an attack to disclose the balance of a path between two nodes that do not have a direct payment channel in the Lightning Network. Our attack is based on channel. To preserve privacy properties, and although the performing multiple payments ensuring that none of them is channel capacity can be known, the particular balances of finalized, minimizing the economical cost of the attack. We each of the nodes of the channel at a given time is set confi- present experimental results that validate our claims, and dential only to the two members of the channel. Given that countermeasures to handle the attack. such balances (i.e., the bandwidth of the channel in each direction) are not announced, routing nodes need to probe and monitor routes iteratively, until they find a successful 1 Introduction path to the destination for the amount required, if any. This The Lightning Network is a second layer running on top of feature makes the routing discovery protocol less efficient, Bitcoin and other Blockchains. Its goal is to address scala- but preserves the privacy of channel balances. bility problems with Bitcoin payment systems, and to lower In this paper, we present an attack to disclose the balance of a channel in the Lightning Network. Our attack is based on performing multiple payments, ensuring that none of 1 The final version of this paper was presented at ASIACCS 2019 them is finalized, and minimizing the economical cost of the attack. Our attack exploits the detailed information provided by the Lightning Network clients on the occurred errors. IACR PrePrint, January, 2019 The onion-routing nature of the Lightning Network routing © 2019 Authors makes difficult for victims to detect the source of the attack, . i.e., the source of the payments. IACR PrePrint, January, 2019 Herrera, Navarro, Ranchal, Pérez, Garcia Section 2 introduces the basic background to understand address controlled by both A and B. The total amount in- the proposed attack and countermeasures. Section 3 de- cluded in the funding transaction is the channel capacity, scribes the adversarial model and provides a detailed descrip- CAB = CBA. tion of the attack. Section 4 provides experimental results. Once a channel is open, the two users holding that chan- Section 5 provides the countermeasures. Section 6 surveys nel can perform payments in both directions, only restricted related work. Section 7 concludes the paper. to the balance that each of them has in the channel. The balance of each user in a channel is a fraction of the capacity 2 Lightning Network Background of that channel, and can be indicated with balanceAB for From an architectural point of view, the Lightning Network the balance that user A has in the channel and balanceBA is a separated peer-to-peer (P2P) network, connected to the for the balance of B. Obviously, the following expression ¹ º main Bitcoin P2P network [12]. More precisely, the Lightning always holds: CAB = CBA = balanceAB + balanceBA . For Network is formed from nodes that run a Lightning software instance, if the user A has deposited 0:1 Bitcoins in the fund- client [14, 32]. The client maintains a P2P network with other ing transaction of the channel, then the initial balances of nodes of the Lightning Network and also a connection with the channel will be balanceAB = 0:1 and balanceBA = 0. a node in the Bitcoin main P2P network. When A performs a payment of 0:02 to B in that channel, Once a node establishes a connection with a peer in the the balances are updated accordingly: balanceAB = 0:08 and Lightning P2P Network, they can open a payment channel balanceBA = 0:02. in which they can exchange Bitcoin transactions without the Payments in a channel are performed through commit- need for such transactions to be set down in the blockchain. ment transactions. When A wants to perform a payment to This payment channel is not a real network connection, but B both users exchange a Bitcoin transaction with special a state of the P2P network connection that both nodes have features. In short, the transaction takes as input the fund- in the Lightning P2P Network. For that reason, a payment ing transaction output of the channel and splits the input channel between two users A and B cannot be created or creating outputs in which every user gets the new balance used without the existence of a connection between A and of the channel. Since such a transaction is not published B in the Ligthning P2P Network. This online model of the in the Bitcoin blockchain, but stored by each user of the Lightning Network differs from the offline mechanism of channel, when a new payment has to be performed, new standard Bitcoin payments, in which A and B may perform commitment transactions are created and exchanged. How- payments between them without being connected, since ever, since the new commitment transactions spend the same payments pass through the blockchain. output from the funding transaction as used in a previous committed transaction, a mechanism should be added to in- 2.1 Payment Channels validate a previous commitment transaction once a new one has been exchanged. This mechanism is performed by a set The core element of the Lightning Network is the payment of transactions that are kept offline. The transactions are only channel. A payment channel can be seen as a contract be- published if the counterpart intends to commit to an invalid, tween exactly two parties, A and B, with a capacity amount old, commitment transaction. Users are discouraged to use of Bitcoins CAB = CBA that is divided between the parties previous transactions since at every new commitment trans- and can be exchanged. Such division, represented as the bal- action, (secret) information of the previous one is revealed, ance of A and balance of B, can be updated without having giving the opportunity to honest users to punish a dishonest to send a transaction to the Bitcoin blockchain. one, by collecting all the balance of the channel [26]. To create a payment channel, A and B need to set a node in Notice that commitment transactions are valid formatted the Lightning P2P Network and connect both nodes in that Bitcoin transactions that, although they are not intended to, network. Once the connection is established, they proceed can be posted in the Bitcoin blockchain at any time for any to create a payment channel. Channel creation is performed of the participants of the channel. by sending a special transaction to the Bitcoin blockchain. At any moment, users of a channel can close the channel The open nature of the Bitcoin blockchain allows any user to and refund the balance each one has in the channel. This re- check when a channel is created and some basic information set can be performed unilaterally, by any of the users sending for that channel, like the capacity of the channel or the 2 the last commitment transaction to the Bitcoin blockchain or Bitcoin addresses that created the channel . jointly, by creating a closing transaction in which the fund- The Bitcoin transaction needed to create a channel is ing transaction output of the channel is spent in two outputs known as the funding transaction, a transaction in which that equal the actual balances of each user.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us