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

Matching funds amounts are not showing up with the correct distribution date & are not under the corresponding QF round tab - on prod by Jan 17 #3456

Closed
laurenluz opened this issue Dec 6, 2023 · 35 comments
Assignees
Labels
bug Something isn't working In Progress P0 Something is broken or not working QF Quadratic Funding Related

Comments

@laurenluz
Copy link
Member

@mohammadranjbarz @jainkrati

related to:
Giveth/impact-graph#1189
Giveth/impact-graph#1190
#3386 (comment)

It's great that we added the matching funds distribution to the donation table but there are a couple of issues:

  1. the donation date shows "December 5" rather than the date that that funds were actually sent (which would have been closer to the round end time).
  2. The matching funds distributions should probably show up under the corresponding QF round donation tab. We shouldn't count it in the "amount raised in the round"... and should only show it as the "matching funds" on the summary card for the round filter... but it should probably appear there.

You can see the Giveth house link as an example:

image.png

image.png

@laurenluz laurenluz added bug Something isn't working QF Quadratic Funding Related labels Dec 6, 2023
@jainkrati
Copy link
Collaborator

#1 seems like a P1. #2 can be taken up as P3. @mohammadranjbarz please solve #1 first and #2 can be taken up later as a separate PR. cc @laurenluz

@laurenluz laurenluz changed the title Matching funds amounts are not showing up with the correct distribution date & are not under the corresponding QF round tab Matching funds amounts are not showing up with the correct distribution date & are not under the corresponding QF round tab - on prod by Jan 17 Jan 3, 2024
@jainkrati
Copy link
Collaborator

@mohammadranjbarz what is the update here on #1 and #2.

@laurenluz laurenluz added the P1 it's a blocker to other tasks or issues. label Jan 23, 2024
@laurenluz laurenluz added P0 Something is broken or not working and removed P1 it's a blocker to other tasks or issues. labels Feb 8, 2024
@laurenluz
Copy link
Member Author

@mohammadranjbarz please please please take a look at this soon. this is important to fix very soon - griff needs it for a milestone on a grant.

@mohammadranjbarz
Copy link
Contributor

@laurenluz I editted createdAt time for al 47 donations that were for sent matchingFunds manually in DB so it's fixed now

Screenshot 1402-11-22 at 2 19 33 in the afternoon

And the reason was because we sent matchingFunds but we implemented the feature of importing them in our DB few month later, now if we import them immediately after it got fixed it would b almost in same time but if you want to they be exact transaction time we have two options:

  1. Just tell one of backend guys we can easily execute a query to fix those donation createdAt like what I did for first qfRound just now ( because we don't have much qfRounds per month it's not a big and consuming task
  2. Modify our code to get the exact time from blockchain during creating those donations, it needs some development but is the safest way

About adding those donations to qfRound, it will be counted as raisedFunds right now, if want to add them to qfRound but exclude them from raised fund in qfRound, we should add a field to donation to specify these donations are for matchingFunds and modify some query of qfRound donation stats, it needs some coding but we can do it ( we also should change the query of creating sent matchingFunds donations and connect them to the qfRound

@laurenluz @jainkrati Now what do you say?

@jainkrati
Copy link
Collaborator

Sounds good @mohammadranjbarz . Please make the changes for approach # 2 for adding exact time by fetching from blockchain. Also pls create another PR for adding donations to QF Round but excluding from raised fund. Can we do this on priority and complete by 15th Feb? Metapool round is next week.

@jainkrati jainkrati removed their assignment Feb 13, 2024
@laurenluz
Copy link
Member Author

Re: @mohammadranjbarz

About adding those donations to qfRound, it will be counted as raisedFunds right now, if want to add them to qfRound but exclude them from raised fund in qfRound, we should add a field to donation to specify these donations are for matchingFunds and modify some query of qfRound donation stats, it needs some coding but we can do it ( we also should change the query of creating sent matchingFunds donations and connect them to the qfRound

We want these donations to be part of "all time raised" and shown as "matching funds for the QF round", but should NOT considered as donations IN ANY QF round... If we fetch the date & time from the blockchain as @jainkrati suggestsion (which I agree with!) - this shouldn't be an issue because the funds are ALWAYS dispersed some time after the QF round ends.

The one edge case we should be careful/aware of is... Imagine if a project was in a QF round that ended Feb 9... then they are also in a new QF round that goes from Feb 11-20. Giveth send the matching funds for the 1st QF round on Feb 15. This donations should NOT count as a donation in the 2nd QF round, even though the data would make it seem that way because the project is part of the new QF round. - this edge case could create issues later around data processing & estimated matching... and basically we should just NEVER consider these dispersements from donation.eth to be donations in active QF rounds.

FYI @jainkrati - although the metapool round starts next week Feb 19... we won't need this issue to be totally complete until after the round ends & funds are dispersed... which will be probably a week or so after Feb 29.

@jainkrati
Copy link
Collaborator

@mohammadranjbarz could you please take this up today itself

@mohammadranjbarz
Copy link
Contributor

@mohammadranjbarz could you please take this up today itself

Working on it

@mohammadranjbarz
Copy link
Contributor

On last conversation that I had with @laurenluz , she said

I think it's ok if it's just part of "all donations"... but we need to make sure it is NEVER considered a donation in ANY QF round... even if the tx occurs during an active QF round on an eligible chain - is it possible?
so we need to fix createdAT... and then also maybe make a conditions so that donations from donation.eth never count as eligible for QF?

So I would implement with this condition

mohammadranjbarz added a commit to Giveth/impact-graph that referenced this issue Mar 4, 2024
* WIP add createdAt to matchingFund donations

* WIP add createdAt to matchingFund donations

* Fill qfRound history donation's fields

related to Giveth/giveth-dapps-v2#3456

* Remove qfRoundId from distributed matching fund donations

* Fix test cases for inserting donations for distributed matching funds

* Fix test cases for inserting donations for distributed matching funds

* Rename function name
@maryjaf
Copy link
Collaborator

maryjaf commented Apr 3, 2024

I've added this link for tx mathchin fund of "testprofilpic" project
https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/225/show
https://optimistic.etherscan.io/tx/0xd5563692d570acc504a3ab0e535c8e226dd75c4f3d9c503b6d4e693d025dd6b3
But "donation.eth" record isn't added in all donation table although, 1000$ matching fund in round tab is shown
Have I perhaps forgotten some step?

https://staging.giveth.io/project/testprofilepic?tab=donations
image

@mohammadranjbarz

@maryjaf
Copy link
Collaborator

maryjaf commented Apr 9, 2024

I've added this link for tx mathchin fund of "testprofilpic" project https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/225/show https://optimistic.etherscan.io/tx/0xd5563692d570acc504a3ab0e535c8e226dd75c4f3d9c503b6d4e693d025dd6b3 But "donation.eth" record isn't added in all donation table although, 1000$ matching fund in round tab is shown Have I perhaps forgotten some step?

https://staging.giveth.io/project/testprofilepic?tab=donations image

@mohammadranjbarz

Kindly reminder @mohammadranjbarz

@jainkrati
Copy link
Collaborator

@CarlosQ96 pls check this today; looks like an edge case needs to be handled in the solution implemented by @mohammadranjbarz

@jainkrati
Copy link
Collaborator

@Meriem-BM whats the progress update for this? Is it blocked on something ?

@Meriem-BM
Copy link
Member

@Meriem-BM whats the progress update for this? Is it blocked on something ?

Sorry for not giving an update here, basically @CarlosQ96 told me to refactor one query that he said it's taking too long, but there was another issue that @RamRamez fixed related to "transaction not found", where he deleted some wrong transactions records that might be related, if @maryjaf can re-check.

WDYT @CarlosQ96, I think I will need more context about the issue

@RamRamez
Copy link
Collaborator

RamRamez commented Jul 2, 2024

This an old issue and I think these problems should be solved on staging now (but not on production). @maryjaf Could you please test it on staging and verify? because your last comment was on 28 May.

@maryjaf
Copy link
Collaborator

maryjaf commented Jul 2, 2024

It hasn't been fixed yet.
I've set the tx hash as distributed matching fund in QF round history
https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/6311/show
and this amount only is shown in related QF donation tab, but it should be shown in all donation also

image
image

@Meriem-BM
Copy link
Member

Meriem-BM commented Jul 2, 2024

@CarlosQ96, @RamRamez, can you pls explain me the issue throughly, from what I understood, the matching funds in all donation Tab is mot showing even tho there is a matching fund on a QF round (MJ test round) tab, is this correct?

@maryjaf
Copy link
Collaborator

maryjaf commented Jul 15, 2024

You can see the Giveth house link as an example:

image.png

Yeah @Meriem-BM like above pic the donation.eth should be shown in all donation tab for this project , but it isn't shown

@Meriem-BM Meriem-BM moved this from New Issues to Design in All-Devs Jul 15, 2024
@Meriem-BM
Copy link
Member

Hey @maryjaf for the steps you took above, did you click on Relate Donations With Distributed Funds on QF round history tab?

@Meriem-BM Meriem-BM moved this from Design to In Progress in All-Devs Jul 15, 2024
@maryjaf
Copy link
Collaborator

maryjaf commented Jul 15, 2024

Hey @maryjaf for the steps you took above, did you click on Relate Donations With Distributed Funds on QF round history tab?

Yeah, and now I've taped on this button from admin again but there is no change

@Meriem-BM Meriem-BM moved this from In Progress to Code Review/PR in All-Devs Jul 15, 2024
@Meriem-BM Meriem-BM moved this from Code Review/PR to QA in All-Devs Jul 16, 2024
@Meriem-BM
Copy link
Member

@maryjaf can you check this again

@maryjaf
Copy link
Collaborator

maryjaf commented Jul 16, 2024

The "Network " and link of Tx isn't shown correctly, could you please take a look ? @Meriem-BM

Screen.Recording.2024-07-16.at.3.55.30.PM.mov

@Meriem-BM
Copy link
Member

The "Network " and link of Tx isn't shown correctly, could you please take a look ? @Meriem-BM

Screen.Recording.2024-07-16.at.3.55.30.PM.mov

It's just because you added a transaction form Mainnet on test environment, check with testnet transaction

@maryjaf
Copy link
Collaborator

maryjaf commented Jul 18, 2024

The "Network " and link of Tx isn't shown correctly, could you please take a look ? @Meriem-BM
Screen.Recording.2024-07-16.at.3.55.30.PM.mov

It's just because you added a transaction form Mainnet on test environment, check with testnet transaction

sorry I don't understand this comment
this is the link of tx that is shown in "MJ test round" tab

https:/gnosisscan.io/tx/0x02c2cdd5939e1de7d6bcb98b15abd1a1af4a056ef2927ae0728b30da802e1e77

but in all donation by tapping this link : https://staging.giveth.io/project/mejan?tab=donations is redirected

@Meriem-BM
Copy link
Member

Meriem-BM commented Jul 18, 2024

The "Network " and link of Tx isn't shown correctly, could you please take a look ? @Meriem-BM
Screen.Recording.2024-07-16.at.3.55.30.PM.mov

It's just because you added a transaction form Mainnet on test environment, check with testnet transaction

sorry I don't understand this comment this is the link of tx that is shown in "MJ test round" tab

https:/gnosisscan.io/tx/0x02c2cdd5939e1de7d6bcb98b15abd1a1af4a056ef2927ae0728b30da802e1e77

but in all donation by tapping this link : https://staging.giveth.io/project/mejan?tab=donations is redirected

Oh, but the network id is 10, it should be 100 I guess, I checked this donation, it's this one https://impact-graph.serve.giveth.io/admin/resources/Donation/records/257725/show

@maryjaf
Copy link
Collaborator

maryjaf commented Jul 18, 2024

Thanks @Meriem-BM So this problem is only related to test data?

@Meriem-BM
Copy link
Member

Meriem-BM commented Jul 18, 2024

Yes, I think that happened because of typing wrong network id https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/6311/show

was this added manually?

@maryjaf
Copy link
Collaborator

maryjaf commented Jul 21, 2024

this is the link of tx that is shown in "MJ test round" tab

https:/gnosisscan.io/tx/0x02c2cdd5939e1de7d6bcb98b15abd1a1af4a056ef2927ae0728b30da802e1e77

but in all donation by tapping this link : https://staging.giveth.io/project/mejan?tab=donations is redirected

Yes, I think that happened because of typing wrong network id https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/6311/show

was this added manually?

I've changed the network Id into 100 but the problem related to redirect link hasn't been fixed.

@mohammadranjbarz
Copy link
Contributor

this is the link of tx that is shown in "MJ test round" tab
https:/gnosisscan.io/tx/0x02c2cdd5939e1de7d6bcb98b15abd1a1af4a056ef2927ae0728b30da802e1e77
but in all donation by tapping this link : https://staging.giveth.io/project/mejan?tab=donations is redirected

Yes, I think that happened because of typing wrong network id https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/6311/show
was this added manually?

I've changed the network Id into 100 but the problem related to redirect link hasn't been fixed.

I checked the DB it was still 10 I changed to 100 in the DB manually and it works now

Screenshot 1403-04-31 at 12 13 09 in the afternoon

@maryjaf
Copy link
Collaborator

maryjaf commented Jul 21, 2024

this is the link of tx that is shown in "MJ test round" tab
https:/gnosisscan.io/tx/0x02c2cdd5939e1de7d6bcb98b15abd1a1af4a056ef2927ae0728b30da802e1e77
but in all donation by tapping this link : https://staging.giveth.io/project/mejan?tab=donations is redirected

Yes, I think that happened because of typing wrong network id https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/6311/show
was this added manually?

I've changed the network Id into 100 but the problem related to redirect link hasn't been fixed.

I checked the DB it was still 10 I changed to 100 in the DB manually and it works now

Screenshot 1403-04-31 at 12 13 09 in the afternoon

Great, Thanks @mohammadranjbarz

@maryjaf maryjaf moved this from QA to Done in All-Devs Jul 21, 2024
@divine-comedian divine-comedian moved this from Done to Merged to Production in All-Devs Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working In Progress P0 Something is broken or not working QF Quadratic Funding Related
Projects
Status: Merged to Production
Development

No branches or pull requests

9 participants