squeeth-monorepo icon indicating copy to clipboard operation
squeeth-monorepo copied to clipboard

Frontend for Opening a New Position with 1-Click-LP

Open nikkaroraa opened this issue 2 years ago • 2 comments

Task:

Frontend for Opening a New Position for Mint + LP. New LP page is at /new-lp slug

Description

This is the 1st part of 1-Click-LP project, which basically builds on top of ControllerHelper smart contract.

Loom video

The frontend lets the user input ETH amount. This amount then gets split out into ethInVault and ethInLP.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Document update

How Has This Been Tested

Couldn't test it on any network, neitherlocal nor Goerli, since ControllerHelper contract isn't ready to be deployed there. @DemolaJames is currently working on deploying it on Goerli.

So no other way but to compare it with the reference implementation in this PR. Compared the ETH deposit values and everything seems fine.

FE Checklist

  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [x] Added video recordings if it is a UI change

User Facing Checklist

  • [x] I fully understand the user problem this PR is solving
  • [x] I know who the target user is for this PR and have a deep understanding of that user
  • [x] I have tried this flow thinking from the pov of the target user for this PR
  • [ ] I (or working w someone on team) have scheduled a user test for this PR (if it is a large change)

nikkaroraa avatar Nov 05 '22 05:11 nikkaroraa

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
continuouscall ✅ Ready (Inspect) Visit Preview Nov 21, 2022 at 7:53PM (UTC)

vercel[bot] avatar Nov 05 '22 05:11 vercel[bot]

Here liquidation price doesn't update as I adjust collat ratio - is that out of scope for this PR and being added in a diff PR?

Also the default checkbox should uncheck itself if I adjust my collateralization ratio, and then if I re-check the box it should go back to the default ratio

Screen Shot 2022-11-10 at 11 14 40 PM

We should also have the default price ranges filled out to be full range

Screen Shot 2022-11-10 at 11 13 54 PM

Re: Liquidation price and Default checkbox should uncheck

It works as expected now.

Re: Default price ranges filled out to be full range

The max price for full range would be a really big number, wouldn't look good in the input IMO. Can we change "Default" label to "Use full range" instead? Would that be clear enough?

nikkaroraa avatar Nov 21 '22 13:11 nikkaroraa