Description
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.
Metadata
Assignees
Labels
Type
Projects
Status
🆕 New
Activity