Skip to content

BOLT 4: further restrictions on overpayment#1337

Open
rustyrussell wants to merge 2 commits into
lightning:masterfrom
rustyrussell:guilt/avoid-overpayment
Open

BOLT 4: further restrictions on overpayment#1337
rustyrussell wants to merge 2 commits into
lightning:masterfrom
rustyrussell:guilt/avoid-overpayment

Conversation

@rustyrussell
Copy link
Copy Markdown
Collaborator

Reports from the field (thanks @michael1011) of gross overpayment in reasonable user scenarios: a payment is taking too long, so they try with another wallet.

Two changes to avoid this.

@michael1011 noets a Boltz complaint where users end up largely
overpaying due to stuck payments and retrying from a different wallet.
@TheBlueMatt points out that our rule could be stricter, requiring
rejection of any "unnecessary" parts of the payment for little extra
cost.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@michael1011 reports that they have had user complaints about gross
overpayment, so tighten the requirements to 1% of 5000 sats, which are
comparable with reasonable network fees.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@ziggie1984
Copy link
Copy Markdown
Contributor

I think this leaves the overpayment rules inconsistent with the existing 2x language elsewhere in the spec.

Before this PR, the 2x rule appears to line up across the relevant sections:

  • BOLT 11 says BOLT 4 specifies that the payee SHOULD accept up to twice the expected amount, so the payer can add small variations.
  • BOLT 4's basic MPP writer rules say that if the invoice specifies an amount, the sender MUST set total_msat to at least that amount and less than or equal to twice that amount.
  • BOLT 4's final-node failure handling currently only says the final node SHOULD fail if the amount paid is more than twice the amount expected.

This PR changes only the last rule to a much tighter threshold: more than max(5000msat, 1%) above the expected amount. That means a payer could still be compliant with the unchanged BOLT 4 MPP sender rule by setting total_msat anywhere up to 2x the invoice amount, while the final node would now also be compliant by failing that payment once it exceeds the new threshold.

So I think this needs matching updates to the BOLT 11 text and the BOLT 4 MPP sender rule, or the new failure threshold needs to be scoped more narrowly so it does not contradict the existing 2x allowance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants