Giter Site home page Giter Site logo

inverse-web's People

Contributors

liamellul avatar nourharidy avatar slokh avatar webmass avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

inverse-web's Issues

Add executable badge to Proposal creation page

Right now, there's no way for proposers to tell whether the proposal they're writing will be executable if it passes a vote.
We should add a badge somewhere in the proposer UI to tell them whether their current actions will be executable or not.

To implement this, we need to create a new API endpoint to simulate actions. On each change to the actions list, the UI would pass current actions to the endpoint which would:

  • create a random key pair
  • use ganache to fork the mainnet locally using an AlchemyAPI endpoint
  • impersonate the treasury address and simulate minting 4000 INV to the new address
  • simulate a proposal being submitted by the new address with the provided data
  • simulate voting in favor the submitted proposal by the new address
  • fast forward in time and simulate queuing the proposal for execution
  • fast forward in time and simulate executing the proposal

If the final step fails, the endpoint should return to the UI that the proposal is not executable, and vice-versa.

To avoid excessive load on the endpoint, there are 2 options:

  • display the executable badge on the proposal preview page, or
  • debounce the call to the endpoint in order to avoid sending calls on each character change

Something to consider is to also prevent the proposer from submitting proposals that are not executable.

Eth market: add Repay all support

  • Write & Deploy a new contract that acts as proxy to add repay all support in the Eth market
  • Implement new contract in frontend for this perticular market

Gnosis: custom UI

Gnosis Safe does not have a good UX/UI, sending compensations for example could be much simpler and user-friendly

Support GovernorMills

New delegation workflow with MultiDelegator contract and missing features from old site

  • Implement delegation personal links
  • Signing workflow
  • Submit signatures workflow
  • Implement self-delegation using the MultiDelegator contract
  • Display proposal history from both the new GovernorMills and the old GovernorAlpha contracts
  • Add propose page (only accessible if total inv+xinv voting power of the user is >= 1K). See old page and source for inspiration

Feature: Interest curves & monthly INV rewards

Fuse-like chart/metrics for interest curves for a specific asset :
https://docs.cream.finance/lending/interest-rate-model

  • Get formula and calculate interest rates data to show in chart
  • Implement chart component for interest curves
  • Implement component with chart and some metrics
  • Show component in a modal and or in a dashboard section / page

Monthly INV rewards :

  • Calculate monthly INV rewards for each pool in the api
  • Show rate in a tooltip or directly in the table
  • Total interest +/-

Proposal Creation: ux/ui improvements & templates

  1. Improve the existing "advanced mode" :
  • Autocomplete selector with list of known contracts (Comptroller, DAI, DOLA, existing anchorMarkets etc)
  • Fetch contract Abi with Etherscan Api
  • Autocomplete selector with list of the contract's "write" functions from the fetched abi
  • Duplicate action
  • Smart function argument types handling (if address type => use autocomplete with list, etc)
  • Preview/Recap Mode before submitting
  1. Add "templates" for "standard" actions that will be done frequently, those templates won't require the user to know which function to call and how to convert token units to uint etc

Proxy Bond Contract

Create a proxy bond contract to have a better protection against front-running bots ?

Refactor inverse-web config

We should refactor our configs to allow for easy switching between testnet and mainnet based on the user wallet, as well as in order to support future chains in the future.

  • Merge 2 config folders into 1 at the root directory
  • networks.tsx: export a function instead of an object. Takes a chainId argument and returns the appropriate config object (currently only chainId 1 for mainnet and 4 for rinkeby should be supported)
  • if user's network is not supported, a closable modal should ask the user to switch to a supported network
  • serverless functions should receive an optional chainId param from client to specify network. If chainId is not specified, it defaults to 1 (mainnet)
  • cron jobs should run for all supported networks. Redis db documents for non-mainnet networks should be prefixed with the chainId
  • add INV and DOLA faucet buttons on Rinkeby
  • Remove Stake page and its config data
  • Add a network name badge to the navbar. Badge hex color should be specified in the network's config

Visual Feedbacks for transactions

  • Create a notification / toast system
  • Button should be disabled when Tx is pending
  • Button should should show a small loader inside when Tx is pending
  • Show notifications and the visual feedbacks mentioned above everywhere relevant
  • Customisable design with animations

xINV migration

  • Add mintable property to Market type
  • Only show mintable assets under Supply. Existing supplied assets should continue to show under Your supplied assets section. Check borrowable implementation for reference
  • Only Withdraw tab should be available for assets that are not mintable under Your supplied assets. Check borrowable implementation for reference
  • xINV v1 should show under Your supplied assets if supplied balance is 0 BUT user has a positive escrowed withdrawal. Same for xINV v2 in case it becomes non-mintable in the future.
  • Add xINV v2 market 0x1637e4e9941D55703a7A5E7807d6aDA3f7DCD61B with 10-day escrow delay messages and withdrawal confirmation button
  • Remove withdrawal delay messages from xINV v1 but keep confirm withdrawal button for existing escrowed withdrawals
  • Show migration message for users who have a positive xINV v1 balance only

Add repay all button

Currently, when a user repays the maximum possible amount, additional interest is accrued while their transaction is pending, leaving a small amount of dust as debt.

Similar to https://old.inverse.finance/banking, we need an optional Repay All button to be added to the repay modal of all borrowable markets except ETH (Feature is not supported by the ETH market contract)

In order to instruct a market contract to repay all debt, we need to set the repay amount to Solidity's max uint256 value, which will be then changed by the contract to be the user's all outstanding debt within that market

For reference, please check https://github.com/InverseFinance/inverse-frontend/blob/4d95a41de0952989549a99b6d07b98f17943e82f/src/store/index.js#L809

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.