Probing Lightning Channel Balances
⚡
Sergei Tikhomirov (University of Luxembourg)
Joint work with Rene Pickhardt, Alex Biryukov, Mariusz Nowostawski
Full paper: https://arxiv.org/abs/2004.00333
Lightning Hackday, 2020-04-04
Outline
LN intro (for completeness, I know you know this ;)
LN routing
Example: LN as seen by ACINQ (node 0386..3f8f)
Why do payments fail anyway?
Lightning privacy: are local balances private?
What about local balances?
There is no API call to query local balances, but can we still discover them?
Probing one channel
Probing a route
Mallory can probe along a route of channels: [c1 -- c2 -- … cn].
Let’s say some channel failed while probing with amount a.
This means that balance (at the side closer to Mallory):
Our actual probing algorithm
Implemented in Python as a c-lightning plugin (the plugin system is so cool!)
Technical challenges
Results: we can probe the whole testnet overnight
We probed the whole testnet (200+ live nodes, 1600+ live channels) in 14 hours.
Mainnet has ~20x more channels, but optimizations are possible (see paper).
50% of channels can be probed in ~20 seconds
We can probe nearly all small channels
Can’t fully probe large channels:
Can fully probe only if balance is in 1st or 4th “quarter”.
Are local balances worth protecting?
A privacy-efficiency tradeoff
As protocol designers, we can go two ways:
Let users set individual policies for their nodes / channels w.r.t. this tradeoff?..
Interesting questions for future research!
Q&A
Follow me on Twitter @serg_tikhomirov
Read the whole paper for more detail:
https://arxiv.org/abs/2004.00333
Huge thanks to Rene, Alex, and Mariusz!
Further reading
Channels are either well or poorly balanced