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]: DecodeAssetPayReq: add option to determine asset amount based on RFQ and the edge node's buy rate #1368

Open
ZZiigguurraatt opened this issue Feb 11, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@ZZiigguurraatt
Copy link

DecodeAssetPayReq seems to decode the invoice, determines the sats amount, and then queries a nodes price oracle for their sell price to determine an asset amount that the invoice is representative of.

I'd like to see an option to also perform an RFQ with a peer to get the actual amount that would need to be sent to pay the invoice given the peer's buy price. This seems more representative of what the sender is going to actually need to send (less normal LN routing fees for sats channels).

I'd like to see the existing asset_amount that is returned kept but add this new information in another property such as asset_amount_RFQ. With this information, we can then compute the "implied fee" explained in #1367 in advance before attempting to make a payment.

@Roasbeef
Copy link
Member

Note that there's no "true" RFQ amount. Let's say there's 20 peers we're connected to, and we do RFQ with each of them, which response do we show for decode pay req?

It's also important to note that as is, DecodePayReq is effectively a pure RPC, there's no state mutated, we just decode then query a price. Your suggested change would actually place a standing order, that may never actually be consumed. If a service is just doing decoding, these records (though they expire) start to build up.

@ZZiigguurraatt
Copy link
Author

What are the drawbacks of having open RFQ records start to build? What is the drawback of a standing order that may never be consumed? I feel like #1358 and #1359 are going to produce the same kind of bloat.

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

No branches or pull requests

2 participants