Skip to content

Add receiver-side enforced amount constraint for zero-valued invoices #5921

Open
@joostjager

Description

@joostjager

When a zero-valued invoice is created, the receiver has no control over the amount that is possibly accepted. This can be fixed by creating the invoice as a hodl invoice and inspecting the amount before settling. An external application is required though for tracking the invoices.

With recurring AMP payments, it arguably is more important to have control over the amount range and in particular the minimum amount. Otherwise someone can fill up the invoice db with large numbers of recurring 1 msat payments. The fix above cannot be used, because AMP-hodl invoices are not (yet) supported.

An alternative would be to consider the amount range as a basic property of a zero-valued amp or regular invoice and enforce it in the invoice registry.

This change would also make recurring AMP almost completely compatible with lnd-based wallets that support ln address. See https://twitter.com/joostjgr/status/1455503401366827008

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions