1
0
Go to file
2024-06-09 01:10:14 +02:00
src/main Basic state loading 2024-06-09 01:09:54 +02:00
.gitignore Basic UI on example web client 2024-06-08 15:41:36 +02:00
package.json Basic UI on example web client 2024-06-08 15:41:36 +02:00
README.md Updated README 2024-06-09 01:10:14 +02:00
tsconfig.json Basic UI on example web client 2024-06-08 15:41:36 +02:00
webpack.config.js WIP swap 2024-06-08 16:12:57 +02:00

Defi UI

Defi interface for Partisia Blockchain.

Design and TODO

Program Flow:

  • 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.
    • 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.