36 lines
1.4 KiB
Markdown
36 lines
1.4 KiB
Markdown
# Defi UI
|
|
|
|
Defi interface for Partisia Blockchain.
|
|
|
|
## Design and TODO
|
|
|
|
Program Flow:
|
|
|
|
- State Overview (Read-only):
|
|
* [X] Download list of swaps and tokens from Swap Router.
|
|
* [X] Download token contract state to determine contract types and basic info.
|
|
* [X] Download swap contract state to determine contract types.
|
|
* [X] Continually download state of swap contracts, to ensure liquidity and pricing information is up to date.
|
|
* [ ] Construct swap graph.
|
|
|
|
- Logging in:
|
|
* [ ] User presses relevant login button.
|
|
* [ ] User address is used to determine token balances.
|
|
|
|
- Trading (Write!):
|
|
* [ ] User selects tokens and amount to move between.
|
|
* [ ] Compute shortest route; dijkstra's. (Can use one, or several weight algorithms: Liquidity, price, etc.)
|
|
* [ ] Present route, fees, gas usage, etc.
|
|
* [ ] User presses TRADE!
|
|
* [ ] Sends transactions: _Approve to router_ and _route_ with the given route.
|
|
* [ ] While transaction is underway, keep user informed about status.
|
|
* [ ] Inform user of success or failure.
|
|
* [ ] Refresh token balances.
|
|
|
|
## Disclaimer and Legalese
|
|
|
|
This is a personal project of me, Jmaa, and has nothing to do with either Partisia or Partisia Blockchain Foundation, with the exception of certain open source code which has an explicit AGPL license.
|
|
|
|
The rest of the code is my own work, and is available using the MIT
|
|
license.
|