-
Notifications
You must be signed in to change notification settings - Fork 302
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
Path payment api is awkward for general currency conversion #243
Comments
Transferring to |
CAP-24 proposes a new kind of path payment that takes a fixed amount to send and maximizes the amount of destination asset received (the mirror of existing path payment). It addresses this issue, and it ensures that the full send amount that the caller requires is consumed. |
@morleyzhi I just wanted to check that you think the CAP-24 solution meets Vega's needs. To summarize the new path payment's semantics:
Let me know if that sounds good! |
Implemented in stellar/stellar-core#2269 |
The existing API of
recipient address
,sender address
,recipient asset
, andrecipient amount
works very well when seeking paths that ensure a specified payment will be received at the end. However, we're trying to provide a UI for converting asset A into asset B as part of our SEP-6 withdrawal flow, and this API isn't a good fit for the use case. We're constrained by:This seems to me like a common alternative to a path payment—a path conversion if you will, analogous to changing all the cash in your wallet when you arrive in a new country. The UI we imagine is a list of all (e.g.) BTC tokens you hold and how much you'd receive from a SEP-6 anchor after converting them.
It seems like we should be able to work around this without any changes, but I wanted to surface it as a pain point we encountered.
The text was updated successfully, but these errors were encountered: