Skip to content

Add support for canonical source of truth for balance changes and payment success #589

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

Open
sappenin opened this issue Jan 27, 2025 · 0 comments

Comments

@sappenin
Copy link
Collaborator

There is a quirk in the XRPL where sometimes the delivered_amount on a validated payment transaction is different from what's actually delivered as part of a payment. This only happens when a payment amount is so small, and the balance of a recipient is so large, that the balance change of the recipient is simply rounded to zero. In this case, the sender "delivered 0.01" but the receiver "received 0.00"

In these cases, it can be useful to know where to look for the de-facto truth about a payment amount. Typically, we can look no further than delivered_amount, except in these very unlikely, very edge-cases, where we should actually be inspecting meta-data to see which balances were updated (as a final source of truth).

Our client libraries in js and py have a helper method to summarize balance changes from the metadata for situations including ones like this. We should explore those methods, and consider adding something similar to xrpl4j.

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