A scalable private Bitcoin payment channel network with privacy guarantees
Introduction
Some welcome Bitcoin as the next big innovation since the introduction of the Internet (Zebpay, 2017). Undoubtedly, Bitcoin has not only revolutionized the way payment systems can be designed in a purely distributed manner but it has also offered the novel Blockchain data structure that is now endorsed as an innovative solution in many areas such as healthcare, finance, government operations, logistics, etc. (Kuo, 2017; Hackius and Petersen, 2017; Cebe, 2018).
The idea in Bitcoin is to process batches of transactions and once they are validated by miners, they are stored in a chain of blocks maintained as a distributed ledger. Therefore, once a transaction is written in a block in the Blockchain after a consensus, it cannot be deleted or changed. This persistent, transparent and append-only structure of the Blockchain uncovers a strong platform where the shareholders can store or transfer ownership of their assets in a trustless way.
For sure, Bitcoin has unfolded many new opportunities. However, it has been widely criticized for its long transaction confirmation times and high fees charged for the transactions (Bloomberg, 2017; BitInfoCharts, 2017). The Bitcoin network, by design, tries to adjust the confirmation time of a block to 10 min. In general, a block is accepted to be valid after the confirmation of the 6th subsequent block, which yields the confirmation time of a transaction to be around 60 min. Therefore, such long transaction confirmation times are not suitable for applications where timely payment evidence is critical. In addition, the transaction fees are not proportional to the amounts being transferred. These challenges make Bitcoin impractical for many day-to-day micropayment schemes such as buying a cup of coffee or paying for lunch.
Despite the mentioned impracticalities, Bitcoin is still the most widely used digital currency, and its market cap is above 50% among all digital currencies. So, it makes perfect sense to try to alleviate the above problems of Bitcoin. To this end, as a solution, the concept of off-chain payment channels (Poon and Dryja, 2015) was introduced where transactions are done through escrow-like accounts. In this way, in the duration of an agreement, two parties can perform many instant payments in real-time without a need to always write them to the Blockchain. Thus, one can save the on-chain transaction fees that are conducted within the agreed term just because the off-chain mechanism requires typically two on-chain transactions; one for opening the escrow account and one for closing it.
Due to such advantages of off-chain payments, payment channel networks (PCNs) started to evolve by applying the off-chain concept widely such that a network of retailers and off-chain links can be created just like an Internet backbone to link every retailer and customer and allow multi-channel/multi-hop payments. A PCN is essentially a network topology that allows routing of payments from any source to any other destination.
Lightning Network (LN) is a PCN proposed in 2016 and deployed for Bitcoin in late 2017 which serves for, as of today, more than 10,000 nodes. The introduction of LN also introduced another level of privacy to the cryptocurrency users. In LN, when a channel is established between two parties for off-chain transactions, it has a certain capacity and can be either private or public. In the case of a private channel, the peers do not need to advertise their intent to the network. For a public channel, while it is known to everyone, the directional capacities (i.e., one-way transaction capacity to the other party) of the channel are still not disclosed to the network. The capacity information advertised by the peers is the total capacity of the peers who own the channel. In this way, the total assets of the users are kept private to a certain extent. Additionally, when there is a transaction following a multi-hop path, the intermediary nodes do not know the source and the destination nodes of the payment. They only know the next hop.
However, there are several issues with the current LN. First of all, instead of connecting retailers and customers directly, LN relies on relay nodes which act as bridges between retailers and customers. For the retailers this is a major shortcoming since this leads to a hub-and-spoke topology where some of the nodes hold the most of the connections and capacity of the network. Consequently, this defeats the very idea of decentralization. A recent experiment where a practitioner was questioning the capacity of the channels in LN revealed interesting results (diar.co, 2018). During the time of that experiment, the average channel capacity was around $20 and the success rate for sending $5 and $0.43 was around 50% and 90% respectively. These numbers indicate that adoption of LN by current retailers will not be possible if success rates do not improve significantly. Second, allowing the relay nodes to become monopolies in forwarding poses vulnerabilities for denial of service (DoS) attacks (TrustNodes, 2018) and privacy analysis of customers’ transactions assuming that some of these nodes are compromised to monitor transactions passing through them.
Hence, we advocate formation of a private PCN that will bring together retailers under a consortium rather than opening it to public as in the case of LN. This suggests that there will be a need for developing a highly decentralized topology which will be reliable and can support the needed amount of transactions with additional privacy constraints for the participants. In this paper, we propose to build such a private PCN from scratch that will utilize off-chain payment channels with the objectives of distributing the forwarding loads evenly among all the nodes while minimizing the number of their off-chain channels to decrease the total fee cost of the network. Inspired by the multi-commodity flow problem (Haghani and Oh, 1996), the problem can be modeled as such where commodities will be our transactions. However, since the multi-commodity flow problem is NP-complete (Even et al., 1975), an optimization model will not scale.
We thus came up with a heuristic idea which will form a network topology by relying on the transaction intents between nodes using the shortest path algorithm. As nodes start to transfer money to each other, weights (or interchangeably referred to as costs) on the edges will be updated so that the shortest path formations can be influenced in such a way that existing channels are favored to a certain extent. There are three components in the weight of an edge, namely, link-establishment cost, transaction cost, and the new channel forcing cost. When all of the transactions are completed, we obtain a final topology by creating off-chain links on the used paths. We consider several criteria while initializing and changing the weights of the edges that will enable a highly decentralized topology.
Finally, we propose to extend this approach for guaranteeing the privacy of the payments inspired by the approach in Tor where each message travels at least 3-hops. Similarly, we aim to achieve at least 3-hops for each payment path to satisfy privacy for the payments (Dingledine et al., 2004). To force this, we utilized k-shortest path algorithm for the paths that have path length less than 3 and conduct a re-routing.
The evaluations using Python and Gurobi solver indicate that our proposed heuristics can provide comparable performance to that of the optimal solution while allowing scalability and fairness. We also achieved 3-hops payments with similar topology features with a slight increase in the computational time.
This paper is organized as follows: The next section summarizes the related work and in Section 3 we provide the background for the related concepts and the motivation for the problem. Section 4 explains the proposed algorithm and Section 5 explains the extension of the proposed algorithm with guaranteed privacy. Section 6 presents the experimental setup and corresponding results. Paper is concluded in Section 7.
Section snippets
Payment channel networks
High transaction fees and long confirmation times are the major issues for the cryptocurrencies and there is a substantial interest in these issues from both the industry and academic community. Most of these efforts are concentrated around Bitcoin. Building PCNs is a part of these efforts. PCNs can be classified into two categories. The first category relies on building a PCN for intra-blockchain operations. It allows transferring money between parties over already existing off-chain links
Background on off-chain links
Off-chain transaction channels mechanism is used for saving transaction fees and time in the current Bitcoin system which constitutes the main motivation of this study. Specifically, an in-advance payment transaction is provided to the Blockchain for establishing a 2-of-2 multi-signature trustless escrow account, and future successive transactions take place using this shared account. The account activities are signed and tracked by the peers without being written to Bitcoin's public ledger.
Proposed heuristic algorithm
In this section, we describe our proposed heuristic in more detail.
Extending the heuristic for privacy guarantees
The higher the number of hops a payment is traversing through, the better the privacy is. This is inspired by the idea of privacy in the Tor network where each message needs to traverse at least 3-hops (Dingledine et al., 2004). In LN the payments are transferred from a source to a destination within encapsulated messages. If a node in the center knows that it is the node in between the source and the destination it will be able to gather information about the users. This also comes with
Evaluation
In this section, we describe the experiment setup, performance metrics and discuss the evaluation results.
Conclusion
Cryptocurrency based payment channel networks using the idea of off-chain payments has been emerging recently. This is not only because they reduce confirmation times but they also let users send micro-payments in a very affordable way. Therefore, forming a reliable and scalable P2P payment network is an open question assuming a private consortium of retailers (nodes). In this study, based on some scenarios and assumptions, we developed a heuristic approach to form such a payment network
Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgment
This study was partially funded by the National Science Foundation under award number NSF-CNS-1663051.
Enes Erdin is an Assistant Professor in the Computer Science Department at University of Central Arkansas, Conway. He conducts research in the areas of hardware security, blockchain technology, and cyber-physical systems. Erdin received a Ph.D. in Electrical and Computer Engineering from Florida International University, Miami where he was a NSF CyberCorps fellow.
References (30)
- et al.
Formulation and solution of a multi-commodity, multi-modal network flow model for disaster relief operations
Transport. Res. Pol. Pract.
(1996) Bitcoin Contract
- et al.
Path Routing–Part 2: Heuristics
(2007) Block4forensic: An integrated lightweight blockchain framework for forensics applications of connected vehicles
IEEE Commun. Mag.
(2018)Lightning Strikes, but Select Hubs Dominate Network Funds
(2018)A note on two problems in connexion with graphs
Numer. Math.
(1959)- et al.
Tor: the second-generation onion router
- et al.
Building a private Bitcoin-based payment network among electric vehicles and charging stations
IEEE International Conference on Blockchain
(2018)
BOLT 4: Onion Routing Protocol
On the complexity of time table and multi-commodity flow problems
IEEE
Blockchain in logistics and supply chain: trick or treat?
epubli
On the Difficulty of Hiding the Balance of Lightning Network Channels
Cited by (8)
Hybrid lightning protocol: An approach for blockchain scalability issue
2021, Procedia Computer ScienceBitcoin Layer Two Scaling Solutions: Lightening Payment Channels Network Comprehensive Review, Mechanisms, Challenges, Open Issues and Future Research Directions
2024, Iraqi Journal for Computer Science and MathematicsAdaptor signature scheme based on ISRSAC digital signature algorithm
2023, Tongxin Xuebao/Journal on CommunicationsEnhancing computational scalability in Blockchain by leveraging improvement in consensus algorithm
2023, Frontiers in Computer ScienceSorTEE: Service-Oriented Routing for Payment Channel Networks With Scalability and Privacy Protection
2022, IEEE Transactions on Network and Service ManagementInsights of Security Approach on Payment System using Blockchain
2022, Research Square
Enes Erdin is an Assistant Professor in the Computer Science Department at University of Central Arkansas, Conway. He conducts research in the areas of hardware security, blockchain technology, and cyber-physical systems. Erdin received a Ph.D. in Electrical and Computer Engineering from Florida International University, Miami where he was a NSF CyberCorps fellow.
Mumin Cebe is an Assistant Professor in the Computer Science Department at Marquette University, Milwaukee. He conducts research in the areas of blockchain, wireless networking, and security/privacy that relates to the Internet of Things and cyber-physical systems, particularly in smart grids and vehicular networks. Cebe received a Ph.D. in Electrical and Computer Engineering from Florida International University, Miami.
Kemal Akkaya (A′08–M′08–SM′15) received the Ph.D. degree in computer science from the University of Maryland, Baltimore, MD, USA, in 2005. He joined, as an Assistant Professor, the Department of Computer Science, Southern Illinois University Carbondale (SIU), Carbondale, IL, USA, where he was an Associate Professor from 2011 to 2014. He was also a Visiting Professor with George Washington University, Washington, DC, USA, in 2013. He is currently a Professor with the Department of Electrical and Computer Engineering, Florida International University, Miami, FL, USA. His current research interests include security and privacy, energy aware routing, topology control, and quality of service issues in a variety of wireless networks. He was the recipient of the Top Cited Article Award from Elsevier in 2010. He is currently an Area Editor for the Elsevier Ad Hoc Network journal, and is on the Editorial Board of the IEEE Communication surveys and tutorials.
Eyuphan Bulut (M′08) received the Ph.D. degree in computer science from Rensselaer Polytechnic Institute, Troy, NY, USA, in 2011. He was then a Senior Engineer with Mobile Internet Technology Group group, Cisco Systems, Richardson, TX, USA, for 4.5 years. He is currently an Assistant Professor with the Department of Computer Science, Virginia Commonwealth University, Richmond, VA, USA. His research interests include mobile and wireless computing, network security and privacy, mobile social networks, and crowd-sensing. He has been an Associate Editor for IEEE Access.
Selcuk Uluagac ([email protected]) is an associate professor in the Department of Electrical and Computer Engineering at Florida International University, Miami, where he leads the Cyber-Physical Systems Security Lab. His research focuses on security and privacy for the Internet of Things and cyberphysical systems, and he has many publications on the practical and applied aspects of these areas. Uluagac received a Ph.D. in electrical and computer engineering from the Georgia Institute of Technology, Atlanta.