Bitcoin
$8,769.18 -0.28%
BTC · 17w

Lightning Network Routing: Privacy and Efficiency in a Positive-Sum Game

The shortest distance between two points is a straight line. Everybody knows that. Except it’s not true — at least not outside of a Euclidean universe of mathematical abstraction. Everyone who’s watched lightning knows that it doesn’t travel in a straight line. Instead, lightning travels from one point in space to the next depending on the resistance it encounters, automatically finding the most efficient route, one infinitesimal segment at a time.

Kinda beautiful, isn’t it? (Source: wikimedia)

Payments on the Lightning Network face a similar challenge, but the network doesn’t have nature’s optimization procedures built in. Lightning (we’re talking about the network now) requires plenty of thought, code, and adaptation to be as robust and efficient as possible. In this post, we’re going to explain how payment routing works on the Lightning Network, what aspects still need improvement, and the routing technologies of the future.

Where Routing Stands Today

The first point to note is that routing already works on the Lightning Network. In fact, it works very well. On Android and the iPhone too.

The Basics: Nodes, Channels, Onions

The fundamental building blocks of the Lightning Network are nodes and the payment channels (i.e. edges) that connect them. A node can be any user, merchant, or LSP. Payment channels connect (some) nodes to (some) other nodes.

Naturally, every node on the network will be connected to at least one other node, but it is not very likely that a given node, like your light client, will have a channel open with another given node, say Tschego and Lonny, whose bees make the best honey this side of Johannesburg. Opening a payment channel is an on-chain transaction, so having to open a channel for every new counterparty would defeat the purpose of having a second-layer network. Therefore, any payment between two unconnected nodes is better off finding a route through a series of existing payment channels.

You’re n...
Continue on medium.com
Recent news
BTC -0.28% · gechev.com · 10h

Bitcoin price display ticker on Raspberry Pi with PHP

With the Bitcoin price increase in the time, I was interested in investing and understanding what is Bitcoin at all. This is why I invest in some BTC and start to look at the price daily. Unfortunatel...
BTC -0.28% · bitcoinops.org · 18h

Bitcoin Optech Newsletter #72

This week’s newsletter announces a security disclosure affecting some older releases of Bitcoin Core, describes new developments related to taproot, mentions a potential privacy leak related to the LN...