Skip to content

[feature]: heterogeneous multi asset LN channels #1485

@guggero

Description

@guggero

This is a placeholder issue to brainstorm what changes we need to support committing multiple different assets that are not related (e.g. from different asset groups altogether, for example USD and EUR stablecoins) into the same Lightning Network channel.

Conceptually this should be pretty easy to understand: Each channel can hold different balances of assets. Each payment (or to be more precise each HTLC) shifts the balance of a single asset (or asset group).
The user interface also shouldn't need to change, as the user already specifies what asset ID (or asset group) an invoice should be created for or what asset should be used to make a payment.

There are a couple of technical changes required though.
This is a non-complete list that we'll want to extend as more things come to mind:

  • Channel allocation code (tapsend/allocation.go): Currently all assets are treated as fungible. The concept of distinct "classes" of assets needs to be introduced and implemented throughout that allocation code
  • RFQ system: balance checks in the different forwarding interceptors need to be updated to check for only the balances of the asset class mentioned in an HTLC. Example discussion: misc: fix litcli command docs, add group key support to DecodeAssetPayReq #1498 (comment)

In a first version one payment/invoice would only be able to send or request assets from a single class of assets in a channel. But it is conceivable that a payment could send or request multiple such assets at the same time. But whether that is an actually useful feature or how that would look like on the user interface is not addressed in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    🆕 New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions