-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commitment transaction fee calcualtion #1110
Comments
The negotiated commitment fee in listchannels is the fee for a force-close of a channel. On a cooperative close, there is fee negotiation at the time of the closure. |
@vegardengen is correct. |
Note that it's also possible to set the target fee for a co-op closing transaction on the command line (see |
Who pays the fee if the cooperative close negotiated fee is higher than the commit_fee? |
Background
Unclear Commitment transaction data.
I opened a 100,000 sat channel with a peer. (https://testnet.blockchain.info/tx-index/195790884/0)
After confirmations I see:
offerm@OffersLinux:~$ lncli listchannels
{
"channels": [
{
"active": true,
"remote_pubkey": "026d2f05b3d01269def3941f79005d62c0ba124d93aa6b81fc200329188a59a49e",
"channel_point": "dbf30ae0ab683f9aac8433f35f8fea01e02a9bd83e3071f33995f167b6228d93:0",
"chan_id": "1422097344253132800",
"capacity": "100000",
"local_balance": "95475",
"remote_balance": "0",
"commit_fee": "4525",
"commit_weight": "600",
"fee_per_kw": "6250",
"unsettled_balance": "0",
"total_satoshis_sent": "0",
"total_satoshis_received": "0",
"num_updates": "0",
"pending_htlcs": [
],
"csv_delay": 144,
"private": false
}
]
}
Then I closed the channel https://testnet.blockchain.info/tx-index/195791859
The fee was just 739 sat and I got back 99261 sat. Weight is 549.
This is not in line with the listchannels information.
Impact of this is that I can't maximize the usage of the funds in the channel.
Your environment
lnd version 0.4.1-beta commit=c5dd53f9ddee2b718bd325f605e18d128bbe8c79
Darwin admins-MacBook-Pro-2.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
btcd version 0.12.0-beta
Steps to reproduce
Open and close a channel on testnet
Expected behaviour
listchannels information should be correct.
Actual behaviour
Paid smaller (order of magnitude) fee and got back more sat.
The text was updated successfully, but these errors were encountered: