-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pnl bands #947
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 Screen Shot 2023-01-13 at 4.05.18 PM.png Qs from the chat:
Figma: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Some comments:
- we should also show deposit selector when wallet connected show user knows what date the chart is referring to and also has the ability to play around even when connected
- we should align deposit date with top of graph
- there should be more space between deposit date & next hedge in
-
realize it looks a bit weird that they are diff fonts, maybe same font size of deposit date and next hedge in, could make next hedge in smaller (same size as the deposit date numbers) and that could help with the alignment as well
-
Looks like graph not updating for dates before the hedge vs. after the hedge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Looks like a weird UI thing here
- Looks like a loading thing where for a historical date the bands get wider and then thinner - initially it was actually only giving me those wider bands but eventually it started loading the thinner ones
Screen.Recording.2023-01-26.at.11.03.19.AM.mov
- Prob worth checking with @aleone to make sure calcs all good
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 |
const increment = new BigNumber(0.05) | ||
const ending = new BigNumber(percentRange) | ||
|
||
const ethRate = Math.exp(ethSupplyApy / (365 / time)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling this rate is a bit confusing, maybe ethFutureValue to be specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with usdRate
} | ||
} | ||
|
||
export const getBullProfitDataPoints = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should have some naming so it's clear that this is bull excess profit rather than bull total profit. getBullExcessProfitDataPoints() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bounds lgtm. Couple of suggestions for naming to make a bit clearer.
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