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

Optimistic stablesats balance check can block legitimate sends #3173

Open
vindard opened this issue Apr 15, 2024 · 0 comments
Open

Optimistic stablesats balance check can block legitimate sends #3173

vindard opened this issue Apr 15, 2024 · 0 comments

Comments

@vindard
Copy link
Contributor

vindard commented Apr 15, 2024

Describe the bug
When paying a lightning invoice using USD (stablesats) wallet, we currently use the display-price-converted amount against the sats in the invoice to check whether there is enough balance to send before deciding if to execute a backend call. This can often be wrong for 2 reasons:

  • the rates stablesats use internally come from derivatives exchanges and can vary significantly enough from spot price to wrongly block a send
  • for intraledger stablesats-to-stablesats transactions the sats-denominated invoice is irrelevant since we discard that quote and settle the transaction in usd-only amounts internally

Expected behavior
The send attempt should be sent through to the backend and any balance checks will be executed there and communicated back up to the up via graphql error messages/codes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant