opynfinance / squeeth-monorepo

Squeeth is a new financial primitive in DeFi that gives traders exposure to ETH²
https://squeeth.com/
201 stars 70 forks source link

Pnl bands #947

Open KMKoushik opened 1 year ago

KMKoushik commented 1 year ago

Task:

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes ENG-1362

Type of change

vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated
continuouscall ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 5, 2023 at 11:43PM (UTC)
linear[bot] commented 1 year ago
ENG-1362 Update PnL Bands to include deposit date to take into account different bands for new users, users depositing after last hedge, and existing users

[Screen Shot 2023-01-13 at 4.01.22 PM.png](https://uploads.linear.app/cc6422d3-c24c-4e86-87fa-b522b36825bc/2dedea52-3bb5-4b0b-9ce2-068e24bb8ad0/7c9b432c-fbcb-47f0-bd24-2b1c3748c3e2) [Screen Shot 2023-01-13 at 4.05.18 PM.png](https://uploads.linear.app/cc6422d3-c24c-4e86-87fa-b522b36825bc/9f22d5e6-9cc8-4712-84b6-142470c3c7cc/c49faa4a-0327-49b3-89e5-2b8d9b49f967) Qs from the chat: 1. Is deposit date/time going to be the timestamp of the latest deposit or the first one? 1. Once a user is in the strategy they all have the same bands, so for an existing user who has multiple deposits into the strategy, we can show the latest deposit timestamp but the bands will be the same for their whole position if wallet connected 2. For a user who is already in the strategy and deposited after the last hedge, we should show the worse timestamp + bands if wallet connected 2. For the exact math and formulas, generally the bands should be wider for a new user but have the same center as the existing, and can ask Andrew + Joe on the exact math Figma: [Date Picker - Switch Order - Crabby testin (Figma)](https://www.figma.com/file/3huyp0RyUiyS7D02vWSVnd/Crabby-testin?node-id=1665%3A11619&t=swkzI8V0tlrl4vWu-1)

alexisgauba commented 1 year ago

We should do this for bull as well! Just noticed its not done there yet - can be finalized for crab first and then copy / pasted over, but imo we shld launch with both

alexisgauba commented 1 year ago

Also for users already in the strategy, the deposit date should be the date they deposited when their wallet is connected. This account has a test position but its showing today's date not deposit date

Screen Shot 2023-01-27 at 5 14 44 PM
alexisgauba commented 1 year ago

Looks like the tooltip is still doin dis weird thing, maybe we want the tooltip above the background stuffs?

Screen Shot 2023-02-02 at 9 28 15 PM