From 4715e4437314584407338190357f9360cdbca52e Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Sat, 8 Jun 2024 22:58:59 +0200 Subject: [PATCH] README and TODO --- README.md | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index de8065b..11902ef 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,35 @@ -# Defi UI TODO +# Defi UI -TODO +Defi interface for Partisia Blockchain. -Demo for how to integrate PBC wallet into a web frontend or dApp. +## Design and TODO -## Requirements +Program Flow: -To be able to run the demo the following setup is required. +- State Overview (Read-only): + * [ ] Download list of swaps and tokens from Swap Router. + * [ ] Download token contract state to determine contract types and basic info. + * [ ] Download swap contract state to determine contract types. + * [ ] Construct swap graph. + * [ ] Continually download state of swap contracts, to ensure liquidity and pricing information is up to date. -- node.js version v.16.15.0 or newer. +- Logging in: + * [ ] User presses relevant login button. + * [ ] User address is used to determine token balances. -## How to run? +- 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. -First type check the Typescript using. +## Disclaimer and Legalese -```shell -npm ts -``` +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. -To run the example run - -```shell -npm install -npm start -``` - -and view the demo at localhost:8080 +The rest of the code is my own work, and is available using the MIT +license.