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

As a grants community member, I want to be able to check the blockchain tx's match the Grants DB info, so I can audit the results I get from the Gitcoin frontend #5762

Closed
owocki opened this issue Jan 10, 2020 · 15 comments

Comments

@owocki
Copy link
Contributor

owocki commented Jan 10, 2020

User Story

As a grants community member, I want to be able to check the blockchain tx's match the Grants DB info, so I can audit the results I get from the Gitcoin frontend

Why Is this Needed

Summary:
Because people are starting to falsify information they get from the frontend to backend.

Description

Type:
Feature

Current Behavior

No checking of backend data vs blockchain.

Expected Behavior

  • We need a helper method that takes a look at the onchain tx's (contribution approve() and transefer()s) and make sure the information has not been falsified
  • Run that helper method automatically for each new grant contribution
    . Write a helper script that can be used to run that method on each previous grant contribution, and mark success=False on the contribution if it was falsified.

Definition of Done

See above

Additional Information

example grants approve tx which can be used for testing
https://etherscan.io/tx/0xe83d42ed1d6305ac099adb61929af921fd8ea3ca61a6585c1c6a840d452bfe02
example grants splitter contract send function which can be used for testing https://etherscan.io/tx/0x0f4837fc443dea4ae50e511c2f79960675e99287d97891aa6ded06a539bf5fec

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1.59 ETH (221.38 USD @ $139.23/ETH) attached to it.

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Workers have applied to start work.

These users each claimed they can complete the work by 1 month from now.
Please review their action plans below:

1) iamonuwa has applied to start work (Funders only: approve worker | reject worker).

The task is quite clear and I'll have it ready this weekend. Write a simple method and run it automatically anytime a contribution is made.

Learn more on the Gitcoin Issue Details page.

1 similar comment
@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Workers have applied to start work.

These users each claimed they can complete the work by 1 month from now.
Please review their action plans below:

1) iamonuwa has applied to start work (Funders only: approve worker | reject worker).

The task is quite clear and I'll have it ready this weekend. Write a simple method and run it automatically anytime a contribution is made.

Learn more on the Gitcoin Issue Details page.

@gitcoinbot
Copy link
Member

gitcoinbot commented Jan 10, 2020

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 month, 3 weeks ago.
Please review their action plans below:

1) iamonuwa has applied to start work (Funders only: approve worker | reject worker).

The task is quite clear and I'll have it ready this weekend. Write a simple method and run it automatically anytime a contribution is made.
2) iamonuwa has applied to start work (Funders only: approve worker | reject worker).

The task is quite clear and I'll have it ready this weekend. Write a simple method and run it automatically anytime a contribution is made.
3) iamonuwa has applied to start work (Funders only: approve worker | reject worker).

The task is quite clear and I'll have it ready this weekend. Write a simple method and run it automatically anytime a contribution is made.
4) evgeniuz has been approved to start work.

I am interested in working on this. Will start by implementing on-time checking, then will add script to backfill falsified contributions.

Learn more on the Gitcoin Issue Details page.

@owocki
Copy link
Contributor Author

owocki commented Jan 10, 2020

@evgeniuz im gonna approve u. @iamonuwa thanks for the application but were already working on some stuff together + id rather focus on that

@iamonuwa
Copy link
Contributor

@evgeniuz im gonna approve u. @iamonuwa thanks for the application but were already working on some stuff together + id rather focus on that

😁

@evgeniuz
Copy link
Contributor

Thanks, I've started working on this issue, plan to finish with it tomorrow. There's one thing I've noted: second (splitter) tx hash is not stored in grants DB, only approve tx hash.

It's possible to verify new contributions, as we can pass their tx hash, but I'm not sure what would be a good way to backfill past contributions (i. e. find splitter tx hash from approve tx hash).

@gitcoinbot
Copy link
Member

@evgeniuz Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@evgeniuz due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@evgeniuz
Copy link
Contributor

Hi, sorry for delay, unexpectedly got busy at work, will create PR in a couple of days.

@owocki, please see this: #5762 (comment), what should I do with past contributions, as only approval tx hash is stored in database, I don't think there's way to verify actual transfer of funds, as database doesn't have that tx hash.

@owocki
Copy link
Contributor Author

owocki commented Feb 4, 2020

@evgeniuz that issue has been fixed. both tx now available on the grant contribution

@evgeniuz
Copy link
Contributor

evgeniuz commented Feb 5, 2020

Suggested use: run verify_contributions management command, check how many contributions will be marked as falsified (and reasons why), run same command with --live flag.

It's possible I've added too strict checks that will result in false positive the first time it's used. It's fairly easy to disable/adjust these checks as needed.

There's also DELTA parameter which allows to add some slack to requirements if needed: by default amount split should be no less than amount approved (i. e. all funds transferred). Increasing DELTA will allow small differences to account for rounding errors (if there are any).

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.59 ETH (313.03 USD @ $196.88/ETH) has been submitted by:

  1. @evgeniuz

@owocki please take a look at the submitted work:


@owocki
Copy link
Contributor Author

owocki commented Feb 5, 2020

very cool! will payonce its merged

@gitcoinbot
Copy link
Member

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 1.59 ETH (227.82 USD @ $143.28/ETH) attached to this issue has been approved & issued to @evgeniuz.

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

Successfully merging a pull request may close this issue.

5 participants