seamless-protocol / seamless-interface

https://seamless-interface.vercel.app
Other
7 stars 4 forks source link

Total Claimable Rewards + Historically Claimed Rewards + Total Rewards (by token) [My Dashboard] #433

Open rcqiao opened 2 months ago

rcqiao commented 2 months ago

Name of feature/metric: Total Claimable Rewards + Historically Claimed Rewards + Total Rewards (by token)

Description of feature/metric: Per Reward Token (for example, SEAM, esSEAM, BRETT, USDC), the following metrics: (a) the current amount of claimable tokens (in the token # and in USD value) (b) the past amount of the token ever claimed (in both the token # and USD value) (c) the total reward token accrued (in both the token # and USD value) --> this is equal to the historical rewards in (b) + currently claimable rewards in (a)

Shown on the my dashboard page

Questions/considerations: N/A

Picture from design (if available): The following example shows how it would appear for SEAM rewards being claimed Image Image

Estimated Timeline:

Requirements/Data Sources: Complex Dune query should be enough for this if we can get historic price of all reward tokens. If we want to show with current price then it is easier. Also we can maybe show only token amounts not dollar value for MVP until we decide what to do. This Dune query will be run on user level but should not be that expensive in term of credits.

If we decide to go with historic reward token price then Dune query will get more expensive. This can not be done on Subgraph because we don't have prices of this tokens on Oracle contract and we can not send http request inside subgraph handler.

kitanovicd commented 1 month ago

For claimed so far section: Should USD value be calculated with current price of reward token or with price in the moment of claiming?

rcqiao commented 1 month ago

please look at both, current price AND historical price and try to determine effort level difference of the two approaches

kitanovicd commented 1 month ago

We should get this from Subgraph. We can show token amount or token amounts converted into dollar value using current price of reward token. Regarding "Claimable" section we can get this from SC without any problems.