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]: Custom HTLC settlement on LND to compensate anchor sats amount #1305

Open
GeorgeTsagk opened this issue Jan 16, 2025 · 0 comments

Comments

@GeorgeTsagk
Copy link
Member

Description

Currently every tap channel payment carries the default onchain anchor amt which is about 354 sats.

This may cause UX trouble when users pay small invoices, or generally in cases where the value of 354 sats weighs too much.

We want to somehow make LND's lightningChannel state machine to eliminate this one-sided balance change in satoshis.

Solution

We could modify the way HTLCs are settled in LND, so that satoshis are never shifted upon settling an HTLC, but the custom aux blobs of the commitment tx of the channel do get updated. This would allow for the asset balance change to be reflected on the channel, without shifting the satoshi balance at all. There would only be a locked/in-flight amount of satoshis as long as the HTLC itself is in-flight, but as soon as the HTLC gets settled the settlement logic would return the sats to the sender and only really accept the assets.

Considerations

  • We should find a correct way of filtering which HTLCs should be treated this way (aux blob existence?), as we want to avoid accidentally returning larger amounts of satoshis carried by an HTLC. (example: HTLC carrying 1btc + 1M$)
  • We should keep in mind that even though there's no balance change in terms of sats, the sats of the in-flight HTLCs are exposed to malicious grabbing by the receiver (via the force close path / revealing HTLCs onchain). We should only allow small sats amounts for such HTLCs to disincentivize such behavior.

Related Issues

#888

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant