strkfarm / starkfarm-client

https://www.strkfarm.xyz/
GNU Affero General Public License v3.0
17 stars 28 forks source link

feature: Harvest timer #81

Closed web3Gurung closed 3 weeks ago

web3Gurung commented 2 months ago

Is your feature request related to a problem? Please describe. As a user, I'm not sure when would STRKFarm harvest rewards.

Describe the solution you'd like A timer field box in the particular strategy page, since each strategy can have different harvest period.

Describe alternatives you've considered Instead of the timer, we can have a text box saying the "Next harvest: 12 PM UTC on 29 Dec, 2024." (Just an example)

Iwueseiter commented 2 months ago

Hi @web3Gurung can I work on this?

akiraonstarknet commented 2 months ago

hey @Iwueseiter, let us prepare a UI component for this and then it will be assigned to devs

Iwueseiter commented 2 months ago

@akiraonstarknet alright

josephchimebuka commented 2 months ago

@akiraonstarknet when the UI components are prepared Can I work on this?

kiyoshizk commented 2 months ago

I want to come with a design idea

akiraonstarknet commented 2 months ago

@kiyoshizk, here's some inputs for strategy page timer:

  1. The timer has to be minimal and yet intuitive to convey user that they position will increase in value in that time or rewards will be harvested in that time (that time is time remaining)
  2. In case timer is complete and yet rewards have not been harvested (which can happen due to some human delays by some hours), we need to convey some text like Anytime now or Anytime soon or something like that. Your choice.
  3. Extra (optional): The ui can also probably show things like total rewards harvested & number of times harvested.
akiraonstarknet commented 2 months ago

@Iwueseiter @josephchimebuka are you still interest to work on this?

This is the UI to develop in strategy page: https://www.figma.com/design/aRQ6kg5LBUb4jMgcM9Ybff/Strkfarm-assets?node-id=1-11&t=eZJVCLY98dMHoQcz-1

Business logic:

  1. Harvesting is scheduled to happen by every Saturday EOD (UTC)
  2. An API will be shared with you that will give info on number of harvests, total $ harvest amount, and when last harvest happened. (Plz continue on design work, API will be provided later this week)
  3. If by any chance, harvesting is delayed (i.e. time has crossed saturday EOD UTC but no harvest), u will have to set all numbers in timer 0 and write Anytime soon. As shown in time-exceeded frame in design.
Iwueseiter commented 2 months ago

Yes @akiraonstarknet i am interested.

akiraonstarknet commented 2 months ago

@Iwueseiter can u give me timeline and plan of approach?

Iwueseiter commented 2 months ago

Once the API is provided, I will integrate it into the application to retrieve the needed data and store in the database. I will compare the the timestamp of the harvest to determine if harvest is delayed. I will write a logic for the following: If harvesting is on time, it will display the number of harvests and the total harvest amount as retrieved from the API. If harvesting is delayed, I will reset the numbers in the timer to 0. Then update the display to show “Anytime soon” in place of the timer. I will make sure all of the logic is working as expected. It will be done within a time frame of 3 to 5 working days.

Iwueseiter commented 2 months ago

Hi @akiraonstarknet should I start working on this?

Iwueseiter commented 1 month ago

Hi @akiraonstarknet I will create a PR by close of work tomorrow.