Code Monkey home page Code Monkey logo

frontend's Introduction



mStable Frontend

This repository contains the latest frontend applications of mStable. It is a monorepo comprising multiple mStable apps, all built using common libraries and a common UI.

Apps

The following table lists the mStable apps included in this repository

Status Name Nx project Port Public hosts
Meta Vaults mstable 4200 Google Cloud
Long Term Support lts 4201 Google Cloud

Quickstart

To get started with this repository, run the following commands:

git clone https://github.com/mstable/frontend.git
cd frontend
yarn

If you encounter any issues during the installation process, please refer to the environment setup guide.

Running an app

yarn nx serve mstable
yarn nx serve lts

Building an app

yarn nx run build mstable
yarn nx run build lts

Developing

For detailed instructions and information on local development, please refer to the Developing Guide.

Contributing

If you would like to contribute to this repository, please refer to the Contributing Guide.

Subgraph

To learn more about our Meta Vault Subgraph, please refer to the Meta Vault Subgraph.

Contact us

If you have any questions or concerns, please join our Discord server.

frontend's People

Contributors

artsiomyavorski avatar calvinkei avatar d-ig avatar dependabot[bot] avatar dimlbc avatar dimsome avatar doncesarts avatar edsonayllon avatar rafaelugolini avatar toniocodo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

frontend's Issues

Create explore page

We want to present the list of metavaults that are supported by mStable. We need a page to present this list and allow user navigation between metavault detail pages.

Prerequisite

Polish the UI & Fix Bugs V1.1

About

Tracking polishing and bug items for V1.1

Items

  • Deposit Costs, $-Amount grayed out.
    Screen Shot 2022-10-05 at 17 36 16

  • After depositing/withdrawal, My position shows a Profit

  • If 0, still button is active

  • This looks like a question mark?
    Screen Shot 2022-10-04 at 19 17 04

  • Colors: Headlines, Green match
    Screen Shot 2022-10-05 at 17 43 41
    Screen Shot 2022-10-05 at 17 43 49

  • #70

  • Font color matches
    Screen Shot 2022-10-05 at 17 45 37
    Screen Shot 2022-10-05 at 17 45 43

  • Font color in fees matches
    Screen Shot 2022-10-05 at 17 47 51
    Screen Shot 2022-10-05 at 17 48 15

  • Is it possible to have the same line as in the mockups?
    Screen Shot 2022-10-05 at 17 48 45

Footer

  • Footer, hover background is inconsistent (medium is much bigger)

Legacy integration and SEO

We should reference V2 from legacy apps and improve visibility

Change yield to vaults in sub domain (final url tbd @dimsome @rafaelugolini )

  • Link to new app in a banner
  • Link from landing page to new app
  • Add SEO data and meta, verify crawler compliance

Model and integrate all meta infos around MetaVault

We need to centralize all informations around the MV in one convenient place. Ideally, this should be served by an api, but for now we can hardcode this in a file.

Informations can be found in notion (add link) and Figma

Image

Image

Polish last UI elements

Fully comply with latest Figma changes

  • Use scrollable background
  • Topnav
  • App menus and settings (network switch, dark mode switch, user settings,...)
  • Align notification messages
  • Improve Footer: replicate legacy app behavior
  • Improve loading states: disable operation inputs on tx loading - nice to have
  • Improve balance update visibility by adding color on update - nice to have
  • 2 items per line in Strategy

Prerequisite

  • Final Figma designs

Bug fixes and polishing V1.2

About

Tracking polishing and bug items for V1.2

Issues

Expand chart offers little value if the modal is smaller than the chart on the page (on big screens), should make it bigger or full screen? ❌ will be addressed in mobile support issue

APY remained high (above 420%) despite much more asset have been deposited ❌ this is expected as apy is streamed

Yield Calculator: Gas prices are very low (just 86 cents?) 🤔 the computation looks ok to me, we assume 100000 gas for each operation and the price is retrieved every 30s <- This is way too cheap, now it estimatews 26 cents for an operation. Also the % of gas impact is taken from the principle not from the earned amount. We need to revisit the yield calculator.

Treasury deposited 99,900 USDC + 100 USDC, balance shows 99,945.63 USDC, it this correct? should this show profit? ❌ duplicate with P/L and apy issues

  • Yield calculator, make a deposit max amount results in amount greater than balance (dust amount)
  • #101
  • My position box is refreshing and changing once wallet is connected
  • After opening app: Profit/Loss is equal to position value, does not update.
  • Yield calculator, connecting wallet closes box
  • Fix Meta Vault name
  • Add Meta Vault contracts as well (USDC MV and 3CRV MV)
  • Fix: Edit the assets, remove LUSD
  • Assets: Fix mUSD logo
  • Share price displaying as 1 Share = 0 USDC when despositing
  • Settings menu doesn’t hide if you click twice on the gear icon.
  • Fees: outdated numbers. Current fees are set to 16% liquidation and 4% performance
  • Network fetching error still happens :Error fetching prices Network Error
  • Deposit box: Balance gets cutoff if not enough space (should we find a better way to manage this on small screens?) => 2 decimals
  • Graph data cutoff: To mitigate huge spikes in the first weeks when the vault is illiquid
  • Change detail TVL to USD currency, add symbol
  • Buttons in modals (variant text for disconnect action, closing button to default color)
  • No data available to the same color than the vault primary
  • Explore page: swap APY and TVL
  • Utilise loading state: when clicking to go to a Meta Vault single page, TVL shows 0.0000001 for a second.
  • Withdrawal box: Asset/Shares are flipped. Shows burn shares but is USDC, Asset is on top
  • Vault Contract, replace Curve.fi MUSD/3Crv (musd3CRV) with https://etherscan.io/address/0x9614a4c61e45575b56c7e0251f63dcde797d93c5
  • ROI is always 0, is this correct?
  • Wtihdrawal: changing Shares will produce 10 times lower Asset value
  • Deposit: changing shares creates wrong value, e.g. 1.2286615e-11
  • Adjust Wallet icon in withdraw box
  • Adjust decimals in balance in withdraw/deposit box
  • Withdrawal box: clicking on MAX can result in Insufficient balance error
  • Yield Calculator: Gas impact calculation is strange: 40 USDC deposit, 4 USDC profit, gas impact 44%? while estimation shows 0.88 each

Improve graphics

  • use svg or css backround masks on gradient
  • fix some zindex issues
  • update Meta Vault wording

UI Kit

We need to make our Style system consistent with Figma, check reference designs here

  • colors
  • Typography
  • Icons
  • Buttons
  • Button Group
  • Input
  • Balance Label
  • Percentage Picker
  • NavBar
  • Tab
  • Checkbox
  • Switch
  • Radio Button
  • Toggle Button
  • Select
  • List
  • Divider
  • Chip
  • Alerts
  • Dialog
  • Tooltip
  • Accordion
  • Sliders
  • Progress Bar
  • Stepper
  • Text Field
  • Card

Footer revamp

Add Links to documentation or other Apps? ✅ solved by #150

  • Change Meta Vault by mStable to Yield App by mStable

Adjust UI for Share Price and ROI

About

Showing the APY in the frontend turned out to be a bad indicator of the Vaults actual performance. Change to Share price focus that accrues in value over time, Shareprice can go down, but it should increase in value over the long run.

Acceptance Criteria

  • Adjust Share Price Mockups
  • Adjust ROI
  • hand over mockups to frondend team

Revamp Meta Vault Page 1.2

image

  • Update background gradient based on primary color vault
  • Add Back Button
  • Replace vault asset Icon
  • Chart color based on primary color vault

Explore Page mobile support

Screenshot_20221114_160554

  • Fix background layout
  • Remove charts
  • Reorder layout for Featured MV
  • Fix Strategy chips are squashed on smaller screens
    image
    image
  • Vault card padding decreases to 16px
  • Vault card label font size decreases to 12px
  • Vault card font size for APY value to 18px
  • Vault card value for TVL and protocol icons to 16px

Revamp Explore page 1.2

image

  • Main card
  • Gradient text h1
  • move the gas and TVL to main card
  • making chart color transparent/solid on hover
  • placeholders for coming soon cards
  • increase icon size on vault card to match APY + vamue height => 48px

Improve Error handing

We should add Error Boundaries at several levels in the app to prevent crashes. We should also handle 404/Oops page better
image

Align on items in product team

About

This is to track which items need to be better aligned upon within the Product Team before progressing to FE-Tean

Design/Product Open Points

  • Header background to extend to the top (behind the nav bar.)
  • Header background to make the transition smoother
  • Should we consider swapping TVL and APY?
  • Is the change of TVL relevant?

Vault Performance

  • If we only show TVL and APY, should we use buttons rather than
  • Should we show the units? What does the TVL is based on?
  • Can we change to display day/month, or only display months.
  • Hover area, impossibly small, almost pixel perfect. What should be the behaviour?
  • Changing from APY to TVL, left side jumps
  • Fix APYTVL Dropdown (Hover Gray, Padding, rounded corners)

My position

  • What happens if I withdraw 100% of my position? (it should reset, given a dust amount is acceptable)
  • Position card: how does it look without a position?
  • Yield calculator: how yield calculator behaves when no position?
  • Is the box shown when there is no position?
  • History button background too faint, does not look like something clickable.
  • History empty when no action was performed, should say something "Nothing here yet, make your first deposit" With some graphics.
  • We have a lot of ways to close this box, cross, and button. Maybe too much?
  • Yield Calculator: Show range, or min, max withdraw costs (threshold?)
  • Wallet not connected: Values should be disabled-(color).
  • Font weight is wrong:

Deposit/Withdraw

  • Deposit/withdraw button -> says waiting for approval -> replace text for default waiting to sign transaction.
  • After Approval TX input disabled?
  • Current Gas: replace with basefee?
  • Add progress bar that shows when it dismisses itself.
  • TX-notification info change color? Is to similiar to color pallet, does not stick out enough
  • Deposit box: What should happen to the share price if wallet is not connected? Can we display it? - 🚧 needs deeper investigation
  • Button style when wallet not connected -> secondary button instead.
  • if > balance, show error message? Approve button is still active, does not show insufficient balance - 🚧 needs deeper investigation, what needs to happen in that case, Approve not allowed!
    Screen Shot 2022-10-05 at 17 42 46

Strategy & Risk

  • Fees: We are currently displaying "Liquidation Fee" and "Performance Fee" but the "Liquidation Fee" happens in the Basic Vault. What happens when we start using other strategies we don't control? Do we show their fees too? Also, for me(@rafaelugolini ), the performance fee should be on top. Maybe I'm biased because of all the diagrams the Meta Vault was on top.
  • Swap the fees.
  • Fees: the wording to define “performance fee” and “liquidation fee” is unclear. IMO we should only talk about one performance fee, specifying that it’s x% for liquidated rewards and y% for trading fees (and staking rewards when we have stETH). (from julian)
  • Should we close other accordions if another one is openened? Yes please :)
  • Line-height here is smaller than in other places, change font type.
    Screen Shot 2022-10-04 at 19 19 56

Other

  • Improve wrong network support, now it shows wrong network for all? Button style to be used that is defined.

  • Seems we have a lot of different font weights? (strategy card, My position (value))

  • Address links not like figma

  • Settings: Label is clickable.

  • Settings: should approve exact be standard? Change to set approval as infinite, default Yes.

  • Footer, Meta Vaults without the dash (-), Or replace with YIELD or VAULTS?

  • Should we link somewhere to our other apps?

  • We have a lot of different styles going on here
    Screen Shot 2022-10-04 at 19 11 05
    Screen Shot 2022-10-04 at 19 21 32

  • Increase icon size

  • Cannot really see this icon, is this an exclamation mark?
    Screen Shot 2022-10-04 at 19 15 54

  • Not sure what this history icon is, really tiny
    Screen Shot 2022-10-04 at 19 18 11

Bugs

Further Polish the UI & Fix Bugs

About

Tracking polishing and bug items for V1.1, second iteration. The previous issue was resolved, this is a new one that tracks adjustments that were discussed within the product team. Other might be new issues.

Items

Header

  • Swap TVL and APY
    Screenshot 2022-10-17 at 15 25 27
    Screenshot 2022-10-17 at 15 25 15

