Finding the Optimal Payment Route in the Lightning Network

Authors

  • E. S. Shcherbina Vinnytsia National Technical University
  • V. І. Mesyura Vinnytsia National Technical University

DOI:

https://doi.org/10.31649/1997-9266-2020-153-6-93-99

Keywords:

cryptocurrency, bitcoin, blockchain, lightning, graph theory, graph algorithms, shortest path search

Abstract

The article is devoted to the problem of scaling the bitcoin blockchain and the main methods of its solution. The main methods of solving this problem are described, such as SPV (simplified payment verification) — nodes, SegWit, auxiliary blockchains (sidechains) and Lightning Network (Lightning Network). The advantages and disadvantages of the above approaches are presented.

The article provides details of the technical structure of the Lighting Network, the mechanism of which allows you to avoid writing each transaction on the blockchain. Key concepts such as unconfirmed transactions, double spend protection, multi-signature, temporary locks, hashes and secrets are described. The process of channel opening and lightning transaction are considered. The source code of Bitcoin Scrypt stack programming programs used during lightning transactions is provided and analyzed.

The article proposes models that are convenient for describing lightning network, namely graph and network model. The graph model involves making a payment along one path, in turn, the network model involves splitting the payment into several smaller payments (possibly using the algorithm AMP — atomic multipath payment).

The article describes the tasks faced by developers of wallets for Lightning Network, namely finding the size of the maximum payment that can be made under given conditions (with an arbitrary or fixed number of intermediaries) and making a fixed size payment with the minimum possible fee. Algorithms were formalized in terms of graph theory by the help of developed models. A detailed algorithm for solving formalized problems is proposed, using binary search, width search and min-cost-max-flow algorithms.

Author Biographies

E. S. Shcherbina, Vinnytsia National Technical University

Post-Graduate Student of the Chair of Computer Science

V. І. Mesyura, Vinnytsia National Technical University

Cand. Sc. (Eng), Associate Professor, Professor of the Chair of Computer Science

References

«Пошук у ширину,» Електронний журнал MAXimal, 2008. [Електронний ресурс]. Режим доступу: https://e-maxx.ru/algo/bfs.

«Потік мінімальної вартості,» Електронний журнал MAXimal, 2008. [Електронний ресурс]. Режим доступу: https://e-maxx.ru/algo/min_cost_flow .

Btc Drak, Mark Friedenbach, and Eric Lombrozo, “CHECKSEQUENCEVERIFY,” 2015. [Electronic resource]. Available: https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki .

Eric Lombrozo, Johnson Lau, and Pieter Wuille, “Segregated Witness (Consensus layer) ,” 2015. [Electronic resource]. Available: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki .

Johnson Lau, and Pieter Wuille, “Transaction Signature Verification for Version 0 Witness Program,” 2016. [Electronic resource]. Available: https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki .

Eric Lombrozo, and Pieter Wuille, “Segregated Witness (Peer Services),” 2016. [Electronic resource]. Available: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki .

Peter Todd, “OP_CHECKLOCKTIMEVERIFY,” 2014. [Electronic resource]. Available: https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki .

Sean Bowe, and Daira Hopwood, “Hashed Time-Locked Contract transaction,” 2017. [Electronic resource]. Available: https://github.com/bitcoin/bips/blob/master/bip-0199.mediawiki .

Downloads

Abstract views: 167

Published

2020-12-25

How to Cite

[1]
E. S. . Shcherbina and Mesyura V. І. ., “Finding the Optimal Payment Route in the Lightning Network”, Вісник ВПІ, no. 6, pp. 93–99, Dec. 2020.

Issue

Section

Information technologies and computer sciences

Metrics

Downloads

Download data is not yet available.