5

In Lightning Network, is the balance publicly announced in real-time?

On the one hand, it should be public as it is crucial to the routing mechanism.

But, in case that the balance might reveal some private information to the network..

I didn't find the answer in the BOLT documentation.

Thanks.

2 Answers 2

4

Channels do not publicly announce their balance for several obvious reasons

  • It would be a huge privacy concern if balances could be viewed live on the network. People could monitor large parts of the network and aggregate data about how balances change over time, which could then be used to trace payments through the network and deanonymize users.

  • If every transaction by every node required a broadcast of the new channel balance, then bandwidth usage would become extremely large. The network would not scale for the same reasons Bitcoin can't have massive blocks. It would make running a node impossible on a commodity computer and internet connection.

  • Broadcasting channel balance would really be quite useless because the concept of "real-time" does not exist in a distributed network. A node could advertize its channel balances to its peers, but before any peer has chance to act on that data, those balances could have changed if they route a payment for another peer. The system is in constant change, and there is no way to atomically check a channel balance and then send a payment over that channel. It would be a bad idea to attempt to add such locks because there is no central coordinator of them, and it would result in all kinds of race conditions happening, like livelocks and deadlocks.

Channels only advertize their capacities, features, fees, minimum and maximum (optional) transaction values. There is no guarantee that a payment will route successfully even if you've provided a valid amount between the minimum and maximum with the correct fees.

3

The channel balance is not a public information. If you look at the channel_announcement-message in BOLT7 you see that the following information of the channel is public:

[64:node_signature_1] [64:node_signature_2] [64:bitcoin_signature_1] [64:bitcoin_signature_2] [2:len] [len:features] [32:chain_hash] [8:short_channel_id] [33:node_id_1] [33:node_id_2] [33:bitcoin_key_1] [33:bitcoin_key_2]

There you can see neither capacity nor balance however the short_channel_id consists of the blockheight of the funding transaction and the index of the transaction and the index of the output within the transaction as described here.

Also from BOLT7 you can take the following quote about the channel_update_message:

Note that the htlc_maximum_msat field is static in the current protocol over the life of the channel: it is not designed to be indicative of real-time channel capacity in each direction, which would be both a massive data leak and uselessly spam the network (it takes an average of 30 seconds for gossip to propagate each hop).

I hope both points give you a definite answer (:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.