Vault Performance

  • Show TVL Units
    Screenshot 2022-10-17 at 15 28 32
    Screenshot 2022-10-17 at 15 30 27
  • change to display month abbreviation and day
    Screenshot 2022-10-17 at 15 33 05
    Screenshot 2022-10-17 at 15 35 08
  • Fix APYTVL Dropdown (Hover Gray, Padding, rounded corners)
    Screenshot 2022-10-17 at 15 36 28
    Screenshot 2022-10-17 at 15 38 30

My Position

  • What happens if I withdraw 100% of my position? (it should reset, given a dust amount is acceptable)
  • History empty when no action was performed, should say something "Nothing here yet, make your first deposit" With some graphics.
    Screenshot 2022-10-17 at 15 40 52
    Screenshot 2022-10-17 at 15 51 34
  • Yield Calculator: Show range, or min, max withdraw costs (threshold?)
  • Wallet not connected: Values should be disabled-(color).
    Screenshot 2022-10-17 at 15 52 31
    Screenshot 2022-10-17 at 15 52 53
  • Font weight is wrong:
    Screenshot 2022-10-17 at 15 53 31
    Screenshot 2022-10-17 at 15 53 39

Deposit/withdraw

  • Deposit/withdraw button -> says waiting for approval -> replace text for default to "sign transaction".
  • After Approval TX input disabled? Bug: Input is disabled after approval tx
  • Current Gas: replace with "Current Basefee"
  • Button style when wallet not connected -> secondary button instead.
    Screenshot 2022-10-17 at 15 55 29
    Screenshot 2022-10-17 at 15 55 43
  • if > balance, show error message? Approve button is still active, does not show insufficient balance - 🚧 needs deeper investigation, what needs to happen in that case, Approve not allowed!
  • Fix font color to black600
    Screenshot 2022-10-17 at 16 42 49

Strategy Risk

  • Swap the performance fees card.
    Screenshot 2022-10-17 at 15 57 53
    Screenshot 2022-10-17 at 15 58 12
  • Fees: the wording to define “performance fee” and “liquidation fee” is unclear. IMO we should only talk about one performance fee, specifying that it’s x% for liquidated rewards and y% for trading fees (and staking rewards when we have stETH). (from julian)
  • close other accordions if another one is openened
  • Line-height here is smaller than in other places, check if standard line height is applied.
    image

Other

  • Improve wrong network support modal, switch buttons to secondary and text button.
  • Seems we have a lot of different font weights?
    image
    Screenshot 2022-10-17 at 16 05 24
  • Address links not like figma, change style and make it shorter
    Screenshot 2022-10-17 at 16 06 05
    Screenshot 2022-10-17 at 16 06 21
  • Settings: should approve exact be standard? Change to set approval as infinite, default Yes.
  • Settings: Label is clickable.
    Screenshot 2022-10-17 at 16 08 35
  • Footer, Meta Vaults without the dash (-), Or replace with YIELD or VAULTS? (no actions for now)
  • Increase icon size by 2/4px
    image
    image
  • align left padding with header
    Screenshot 2022-10-17 at 16 10 11

Bugs

  • When withdrawing the Profil/Loss shows a change for a few seconds, then resets.
    Screen Shot 2022-10-19 at 15 09 44
  • The chart does not update after deposits/withdrawals
  • APY in graphs should show the %
    image
  • Graph should be able to display negative values
    image

Figma mockups for Mobile

About

Our new frontend should be responsive. To achieve the best result, we should define how the screen would behave with different break points.

Related Issue

#49

Acceptance Criteria

  • Breakpoints defined
  • Mockups ready

Revamp polish

Last iteration of revamp before general launch

explore page

  • gradient animation on hover Featured card, only Meta Vault word
  • update colors of Discover and subtitle
  • add border for protocols, ROI, asset/share box
  • Add ROI on the detail box
  • update share price in USDC
  • update chart scale to make the chart prettier

MV page

  • review detail box, add ROI, dividers
  • back button label to "Explore"
  • remove APY from graph values (double check with Dim)

Revamp Operation widget

Operation widget needs to follow latest mockups after usability feedback (fields order, gas fees estimates, approval process,...)

image

Publish subgraph for production

  • Update CI pipeline for automation
  • Update startBlock to consider all indexed data (filtering happens on the queries now)
  • Publish subgraph
  • Provision enough GRT
  • Update secrets and urls

MV page 1.3

General

  • verify target=_blank on external links

