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

rfq+tapchannel: track locally accepted quotes in manager #928

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

guggero
Copy link
Member

@guggero guggero commented Jun 6, 2024

To allow direct peer (zero-hop) payments, we also need to be able to look up quotes we've accepted that our peer requested. The example flow here is: Dave creates an invoice (either specifying a BTC amount or asset amount, in any case the invoice is always denominated in milli-satoshi), Charlie has a direct channel with Dave and wants to pay the invoice with assets. Charlie only sees the milli-satoshi amount of the invoice and needs to find out how many asset units to send. For that, Charlie asks Dave for a quote over the given amount of milli-satoshi, gets an asset unit amount back. Charlie then creates an HTLC referencing that asset sell quote RFQ ID. But the invoice interceptor on Dave's side would previously not recognize that RFQ ID, because it's not an ID for a quote Dave requested but one Dave accepted.

To allow direct peer (zero-hop) payments, we also need to be able to
look up quotes we've accepted that our peer requested.
The example flow here is: Dave creates an invoice (either specifying a
BTC amount or asset amount, in any case the invoice is always
denominated in milli-satoshi), Charlie has a direct channel with Dave
and wants to pay the invoice with assets. Charlie only sees the
milli-satoshi amount of the invoice and needs to find out how many asset
units to send. For that, Charlie asks Dave for a quote over the given
amount of milli-satoshi, gets an asset unit amount back.
Charlie then creates an HTLC referencing that asset sell quote RFQ ID.
But the invoice interceptor on Dave's side would previously not
recognize that RFQ ID, because it's not an ID for a quote Dave requested
but one Dave accepted.
@guggero guggero requested review from ffranr and GeorgeTsagk June 6, 2024 07:47
@dstadulis dstadulis added this to the v0.4 milestone Jun 6, 2024
Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean ❇️

Could add some simple coverage post rc

@guggero guggero added this pull request to the merge queue Jun 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 6, 2024
@guggero guggero added this pull request to the merge queue Jun 6, 2024
Merged via the queue into main with commit c0892ce Jun 6, 2024
14 checks passed
@guggero guggero deleted the rfq-local-quotes branch June 6, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants