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

[bug]: AuxTrafficShaper.PaymentBandwidth should check quote against the asset ID and peer #1374

Open
GeorgeTsagk opened this issue Feb 11, 2025 · 0 comments
Assignees
Labels
bug Something isn't working rfq tap-channels

Comments

@GeorgeTsagk
Copy link
Member

Description

Currently, when dispatching an asset payment over tapd we acquire a quote and provide it as a "hint" to the lnd call SendPaymentV2 via the first hop custom records field.

This field is later on used by LND to query channel bandwidth by calling the PaymentBandwidth tapd hook where the htlcBlob containing the previous quote is provided.

At this point any asset channel will try to provide their bandwidth as they can calculate it locally (i.e external to lnd). During that calculation, bandwidth is produced based on the asset units available and the provided quote in the htlcBlob, which is also looked up locally.

Problem

An asset channel may proceed with the bandwidth calculation based on a quote that is not meant for that asset ID. If selected by LND, it will then produce wrong htlc records, causing the payment to fail because of strict forwarding on the rfq peer's side.

Solution

The AuxTrafficShaper.PaymentBandwidth hook should make sure that the quote corresponds to the asset IDs present in the channel, plus verify that the rfq peer is the channel peer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rfq tap-channels
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant