status-mobile icon indicating copy to clipboard operation
status-mobile copied to clipboard

👁️📈 Show 1 year gains on portfolio on the wallet page

Open shivekkhurana opened this issue 1 year ago • 3 comments
trafficstars

User Story

As a user, I want to know how much my portfolio grew (or shrunk) in value over the span of past 1 year, So I have an estimate of how my investments are performing

Description

The app has access to historical price of a token, and the historical holdings of a user. We can use this information to compute the annual portfolio gain.

Figma Design Link: https://www.figma.com/design/xLs1KYmF4e6WwRTZVJKeUK/Wallet?node-id=16641-94412&m=dev

Acceptance Criteria

  • [ ] The wallet account page should show the gain/loss % if the balance is greater than 0
  • [ ] If there is loss, it should be red as per the design (ex: Left a note for Alisher to point to a loss case design )
  • [ ] If it's a gain, it should be green as per the design (ex: https://www.figma.com/design/xLs1KYmF4e6WwRTZVJKeUK/Wallet?node-id=16641-94414&m=dev)
  • [ ] The gain should be computed only for 1 year
    • [ ] If the age of account is less than one year, then assume it's one year
    • [ ] If the age of account is greater than oner year, then ignore data older than one year

Notes

  • The historical data already exists and is exposed on desktop
  • Link to Discord conversation for added context: https://discord.com/channels/1210237582470807632/1274068685266489434/1297850357292204093

shivekkhurana avatar Oct 22 '24 11:10 shivekkhurana