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?