Skip to content

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

@dstadulis

Description

@dstadulis

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions