Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Invoice-Based Payments #27

Open
carlaKC opened this issue Aug 16, 2023 · 0 comments
Open

Feature: Invoice-Based Payments #27

carlaKC opened this issue Aug 16, 2023 · 0 comments
Labels
feature New feature or request Medium Priority

Comments

@carlaKC
Copy link
Contributor

carlaKC commented Aug 16, 2023

At present, SimLN only uses keysend payments. This has the following implications:

  • All nodes need to support the keysend feature bit
  • We have no coverage for MPP payments
  • We do not require execution on the destination node (because we do not have to create an invoice)

We support two types of activity generation, which will have slightly different requirements for updating to invoice-based payments:

  • Defined: provide a list of payment flows (send X from A to B)
  • Random: provide list of nodes (A / B / C) and send payments between them

For defined activities, we don't need to have execution permissions on the destination node (because we can just send a keysend payment). For random activities, we enforce that we have execution on all nodes because every listed node needs to send payments.

This means that:

  • To use invoice-based payments for defined activites, we'll need to validate that the destination node is one we have execution permissions on (ie, it's in our list of nodes).
  • To use invoice-based payments for random activities, we just need to switch over to using them (because we already validate that we have execution on all receiving nodes).

Suggested order for implementation:

  • Update random activity execution to use invoice-based payments
  • Add option to use invoice-based payments for defined activities:
    • Add new action "type" for invoice-based (leave keysend as default)
    • Update validation to enforce:
      • Keysend feature bit if using keysend
      • Execution perms on receiving node if using invoice-based
    • Update sim-file to assume use of keysend, and add an optional tag to incidate that invoice-based in desired
@carlaKC carlaKC added feature New feature or request Medium Priority labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Medium Priority
Projects
None yet
Development

No branches or pull requests

1 participant