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

[tapchannel]: Add Transmission Unit Functionality to Bound Invoice Amounts #1096

Open
dstadulis opened this issue Aug 20, 2024 · 0 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@dstadulis
Copy link
Collaborator

Adding a "transmission unit" concept to tapd:
Dictates the minimum and maximum amounts, a payment channel, can receive.
Goal: Ensure that invoiced amounts are created with values which can be settled.

  • the feature's new functionality: Create a "transmission unit" which dictates a minimum and maximum amount for a payment channel to be able to receive.
  • Minimum transmission unit to govern the “ensure that amount value, that's set for an created invoice, is set the minimum unit” “e.g. 1 US cent would be the minimum transmission unit for a taproot asset payment channel”
  • The maximum transmission unit could be the cumulative to_remote amount of the specified asset

Minimum Transmission Unit:
The minimum transmission unit should govern the minimum Asset amount value set when creating a Taproot Asset payment channel invoice. e.g The minimum transmission unit would be 1 US cent (or equivalent in the specified currency).
Goal: ensure invoices created will receive the minimum amount of the Asset.

Maximum Transmission Unit:
The maximum transmission unit should be set to
CASE
MPP) the cumulative to_remote amount of the specified asset, across all available channels.
non-MPP) to_remote amount of the specified asset, across the specified channel.
These maximum value will prevent excessive amounts from being attempted to be sent through the payment channel, reducing the dysfunction

Benefits:

  • Ensures consistency in payment channel amount values
  • Prevents creation of invoices with unsettlable small or large amounts
  • Reduces risk of overflow or other issues due to excessive amounts

Implementation Details:
To implement this feature, we will need to:

  1. Introduce a new configuration option for setting the minimum and maximum transmission units.
  2. Update the payment channel invoice creation logic
  3. Update the invoice creation logic to enforce that the invoice's amount value is bound between the minimum and maximum transmission units.

Related Issues:
#1013
#1073

Implementation Questions
Given payment-channel availability inconsistency (offline peer etc) what would be robust method to select the maximum TU?

@dstadulis dstadulis added the enhancement New feature or request label Aug 20, 2024
@dstadulis dstadulis changed the title [tapchannel]: Add Transmission Unit Functionality to Bound Payment Channel Amounts [tapchannel]: Add Transmission Unit Functionality to Bound Invoice Amounts Aug 20, 2024
@dstadulis dstadulis added this to the v0.5 milestone Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant