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

GIVbacks page changes corresponding to new GIVbacks changes - on prod by Sept 16 #4679

Closed
7 tasks done
laurenluz opened this issue Sep 4, 2024 · 12 comments
Closed
7 tasks done
Assignees

Comments

@laurenluz
Copy link
Member

laurenluz commented Sep 4, 2024

Starting on September 17, we will have a minimum $5 donation requirement for GIVbacks eligibility, plus we are experimenting with the raffle & with decentralized verification, here are some changes I think we can/should make:

GIVbacks Page

  • givbacks page, title subtext: "When you make a donation of $5 or more to a GIVbacks eligible project you qualify to get GIV!"
    image

  • givbacks page, remove all this:
    image

  • Change "GIV Allocated to Round" to "GIVbacks Rewards"
    image

  • Change hard coded 1 Million GIV to a dynamic number from Show GIVbacks rewards amount available in the round SO FAR - backend changes #4678 (if possible)

  • Change GIVbacks box copy title "When you give you get GIV back!" to "Give and get GIV back!"
    image

  • Change GIVbacks box copy subtext to: "Each GIVbacks round lasts two weeks. The GIVbacks Rewards available depends on the amount donated at in the round, to a maximum amount of 1 million GIV. After the End Date, the GIVbacks Rewards for the round go to the eligible donors."
    image

  • Comment out "why don't I have GIVbacks" part and corresponding modal
    image

@mohammadranjbarz can you assign the right person?

@laurenluz
Copy link
Member Author

cc @WhyldWanderer

mohammadranjbarz added a commit to Giveth/impact-graph that referenced this issue Sep 11, 2024
* WIP Implement  allocatedGivbacks function

related to Giveth/giveth-dapps-v2#4678 Giveth/giveth-dapps-v2#4679

* allocatedGivbacks() endpoint implemented and works

related to Giveth/giveth-dapps-v2#4678 Giveth/giveth-dapps-v2#4679

* Fix allocatedGivbacksQuery test cases
@mohammadranjbarz mohammadranjbarz moved this from New Issues to In Progress in All-Devs Sep 12, 2024
mohammadranjbarz added a commit that referenced this issue Sep 13, 2024
@mohammadranjbarz
Copy link
Contributor

@maryjaf @laurenluz Can you check the preview link https://giveth-dapps-v2-git-4679modifygivbackchangetobe-210dfd-givethio.vercel.app/givbacks

When for any reason FE request fails and can't get the result, or it is zero I show ? is it ok?

@maryjaf As we have 1 hour cache you can't check it in FE to see if it works properly or not, so it's better to test webservice

curl --location 'https://impact-graph.serve.giveth.io/graphql' \
--header 'Content-Type: application/json' \
--data '{"query":"query {\n    allocatedGivbacks(\n        refreshCache:true\n    ){\n            usdValueSentAmountInPowerRound\n            allocatedGivTokens\n            givPrice\n            date\n    }\n}","variables":{}}'

And send refreshCache:true to get updated result

@laurenluz
Copy link
Member Author

laurenluz commented Sep 15, 2024

hmmm it's showing me "?" right now - is it likely the FE request is failing right now? or it's more likely that it's because the value is 0?

ideally, we should the last updated GIVbacks pool amount until the FE can get the new value... so if last time it was working the GIVbacks pools size is 50,000 GIV, we should that, rather than "?"

If it's the start of a new round though perhaps, and the amount is actually 0.. let's show "TBD"

@maryjaf
Copy link
Collaborator

maryjaf commented Sep 15, 2024

Thanks @mohammadranjbarz The copy fixes has been applied correctly on feature branch
but for testing the web service I have a question

By donating on staging, the "allocatedGivTokens" in response of api should be increased?
{
"data": {
"allocatedGivbacks": {
"usdValueSentAmountInPowerRound": 0,
"allocatedGivTokens": 0,
"givPrice": 0.00584277,
"date": "2024-09-15T07:45:17.709Z"
}
}
}

@mohammadranjbarz
Copy link
Contributor

Thanks @mohammadranjbarz The copy fixes has been applied correctly on feature branch but for testing the web service I have a question

By donating on staging, the "allocatedGivTokens" in response of api should be increased? { "data": { "allocatedGivbacks": { "usdValueSentAmountInPowerRound": 0, "allocatedGivTokens": 0, "givPrice": 0.00584277, "date": "2024-09-15T07:45:17.709Z" } } }

@maryjaf If project is givback eligible, token is givback eligible and donor address is not in the purple list, yes it would be increased

@maryjaf
Copy link
Collaborator

maryjaf commented Sep 15, 2024

Thanks @mohammadranjbarz could you please tell me more about the formula of increasing GIV for givback

This is the result of my test but i'm not sure if it's correct or not

I Donated 0.001 xdai
https://gnosisscan.io/tx/0x3bdbe85fc92eb5fc4ac573a5d6e97c3e39baf09d9daea8d47a691fe0e93e4ab2
Response :
{
"data": {
"allocatedGivbacks": {
"usdValueSentAmountInPowerRound": 0.00078181823,
"allocatedGivTokens": 1,
"givPrice": 0.00584277,
"date": "2024-09-15T14:05:05.995Z"
}
}
}


I Donated 0.01 xdai
https://gnosisscan.io/tx/0x286c4b93384b7ec0473d7ee89e31bbefb83faf28e9b2184c5a9cd6ca0c5e4329
Response :

{
"data": {
"allocatedGivbacks": {
"usdValueSentAmountInPowerRound": 0.0086,
"allocatedGivTokens": 2,
"givPrice": 0.00584277,
"date": "2024-09-15T14:08:15.953Z"
}
}
}


I donate 100GIV on OP sepolia(1 GIV=1$)
https://optimism-sepolia.blockscout.com/tx/0xdd583ecc27038822018d2cb5091343517008241d475fbff2deecb795845cd1ac
Response:

{
"data": {
"allocatedGivbacks": {
"usdValueSentAmountInPowerRound": 60.909092,
"allocatedGivTokens": 10425,
"givPrice": 0.00584277,
"date": "2024-09-15T14:35:35.531Z"
}
}
}

@mohammadranjbarz
Copy link
Contributor

Thanks @mohammadranjbarz could you please tell me more about the formula of increasing GIV for givback

This is the result of my test but i'm not sure if it's correct or not

I Donated 0.001 xdai https://gnosisscan.io/tx/0x3bdbe85fc92eb5fc4ac573a5d6e97c3e39baf09d9daea8d47a691fe0e93e4ab2 Response : { "data": { "allocatedGivbacks": { "usdValueSentAmountInPowerRound": 0.00078181823, "allocatedGivTokens": 1, "givPrice": 0.00584277, "date": "2024-09-15T14:05:05.995Z" } } }

I Donated 0.01 xdai https://gnosisscan.io/tx/0x286c4b93384b7ec0473d7ee89e31bbefb83faf28e9b2184c5a9cd6ca0c5e4329 Response :

{ "data": { "allocatedGivbacks": { "usdValueSentAmountInPowerRound": 0.0086, "allocatedGivTokens": 2, "givPrice": 0.00584277, "date": "2024-09-15T14:08:15.953Z" } } }

I donate 100GIV on OP sepolia(1 GIV=1$) https://optimism-sepolia.blockscout.com/tx/0xdd583ecc27038822018d2cb5091343517008241d475fbff2deecb795845cd1ac Response:

{ "data": { "allocatedGivbacks": { "usdValueSentAmountInPowerRound": 60.909092, "allocatedGivTokens": 10425, "givPrice": 0.00584277, "date": "2024-09-15T14:35:35.531Z" } } }

@maryjaf We just calculate the value USD amount in the round, get GIV price from coingecko, then divide the USD amount value to GIV price and it is the allocatedGivTokens in the round so far.

@maryjaf
Copy link
Collaborator

maryjaf commented Sep 16, 2024

hmmm it's showing me "?" right now - is it likely the FE request is failing right now? or it's more likely that it's because the value is 0?

ideally, we should the last updated GIVbacks pool amount until the FE can get the new value... so if last time it was working the GIVbacks pools size is 50,000 GIV, we should that, rather than "?"

If it's the start of a new round though perhaps, and the amount is actually 0.. let's show "TBD"

Thanks @mohammadranjbarz it seems the calculation is correct based on above formula.

Only this item remains, showing ? for "GIVbacks Rewards" on this branch https://giveth-dapps-v2-git-4679modifygivbackchangetobe-210dfd-givethio.vercel.app/givbacks

@mohammadranjbarz
Copy link
Contributor

@maryjaf can you test it on this link https://giveth-dapps-v2-b4iwwt02n-givethio.vercel.app ?

@mohammadranjbarz mohammadranjbarz moved this from In Progress to QA in All-Devs Sep 17, 2024
@maryjaf
Copy link
Collaborator

maryjaf commented Sep 17, 2024

If it's the start of a new round though perhaps, and the amount is actually 0.. let's show "TBD"

Since it isn't the start of new round and there are some donations on staging, is TBD right? @mohammadranjbarz
image

@mohammadranjbarz
Copy link
Contributor

If it's the start of a new round though perhaps, and the amount is actually 0.. let's show "TBD"

Since it isn't the start of new round and there are some donations on staging, is TBD right? @mohammadranjbarz image

It shows correctly for me

Screenshot 1403-06-27 at 12 09 13 in the afternoon

@maryjaf
Copy link
Collaborator

maryjaf commented Sep 17, 2024

Thanks @mohammadranjbarz now it is shown for me correctly

@maryjaf maryjaf moved this from QA to Done in All-Devs Sep 17, 2024
mohammadranjbarz added a commit to Giveth/impact-graph that referenced this issue Sep 17, 2024
* WIP Implement  allocatedGivbacks function

related to Giveth/giveth-dapps-v2#4678 Giveth/giveth-dapps-v2#4679

* allocatedGivbacks() endpoint implemented and works

