Skip to content

Strange fee calculation #2342

@ghost

Description

Consider these two commitment TXs generated by LND:

TX 1
Includes HTLC 0 of amount 10,000,000 millsats
Input: 100,000 sats (funding)
Output 0: 10,000 sats for HTLC 0
Output 1: 89,104 sats
fee: 896 sats = Commitment weight: 724 + 172 * num-untrimmed-htlc-outputs

TX 2
Includes HTLC 0 of amount 10,000,001 millsats
Input: 100,000 sats (funding)
Output 0: 10,000 sats for HTLC 0
Output 1: 89,103 sats
fee: 897 sats

The fee for TX 2 is 897 sats when it should be 896 according to the formula.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions