Open WietseWind opened 6 months ago
Just a small suggestion, please allow setting a default ‘swap provider’ so the end-user does that have to look through the list every time to find his/her/its favourite.
Just a small suggestion, please allow setting a default ‘swap provider’ so the end-user does that have to look through the list every time to find his/her/its favourite.
We considered this, but for the sake of allowing people to try and discover other options, and for the sake of giving the entire ecosystem a shot, I think muscle memory will take people to the button for their fav. platform, while being reminded every time that other options exist (and who knows, they might try others as well).
Just a small suggestion, please allow setting a default ‘swap provider’ so the end-user does that have to look through the list every time to find his/her/its favourite.
We considered this, but for the sake of allowing people to try and discover other options, and for the sake of giving the entire ecosystem a shot, I think muscle memory will take people to the button for their fav. platform, while being reminded every time that other options exist (and who knows, they might try others as well).
Fair enough, I do think there are other ways to give people options. The top-left of an xApp (logo+name) could open like a list of similar apps based on category or something. For a swap it could show the others? I’m just a lazy IT guy, less clicks is always better 😅.
Questions from DeXfi:
- The OTT data suggests that it will only be exchanged for XRP and no other tokens, right?
- Can the data also be found in the URL or only in the xApp context?
- Just a warning if one of the slippages is not met, or also restrict the swap?
- slippage_tolerance_pct_2way gives the total slippage for both trades, not just the reverse trade?
Answers:
Context
With the launch of AMM on the XRPL, the available liquidity & consequences of a proposed swap, for any specific pair isn't s straight forward anymore: before AMM we could simply read an order book, take book depth & spread into account, and calculate a likely outcome of a proposed trade (swap).
Current situation / problem
Right now, the order book only paints part of the picture: the potential available liquidity in AMM pools could allow for less slippage, better quotes, etc.
In Xaman, when tapping a Trust Line, one can tap the "Exchange" button, after which an XRP-{selected asset} 'instant swap' can be signed. It shows a possible quote, slippage limits, and allows for a one review - one slide swap.
After the launch of AMM we put a refactor on our backlog (#477) - which has now been closed. The initial idea was we would replace our order book interpreting for pathfinding, to get quotes taking into account auto bridging and AMM pools, but while discussing this backlog item, we came up with a better solution.
Vision
At XRPL Labs, with Xaman, we have aimed from the start to build an 'open platform' for developers and end users to interact. We do the security & signing, trusted Devs & users can interact securely. This way, we're a platform for devs, and have a much more complete offering to end users (we're stronger together).
Solution (decision)
We decided we're going to do the same we did when XLS20 launched: we offer a simple "xApp launchpad" for the "Swap" functionality, so ecosystem devs can get users straight into their Swap implementation. For end users, the flow will be:
Requirements
For a Swap implementation to be eligible for inclusion in the Swap list opened by Xaman, the following requirements have been identified (this list may be expanded!)
Obviously, regular xApp requirements apply.
Identified potential platforms
Platforms that came to mind, others out there: open invitation to reach out & ask/participate!
PLEASE REACH OUT FIRST, then build. Just to make sure we're aligned & questions are answered in advanced.
Reward
Technical
The xApp OTT data (example below truncated to show only the relevant pieces for this integration) that will be provided will look like: