2

I am having a hard time understanding the difference between the different "balances" in the Lighting Network. For example, I am running an LND node and I have the following balances:

$ lncli walletbalance
{
    "total_balance": "13841305",
    "confirmed_balance": "13841305",
    "unconfirmed_balance": "0"
}
 
$ lncli listchannels | jq -r '.channels[].local_balance' | awk '{sum+=$1} END {print sum}'
4201392
 
$ lncli listchannels | jq -r '.channels[].remote_balance' | awk '{sum+=$1} END {print sum}'
23804004

What is the difference between the local balance and the wallet balance? If my node forwards a transaction, where do the fees go, in the wallet, or in local?

4

Walletbalance is showing your on-chain balance of a lightning wallet.

Regarding channel balances (locked on layer 2 and not available onchain):

  • local balance is your local balance that you can spend on lightning network
  • remote balance is balance in your channels but it's being owned by the other party in the channel, this is the amount you are able to receive
  • there is also commitment fee locked in every channel, not listed in your snippet. No parties can use it to send funds in the lightning network

Fees for routing will go to your local balance.

I've made a video explaining this question.

  • 2
    Is there a way to see the commitment fee? – alec_djinn Nov 12 '20 at 23:53
  • Using lncli listchannels you'll see something like: "capacity": "x", "local_balance": "x", "remote_balance": "x", "commit_fee": "x", "commit_weight": "x", commit_fee being usually in thousands of sats. – Tony Sanak Nov 13 '20 at 5:09
4

In each of your channels, you have a local balance. This is the balance that is yours in that channel. The counterparty of the channel has the remote balance. All lightning transactions change these balances with each one resulting in their sum being the same and matching the channel capacity. As all transactions in that channel just end up changing the balances, routing fees paid to you go into your local balance.

Your wallet balance is the total amount of funds that you control that are not in a channel. It's the sum of the UTXOs that you control.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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