Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Weird Leaderboard math... Victor only sent 500... but it says 1000 #2289

Closed
GriffGreen opened this issue Jun 15, 2021 · 9 comments
Closed

Weird Leaderboard math... Victor only sent 500... but it says 1000 #2289

GriffGreen opened this issue Jun 15, 2021 · 9 comments
Assignees

Comments

@GriffGreen
Copy link
Member

Screen Shot 2021-06-15 at 7 32 51 AM

https://trace.giveth.io/campaign/commons-stack-association

@MoeNick
Copy link
Member

MoeNick commented Jun 15, 2021

Amin jan pls take a look

@aminlatifi
Copy link
Member

This donations is returned from canceled trace, but its isReturn flag is false!

{
          "_id": "60a06172cca9f60a8aa7c9e8",
          "status": "Committed",
          "mined": true,
          "parentDonations": [
            "609a6436d2d8a862fa918530"
          ],
          "isReturn": false,
          "lessThanCutoff": true,
          "usdValue": 500,
          "amount": "500000000000000000000",
          "amountRemaining": "0",
          "giverAddress": "0xE8aDaeA0bA507a28d1309051BecEb4db7Fe377AF",
          "ownerId": 2349,
          "ownerTypeId": "5feb2ca1dae3134bd0166dd6",
          "ownerType": "campaign",
          "pledgeId": "9511",
          "commitTime": "2021-05-16T00:02:13.000Z",
          "createdAt": "2021-05-16T00:02:13.000Z",
          "txHash": "0x4f73c0fb72f82ae92267c2ae9821b86562cef32d1686813cbdd9c9d9bac9b96a",
          "actionTakerAddress": "0x778549Eb292AC98A96a05E122967f22eFA003707",
          "tokenAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
          "updatedAt": "2021-06-14T12:25:49.695Z",
          "token": {
            "name": "DAI",
            "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
            "foreignAddress": "0x05A075B296995AdCaEC7c1dE0E52271a4Cf6DEb8",
            "symbol": "DAI",
            "rateEqSymbol": "USD",
            "coingeckoId": "dai",
            "decimals": 3
          },
          "requiredConfirmations": 6,
          "confirmations": 6
        }

@aminlatifi
Copy link
Member

@mohammadranjbarz Simulation script may have issue

@aminlatifi
Copy link
Member

@mohammadranjbarz Please see this PR will solve the issue
Giveth/giveth-1-simulation#45

@mohammadranjbarz
Copy link
Collaborator

@mohammadranjbarz Please see this PR will solve the issue
Giveth/giveth-1-simulation#45

After running the simulation on the beta dump, the problem still exists

Screen Shot 1400-03-26 at 22 25 58

Screen Shot 1400-03-26 at 22 23 29

@aminlatifi
Copy link
Member

@GriffGreen I happened because money is delegated from the campaign to a trace which its recipient was the very campaign. So after the trace owner collected the money, it's returned back to the campaign! So since it's not considered as isReturn donation is shown two times in leader board.
The simplest solution would be considering this kind of donations as isReturn

@aminlatifi
Copy link
Member

@mohammadranjbarz What do you think?

@mohammadranjbarz
Copy link
Collaborator

@mohammadranjbarz What do you think?

I think it's good,
and logically is ok because the donation returned to campaign literally

@MoeNick MoeNick added still discussing... Issues that are still being discussed and removed still discussing... Issues that are still being discussed labels Jul 11, 2021
@mohammadranjbarz
Copy link
Collaborator

@MoeNick
For testing this you should donate to a campaign, then you should create a trace with milestone type in this campaign ( then the recipient of trace would be parent campaign), after delegate to trace, and disbursing that , the money should not appear in campaign leaderbpard twice,
if it was ok , you should tell me to run simulation script, if the donation were ok, it means the Giveth/giveth-1-simulation#49 works fine as well and we can close that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants