Skip to content

[feature]: generate asset invoice with fix amount of SATs instead of asset amount #1440

@saraogiraj94

Description

@saraogiraj94

Is your feature request related to a problem? Please describe.
We are working on receiving assets on LNURL /LN Address, currently, when a user requests an LN invoice for a fixed amount in SATs (e.g., 1100 SATs) for given LNURL , since we know that this LNURL is linked to asset we convert this amount into an equivalent USDT-L (Taproot Asset) based on our exchange rate and generate a USDT-L invoice in the background. However, due to slight fluctuations in the exchange rate or rounding mechanisms at price oracle, the SATs value of the generated invoice may slightly differ (e.g., 1105 SATs instead of 1100).

This discrepancy causes an issue where the payer's wallet (expecting an invoice of exactly 1100 SATs) rejects the payment since the decoded invoice shows a different SATs amount than initially requested.

Describe the solution you'd like
We propose enhancing the "generate invoice" API in Tapd to allow specifying the invoice amount in SATs rather then asset amount while still issuing an asset-backed (USDT-L) invoice. This means:

The requested SATs amount remains fixed (e.g., 1100 SATs).
The backend handles the conversion and ensures the asset invoice (USDT-L) internally matches the requested SATs amount.
The payer sees an invoice with the expected SATs amount, preventing wallet rejection.
This would allow seamless integration of USDT-L payments within LNURL without breaking existing user expectations.

Describe alternatives you've considered
Wallet-side adaptation: Requesting LN wallets to support a small margin of deviation in invoice amounts, but this is not widely supported and would require broad ecosystem changes.

Additional context
This issue primarily affects Lightning Address (LNURL) payments where users expect fixed SATs amounts. If TAPD allows asset-backed invoices with a fixed SATs value, it would enhance stablecoin interoperability in Lightning without breaking user expectations.

Below is the current journey of payment

  1. Alice wants to send 1100 SATs on LN Address of Bob
  2. Alice Pings our wallet for an LN Invoice of 1100 SATs
  3. At wallet we know that this LN Address created by Bob is meant for USDT-L so he is expecting his asset (USDT-L) balance to increase.
  4. We convert the 1100 SATs to say 1.1 USDT-L based on exchange rate and generate invoice of it, and due to price oracle at node the SATs value of invoice become 1105 SATs.
  5. When Alice receives invoice and decode it it sees that amount in invoice is 1105 SATs
  6. Now since the amount is different (1105) then what was requested (1100) the wallet of Alice denies the operation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions