Giveth / GIVeconomy

The Giveth Economy is the collective of projects, donors, builders, and community members builders that build the future of giving
GNU General Public License v3.0
6 stars 0 forks source link

Instant Boost #868

Closed GriffGreen closed 1 year ago

GriffGreen commented 1 year ago
Screen Shot 2023-02-10 at 11 56 22 PM

Given the situation in turkey... it would be awesome if GIV holders could impact the rankings in real time....

Would love to prioritize this!

laurenluz commented 1 year ago

We can make default sort according to the amount of GIVpower that is on each project at that moment, and have it update pretty regularly (maybe we do it to update every boost?)

We should change the name of "sort by" from "rank" to "GIVpower"... so default sort is by GIVpower.

This would actually encourage more people to use GIVpower for the immediate impact... however, the "rank" number should not change, as this affects GIVbacks.

cc @aminlatifi

laurenluz commented 1 year ago

To solve the issue regarding Turkey projects, we decided on a quick fix via Giveth/giveth-dapps-v2#2155

However, this feature would be really nice for making more demand for GIV - by making the impact on sorting more immediate. We should figure out the best way to do it - @aminlatifi is thinking about it :)

cc @MoeNick

aminlatifi commented 1 year ago

I think one of these options may fulfill the requirements of immediate rank change

  1. Single frequent update snapshot: We can implement a separate table containing snapshots of percentages and users' GIVpower balance, and make a ranking based on it. It will be separate from all other tables we have used for calculating power boosting ranking till now but will mostly have a similar mechanism. This data cannot be updated so frequently because on each snapshot we must fetch all users' balances from the subgraph. So we may be able to update it every 10 minutes. Nevertheless, will need less development effort.
  2. Instant Ranking: We keep an updated users balance in some table and keep it updated by just fetching updated balances. Then we can recalculate the powers so often, maybe every few minutes. It needs continuously fetching the updates of the balances change, using either JRPC or by the help of a subgraph. For that purpose we may need some development on the subgraph
MoeNick commented 1 year ago

I'd love to have an estimation and risks for all those options/

laurenluz commented 1 year ago

Well, in order for this to have the impact desired, it would need to update "instantly" (or at least every few minutes).

let's talk about option 2 in the GIVeconomy call today and see if people think it's a good idea to implement.

laurenluz commented 1 year ago

Notes from GIVeconomy call:

laurenluz commented 1 year ago

Some notes from the GIVeconomy call:

@aminlatifi - can you do a little research?

laurenluz commented 1 year ago

@MohammadPCh to investigate if it's possible. project sort would change on frontend, then change after based on backend.

MohammadPCh commented 1 year ago

@laurenluz I investigated it, It's possible, but it's making our code messy, hard to understand, and hard to maintain. and we need to get some new data from the backend. also, since we need more requests and calculations to calculate new rankings in the front end, makes our projects page slower. Besides that, we have problems that don't have a clean solution, like the pagination part. consider we fetch 10 projects from the backend and calculate their new ranks, and found out that one of our projects move down to rank 20. so we need to show only 9 projects and take care to show it when we want to show 20 first projects. So, yes it's possible, but I think it's only worth implementing if we're sure it will create a lot of value for the user.

laurenluz commented 1 year ago

@MohammadPCh - thanks for looking into it. that really sounds like a mess to me 😅 if it were up to me, I think we should skip it in that case, but I will check in as well with @GriffGreen since he felt very strongly about this idea.

GriffGreen commented 1 year ago

Hmmmmm This is an important feature.

What features are we prioritizing over it?

How edge case are these pagination issues?

Is there another more fundamental change that we can do that would make this feature cleaner?

I heard there was something about the graph updating every 5 minutes and it would be ok?

aminlatifi commented 1 year ago

Hmmmmm This is an important feature.

What features are we prioritizing over it?

How edge case are these pagination issues?

Is there another more fundamental change that we can do that would make this feature cleaner?

I heard there was something about the graph updating every 5 minutes and it would be ok?

Updating the graph design is part of enabling the backend to update ranks faster, aiming for every 5 minutes. But immediate rank update in the user interface is something that needs some backend support and complicated frontend implementation.

laurenluz commented 1 year ago

@GriffGreen you said before that if there is no "immediate" effect, then it's not worth doing. is that still the case?

As Amin said, the only way to make the sorting update immediately is by doing this complicated frontend implementation (with additional backend support) that Cherik said would be a mess.

If we want the resorting to happen every 5 min, I do think it's possible with the graph. Are you happy w/ having sorting update every 5 min?

laurenluz commented 1 year ago

@MoeNick can work with @mosaeedi on design to tell the user that the project sorting will change within 5 min.

@GriffGreen is happy w/ this solution.

@aminlatifi can work on the backend implementation

laurenluz commented 1 year ago

To clear up confusion around this issue, I made a mini-spec for it: https://www.notion.so/giveth/Instant-Boost-Mini-Spec-cea340e1bbf2456f8c7b237c07e5f8aa

Hopefully that helps.