Deposit/Withdraw

  • Remove AVG on Recap - Current base fee
  • GWEI 2 decimals only
  • ETH price 2 significant decimals

History

  • Hide Yield Calculator Button

Graph

  • Asset per share adjust to Share Price
  • Remove APY chart
  • Add margins to the chart scales, avoid axis overlap

Strategy

  • adjust Divider visibility on fee charts

Meta Vault Page mobile support

image

  • Sticky bottom navbar with My Position and Operation
  • Review padding and cards order
  • Full screen modals and dialogs
  • Remove outlines from operational widget and yield calc modals
  • Create new variants for outline buttons and apply to "History"
  • Remove "Expand button" from Vault performance section

Prerequisites

Explore Page 1.3

  • Add Coming soon cards
  • Adjust “explore” text color
  • Left and Right margin on big screens, 4k adjust?
  • Meta Vault Tags: Explain them better? Remove Meta Vault or Diversified.

Polish the UI & Fix Bugs

About

Issue to keep track of bugs and adjustments needed to complete UI version 1.0

Bugs:

  • Clicking Withdraw when wallet it not connected results in a blank screen (error in console)
  • Clicking withdraw when wrong network is selected results in a blank screen (error in console)
  • On initial load, goes blank if wrong network is selected.
  • Changing network crashes the app
  • z index issue with settings box and deposit box icon flow
  • Application crashed after deposit:
    Screen Shot 2022-10-05 at 17 31 19

Adjustments

Vault Performance

  • Graph smoothness please reduce, shows a fall in graph just to smooth out
  • #69
  • Changing from APY to TVL, left side jumps - ❌ won't fix y axis is different

Strategy

  • Should the address be the link itself?

Screen Shot 2022-10-05 at 17 49 46
Screen Shot 2022-10-05 at 17 49 52

My position

  • Position value has no separator (,) but shares have.
    Screen Shot 2022-10-05 at 17 32 56

  • Deposit Costs, $-Amount grayed out.
    Screen Shot 2022-10-05 at 17 36 16

  • Font Weights/Green/Font matches xheck figma 600-900
    Screen Shot 2022-10-05 at 18 06 07
    Screen Shot 2022-10-05 at 18 06 17

Deposit/Withdraw

  • TX-Confirmation add space to top nav
  • TX-notification stays longer
  • Deposit/withdraw button -> says waiting for approval ❌ won't fix needs clearer message
  • After depositing/withdrawal, My position shows a Profit
  • If 0, still button is active
  • if > balance, show error message? Approve button is still active, does not show insufficient balance - 🚧 needs deeper investigation, what needs to happen in that case
    Screen Shot 2022-10-05 at 17 42 46
  • This looks like a question mark?
    Screen Shot 2022-10-04 at 19 17 04

Footer

  • Footer, hover background is inconsistent (medium is much bigger)

Lightmode

  • Colors: Headlines, Green match
    Screen Shot 2022-10-05 at 17 43 41
    Screen Shot 2022-10-05 at 17 43 49

  • #70
    Screen Shot 2022-10-05 at 17 44 56
    Screen Shot 2022-10-05 at 17 45 08

  • Font color matches
    Screen Shot 2022-10-05 at 17 45 37
    Screen Shot 2022-10-05 at 17 45 43

  • Font color in fees matches
    Screen Shot 2022-10-05 at 17 47 51
    Screen Shot 2022-10-05 at 17 48 15

  • Is it possible to have the same line as in the mockups?
    Screen Shot 2022-10-05 at 17 48 45

Darkmode

  • Darkmode, graph lines not visible at all
  • Darkmode: Graph gradient does not extent to bottom
  • Darkmode, gray not very visible - 🚧 needs deeper investigation

[Bug] Chart flickers when expanded and hovered

When clicking on the Expand button on the Vault performance widget, the Chart has a strange resizing flicker effect. This is probably fixable by constraining chart size.

Video_2022-10-28_094435.mp4

Yield calculator updates

After sync with product, we take those decisions for Meta Vault v1

  • use average gas amount for fee computation (find them here)
  • add tooltips next to gas checkboxes: Warn this is an average, it is subject to changes, prices are taken from today, blabla
  • add default values: fields APY and duration should have default values

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.