Skip to content
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

Adjust givbacks factors for verified vs. givbacks eligible #1798

Open
divine-comedian opened this issue Aug 20, 2024 · 9 comments
Open

Adjust givbacks factors for verified vs. givbacks eligible #1798

divine-comedian opened this issue Aug 20, 2024 · 9 comments
Assignees
Labels
DeVerification Decentralizing Project Verification

Comments

@divine-comedian
Copy link
Collaborator

divine-comedian commented Aug 20, 2024

With the coming changes of Decentralized Verification we will have two tiers of "verification" statuses. verified and givbacksEligible.

verified projects can participate in GIVpower, have a rank, but DO NOT yield GIVbacks to their donors

givbacksEligible projects have GIVpower and yield GIVbacks to their donors.

we will need to be able to make the changes to our givbacks calculations in order to handle this change.

As an example, ff we have 100 projects total that have the statuses GIVbacks Eligible and Verified, then we would handle GIVbacks like below:

Project Rank Status GIVbacks Factor
1 GIVbacks Eligible 80%
2 Verified 0%
3 GIVbacks Eligible 79%
4 GIVbacks Eligible 78%
5 Verified 0%
6 Verified 0%
7 GIVbacks Eligible 77%

As you can see verified projects can potentially have a higher rank than givbacksEligible projects, however we should not consider them when calculating the givbacks factor. When calculating the givbacks factor we skip over the not givbacksEligible projects and only consider the next givbacksEligible projects as if it were the next lowest rank project.

additionally we should ensure project data that shows the predicted givbacks factor are showing the correct percentages @MohammadPCh

Image

for testing

making a project "vouched" status

  • go to admin panel
  • select under "Project" tab and choose a project to make vouched
  • click verify button
    Image
  • donations to this project SHOULD NOT be eligible for GIVbacks
  • check eligible donations response using https://givback.develop.giveth.io/api-docs/
  • donation to project that is only vouched should not show up

making a project GIVbacks Eligible

  • check if project has submitted "GIVbacks Eligiblity" form (formerly verification form)
  • go to admin panel, "Project Verification Form" tab
  • find application form from given project
  • press approve project button
    Image
  • donations to this project should be eligible for GIVbacks
  • check eligible donations response using https://givback.develop.giveth.io/api-docs/
  • donation to this project that is GIVbacks eligible should show up in response

checking GIVbacks factor

query {
  getTopPowerRank
}

the top ranked project yields 80% givbacks factor
bottom ranked project yields 50% givbacks factor
the difference between the top and bottom rank givbacks factor is 30% (50-80)

so for example if there are 50 ranked projects that are GIVbacks eligible then

30 / 50 = 0.6 so each project from the top rank down should have 0.6% less GIVbacks factor

  • check top ranked project that is GIVbacks eligible yields 80% GIVbacks factor to donors
  • check next highest ranked project that is GIVbacks eligible and if the GIVbacks factor is correct.
@mohammadranjbarz
Copy link
Collaborator

@MohammadPCh Has separated Givback Eligible and *verified in this PR #1770

And for this phase we can't separate ranking for verified and givback eligible projects, for that purpose we need to create a new materialized view , ...

@divine-comedian Should we hold on and don't merge that PR till implement this issue or we can merge it and for second phase we apply these requirements?

@divine-comedian
Copy link
Collaborator Author

Following up on this in our convo - we need to make sure we can handle GIVbacks correctly even for the first phase of this feature.

projects that are not givbacks eligible should not receive GIVbacks. We'll need to figure out and estimate the necessary work.

@divine-comedian divine-comedian transferred this issue from Giveth/givback-calculation Sep 5, 2024
@divine-comedian divine-comedian added the DeVerification Decentralizing Project Verification label Sep 5, 2024
@divine-comedian
Copy link
Collaborator Author

@mohammadranjbarz what is the update on this issue?

@mohammadranjbarz
Copy link
Collaborator

@mohammadranjbarz what is the update on this issue?

I made the Pr and @CarlosQ96 approved it, I just didn't merge it to staging because I wanted to do it after the release, if we don't have any release soon, I can merge the PRs

@divine-comedian
Copy link
Collaborator Author

related to this PR
#1770

@divine-comedian
Copy link
Collaborator Author

@mohammadranjbarz should need to make tiny changes to the givbacks-calculation repo - he says only 1 hour of work

let's make sure we get it done!

@LatifatAbdullahi
Copy link

@mohammadranjbarz @divine-comedian

Test update

Vouched status

-Donations to this project SHOULD NOT be eligible for GIVbacks - Pass
-Donations to project that is only vouched should not show up in the eligibledonations API- Pass

GIVback Eligible status

-Donations to this project should be eligible for GIVbacks - Pending
-Donation to this project that is GIVbacks eligible should show up in response - Pending

GIVback Factor

  • Check top ranked project that is GIVbacks eligible yields 80% GIVbacks factor to donors - Pass
  • Check next highest ranked project that is GIVbacks eligible and if the GIVbacks factor is correct - Pass

Whilst testing the eligibledonation API the whole page went blank showing this error

https://givback.develop.giveth.io/api-docs/

image

@mohammadranjbarz
Copy link
Collaborator

@mohammadranjbarz @divine-comedian

Test update

Vouched status

-Donations to this project SHOULD NOT be eligible for GIVbacks - Pass -Donations to project that is only vouched should not show up in the eligibledonations API- Pass

GIVback Eligible status

-Donations to this project should be eligible for GIVbacks - Pending -Donation to this project that is GIVbacks eligible should show up in response - Pending

GIVback Factor

  • Check top ranked project that is GIVbacks eligible yields 80% GIVbacks factor to donors - Pass
  • Check next highest ranked project that is GIVbacks eligible and if the GIVbacks factor is correct - Pass

Whilst testing the eligibledonation API the whole page went blank showing this error

https://givback.develop.giveth.io/api-docs/

image

It's up and running now, can you test it again?

@LatifatAbdullahi
Copy link

@mohammadranjbarz @divine-comedian

Test update

Vouched status

-Donations to this project SHOULD NOT be eligible for GIVbacks - Pass
-Donations to project that is only vouched should not show up in the eligibledonations API- Pass

GIVback Eligible status

-Donations to this project should be eligible for GIVbacks - Pass
-Donation to this project that is GIVbacks eligible should show up in response - Pass

GIVback Factor

Check top ranked project that is GIVbacks eligible yields 80% GIVbacks factor to donors - Pass
Check next highest ranked project that is GIVbacks eligible and if the GIVbacks factor is correct - Pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeVerification Decentralizing Project Verification
Projects
Status: Done
Development

No branches or pull requests

3 participants