Giveth / giveth-dapps-v2

This project is the aggregation of GIVeconomy and Giveth.io DApps in a single repo
https://staging.giveth.io
GNU General Public License v3.0
54 stars 33 forks source link

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

Open laurenluz opened 7 months ago

laurenluz commented 7 months ago

@mohammadranjbarz @jainkrati

related to: https://github.com/Giveth/impact-graph/pull/1189 https://github.com/Giveth/impact-graph/pull/1190 https://github.com/Giveth/giveth-dapps-v2/issues/3386#issuecomment-1838575123

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
jainkrati commented 7 months ago

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

jainkrati commented 6 months ago

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

laurenluz commented 5 months ago

@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 commented 5 months ago

@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 commented 4 months ago

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.

laurenluz commented 4 months ago

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 commented 4 months ago

@mohammadranjbarz could you please take this up today itself

mohammadranjbarz commented 4 months ago

@mohammadranjbarz could you please take this up today itself

Working on it

mohammadranjbarz commented 4 months ago

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

maryjaf commented 3 months ago

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 commented 3 months ago

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 commented 2 months ago

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

WhyldWanderer commented 2 months ago

I also noticed this happening with a few projects today..

The matching funds that were distributed for the Giving Season round are not currently reflecting in the total donations received for the project.

jainkrati commented 2 months ago

@CarlosQ96 lets finish this last p0 of QF today

CarlosQ96 commented 1 month ago

Merged to prod and its also on staging @jainkrati, final qf on prod. Related to also the performance improvements of the totals. @maryjaf

maryjaf commented 1 month ago

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

____-

How long does it take to update the table? I've repeated above steps and in donation tab of qf round, the matching fund is shown like as pic 1 but it hasn't been added in all donation table @CarlosQ96

https://impact-graph.serve.giveth.io/admin/resources/QfRoundHistory/records/225/show (Is the data correct? or maybe there is some problem in my test data )

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

image image

CarlosQ96 commented 1 month ago

I found the issue as this in the admin is not automatically updated. So Ill add a function to the admin js to do so.

jainkrati commented 1 week ago

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

Meriem-BM commented 1 week ago

@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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

@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?