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

[Amm] "Swap" (exchange) from TL: different behaviour on AMM present #477

Closed
WietseWind opened this issue Feb 5, 2024 · 1 comment
Closed
Assignees

Comments

@WietseWind
Copy link
Member

Right now, if you tap Exchange on a TrustLine, we display slippage, check for books, slippage, etc.

If there's an AMM present for the given pair, when staying under the AMM depth, this is irrelevant: the AMM will be consumed.

So if on a network with AMM activated, when loading the slippage and books, we should check the entered From amount and check if there's an AMM for that pair, and respect that.

  1. Check if there's an AMM for the pair: https://xrpl.org/amm_info.html
  2. Gather the values in the response https://rqqjncs.dlvr.cloud/pasted_1.png
  3. Take the user entered amount, up to the AMM present amounts, ignore all book and slippage checks and warnings - show "Obtaining liquidity from AMM pool"
  4. If the user enters an amount ABOVE the AMM present amounts, enable book and slippage checks, but only for the amount that EXCEEDS the AMM present amount, show: "Obtaining liquidity up to XXXXX from AMM pool, using DEX: {existing slippage, etc. panel}"
@WietseWind
Copy link
Member Author

Superseded by #493

@N3TC4T N3TC4T added this to Xaman App May 10, 2024
@N3TC4T N3TC4T moved this to 3.0 - Backlog in Xaman App May 10, 2024
@github-project-automation github-project-automation bot moved this to 3.0 - Backlog in XUMM 2.2-2.X Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 3.0 - Backlog
Status: Backlog
Development

No branches or pull requests

2 participants