How does a Lightning Network channel initiator set a limit on the fee rate they are willing to accept for the channel close?
And a second question is how can the close fee be negotiated during a collaborative close?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAs pointed out the funder of the channel is currently responsible for paying the fees and deciding them. BOLT 02 specifies the update_fee
message to be used to signal the fee rate. There it says:
The node responsible for paying the Bitcoin fee SHOULD send
update_fee
to ensure the current fee rate is sufficient (by a significant margin) for timely processing of the commitment transaction. The node not responsible for paying the Bitcoin fee: MUST NOT sendupdate_fee
. A receiving node: if theupdate_fee
is too low for timely processing, OR is unreasonably large: SHOULD fail the channel.
In the case of a collaborative close there is a an algorithm that is part of the closing negotiations:
The closing_signed
message contains the follwoing fields
type: 39 (closing_signed)
data:
[channel_id:channel_id]
[u64:fee_satoshis]
[signature:signature]
I quote again:
The sending node: MUST set
fee_satoshis
less than or equal to the base fee of the final commitment transaction, as calculated in BOLT #3. [...] if the receiver agrees with the fee: SHOULD reply with a closing_signed with the samefee_satoshis
value. otherwise: MUST propose a value "strictly between" the receivedfee_satoshis
and its previously-sentfee_satoshis
. [...] The "strictly between" requirement ensures that forward progress is made, even if only by a single satoshi at a time.