related to Giveth/giveth-dapps-v2#4678 Giveth/giveth-dapps-v2#4679

* Fix allocatedGivbacksQuery test cases
CarlosQ96 added a commit to Giveth/impact-graph that referenced this issue Oct 3, 2024
* fix: remove memo for project verification managing funds

* fix: remove memo for project verification managing funds

* add projectId and qfRoundId to qf data export

* fix: getDraftDonationById bug (toWalletMemo can be null)

* fix: add memo for stellar project address uniqueness

* fix: add memo for manage address validation

* fix: add duplicate address error message for stellar

* fix: linter error

* add index for project stellar address

* eslint error

* fix: case when owner donate to his own peoject (Stellar chain)

* fix: add calculateGivbackFactor to Stellar cron job

* onlyEndaement option added to donationResolvers to get only endaoment projects

* chore: implementing coderabbitai suggestion to remove string literal

* feat: register secondary donation

* running migration to set project banners appropriately for endaoment … (#1778)

* running migration to set project banners appropriately for endaoment projects

* chore: correcting tab spaces for syntax

* fix: linter errors

* Modify add banner to endaoment projects migration (#1791)

related to #1600

* Fix lint errors

* Fix running tests

* Fix projectResolver test cases

* Fix donationResolver test cases

* skip should renew the expiration date of the draft donation test case

---------

Co-authored-by: Hrithik Sampson <[email protected]>
Co-authored-by: mohammadranjbarz <[email protected]>

* improve adminjs to import qfround matching and better filters

* fix eslint

* fix: remove adding secondary donation logic

* fix minor form issues

* order middleware in bootstrap file

* test: add test cases to fetch only Endaoment projects

* chore: change the second Project to first Project

* chore: change the second Project to first Project

* chore: change the second Project to first Project

* chore: change the second user to new user since it is interfering with the pre-existing test cases

* delete previous_round_rank when deleting a project (#1809)

* Implement  allocatedGivbacks function (#1808)

* WIP Implement  allocatedGivbacks function

related to Giveth/giveth-dapps-v2#4678 Giveth/giveth-dapps-v2#4679

* allocatedGivbacks() endpoint implemented and works

related to Giveth/giveth-dapps-v2#4678 Giveth/giveth-dapps-v2#4679

* Fix allocatedGivbacksQuery test cases

* migration: project banners for endaoment projects need to have the correct banners

* chore: underscore before unused variable in add_endaoment_project_banners

* Use Gnosis giv token for getting price of GIV

* Use superfluid mock adapter for test cases

* Use superfluid adapter on test env again

* Feat/separate givback verfied (#1770)

* add isGivbackEligible field

* add AddIsGivbackEligibleColumnToProject1637168932304

* add UpdateIsGivbackEligibleForVerifiedProjects1637168932305 migration

* add migration to rename isProjectVerified to isProjectGivbackEligible

* change isProjectVerified tp isProjectGivbackEligible

* update octant donation

* add approve project

* treat project.verified and project.isGivbackEligible equally on sorting

* remove reset verification status on verify

* check isGivbackEligible on create ProjectVerificationForm

* add ProjectInstantPowerViewV3 migration

* use verifiedOrIsGivbackEligibleCondition

* Use different materialized view for givback factor

related to #1770

* Fix build error

* Fix build error

* Fix project query for isGivbackEligible and verified

* Fix add base token migration

* Fix eslint errors

* Fix add base token migration

* Fix add base token migration

* Fix add base token migration

* Fix donation test cases related to isGivbackEligible

* Fix build error

---------

Co-authored-by: Mohammad Ranjbar Z <[email protected]>

* Fix test cases related to isProjectVerified

* add isImported And categories to project tab

* fix isProjectGivbackEligible Migration in wrong folder

* add chaintype and solana networks to tokenTab

* update branch

* add environment and energy image mapping

* add categories to show and edit forms in adminjs for projects

* fix eslint

* add best match sort option

* update addSearchQuery to prioritize the title

* Add Stellar to QFRound

* run linter

* remove eager from project categories in entity

* Add isGivbackEligible filter

* Hotfix automatic model score sync (#1849)

* add user mbdscore sync workers and cronjob

* add active env var for syncing score

* add tests to the user sync worker and cronjob

* prevent duplicate tokens being added in adminJS

* Ensure correct emails are sent for project status changes related to decentralized verification

* fix test

* fix test cases

* fix test cases

---------

Co-authored-by: Meriem-BM <[email protected]>
Co-authored-by: Carlos <[email protected]>
Co-authored-by: HrithikSampson <[email protected]>
Co-authored-by: HrithikSampson <[email protected]>
Co-authored-by: Hrithik Sampson <[email protected]>
Co-authored-by: CarlosQ96 <[email protected]>
Co-authored-by: Cherik <[email protected]>
Co-authored-by: Ramin <[email protected]>
@divine-comedian divine-comedian closed this as completed by moving to Merged to Production in All-Devs Oct 4, 2024
@github-project-automation github-project-automation bot moved this from Merged to Production to Done in All-Devs Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants