Pool Swap Menu Flow #24
Labels
No Label
ussd/user-reported
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: grassrootseconomics/sarafu-vise#24
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We came up with a simple sketch on how the menu will look like with the introduction of the pool swap .We anticipate that the flow will be as here:
https://app.eraser.io/workspace/E8YvxTTqLze700xUSez3
Suggestions and any improvements before implementation will be appreciated.
1. Select pool menu
User should be able to select a pool from a list or enter the pool symbol manually. The list will be provided by an API. An additional endpoint will be provided to fetch a pool's details given its symbol.
2. Select voucher symbol to swap FROM
User should be able to choose the voucher symbol to swap from from a list. The list will be provided by an API. Generally they won't need to enter the voucher symbol because we will check it against their current holdings and populate the list accordingly.
3. Select voucher symbol to swap TO
User should be able to choose the voucher symbol to swap from from a list. The list will be provided by an API endpoint. Priority is given to popular stable coins available.
4.
Display voucher swap limitsDisplay the max FROM tokenEnsure that the limits have the symbol suffixed. e.g. Max 10 SRF, Min 1 SRF. The limits will be provided by an API endpoint.4. Swap preview
Display the swap preview and estimates. This will be provided by an API endpoint.
5. Execute swap
Send a request to the custodial system.
Example:
1
This endpoint lists the top pools to display as a list
If a user inputs a custom pool symbol:
2
This endpoint automatically finds out all the possible tokens a user can select to swap from. Note that this endpoint can take up to 3 seconds to completely resolve due to the nature of checking against the voucher registry and comparing user holdings since these values need to be checked on chain.
3
This endpoint returns the list of possible vouchers to swap to. Since this list could almost always contain all possible vouchers in the pool, it temporarily only displays stable coins available in the pool since that is the most common out token.
4
This endpoint returns the max FROM token only. This is sufficient to determine whether to proceed to the next step or not and follows a similar UX to sarafu.network. It is important to check if max/tokenDecimals > 0.1 for UX purposes and to prevent swapping of dust values.
5
Refer to
eth-custodial
docs.