lightning-dev

Combined summary - CheckTemplateVerify Does Not Scale Due to UTXO's Required For Fee Payment

Combined summary - CheckTemplateVerify Does Not Scale Due to UTXO's Required For Fee Payment

Lightning Network channels are currently designed with an understanding that the commitment transactions will pay a low fee rate by default, which can be later increased using anchor outputs and Child Pays for Parent (CPFP) methods.

This design may not necessarily burden the initiator with the majority of the fee costs. In practice, the recipient often ends up paying more to expedite their transaction. A real-world example is cited where due to a glitch during a channel closing, the recipient with a significantly larger balance had to use CPFP to push through a commitment transaction with a fee below the minrelayfee. This contradicts the presumption that the initiator should pay the majority of fees.

The email also discusses Bitcoin Improvement Proposal 118 (BIP 118), which aims to simplify certain types of transactions in off-chain contract protocols. BIP 118 suggests altering the transaction digest algorithm of BIP 143 when verifying a SIGHASH_NOINPUT signature by setting certain fields to zeros, thereby not committing to previous outputs or other inputs' sequences within the transaction.

Moreover, the email addresses misconceptions about the Decker-Russell-Osuntokun protocol and its impact on transaction fees, particularly highlighting that update transactions require input and output amounts to be equal, meaning fees must be covered externally. For deeper insight into the nuances of fee payments within Lightning Network channels, one can refer to the provided blog post v3 Transactions Review.

The discussion further extends to potential attack strategies within the Lightning Network, such as opening a channel with low fees and transferring funds before abandoning the node, leaving the victim to incur unilateral closure fees. An "initiator pays" model could mitigate such risks. The non-zero reserve proportional to the channel's size is emphasized as a deterrent against repeated attacks. Fee asymmetry could be introduced by modifying nSequence in update+state transactions or by only providing full signatures for the lowest-fee versions to the counterparty.

The handling of commitment transactions and HTLC (Hash-Time Locked Contracts) feerates is another area of focus, stressing the necessity for all fee variants to be supplied before the state of a lightning channel progresses. This ensures that channels do not advance until conditions are met, preventing incomplete commitments.

Finally, the email touches upon the issue of fixed fee rates in commitment transactions within both the current Poon-Dryja and the expected Decker-Russell-Osuntokun frameworks of the Lightning Network. Anchor commitments are proposed as a solution to adjust fees. However, multiple off-chain transaction versions with varying fee rates have been suggested to provide flexibility in fee payment, although this could also lead to imbalances if one party prefers high-feerate versions without any repercussions.

Michael Folkson's comparison between CPFP and RBF highlights the potential inefficiencies of CPFP in high-fee scenarios and questions whether Lightning Network Symmetry based on CTV faces similar limitations compared to an ANYPREVOUT-based system. He suggests that an APO-based system could better adapt fees to market rates with each channel update. For those interested in gaining a deeper understanding of Bitcoin and its transaction mechanisms, Michael Folkson recommends the resource Port of Bitcoin.

Discussion History

0
Michael FolksonOriginal Post
January 25, 2024 12:57 UTC
1
January 30, 2024 04:12 UTC
2
January 30, 2024 04:38 UTC
3
January 30, 2024 05:07 UTC
4
January 30, 2024 05:17 UTC
5
January 30, 2024 05:55 UTC
6
January 30, 2024 08:40 UTC