Skip to content

Conversation

@guggero
Copy link
Contributor

@guggero guggero commented Oct 23, 2024

Depends on #848.

This commit adds a fully configurable RPC oracle that can serve asset rates that differ for buy and sell.
We then add a test that shows and asserts proper asset conversion to satoshis and back.

This commit adds a fully configurable RPC oracle that can serve asset
rates that differ for buy and sell.
We then add a test that shows and asserts proper asset conversion to
satoshis and back.
@guggero guggero requested a review from ffranr October 28, 2024 10:39
Copy link

@jharveyb jharveyb left a comment

Choose a reason for hiding this comment

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

LGTM! Took me a sec to be convinced that the rates are being used correctly but the comments are very thorough.

var id asset.ID
copy(id[:], assetID)

// Let's assume the current USD price for 1 BTC is 66,548.40. We'll take

Choose a reason for hiding this comment

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

Great explainers!

//
// Example use case:
//
// Alice is trying to pay an invoice by spending an asset. Alice therefore

Choose a reason for hiding this comment

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

💯

@guggero guggero merged commit a533a9f into update-to-lnd-18-4 Oct 30, 2024
12 of 13 checks passed
@guggero guggero deleted the rfq-oracle-itest branch October 30, 2024 08:36
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.

5 participants