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
61 stars 34 forks source link

Project Verification Attestations #3851

Open divine-comedian opened 5 months ago

divine-comedian commented 5 months ago

This feature will use the power ethereum attestations to bring project verification on-chain and allow a wider pool of contributors to contribute to the process. Attestations will be issued on Optimism

We will also distinguish another project status "GIVbacks Eligible" which will take the place of our current "Verified" status

"Verified" will remain as a status but the privileges it gives on Giveth will be slightly below GIVbacks Eligible. Verified projects will be able to be boosted with GIVpower but will not give GIVbacks to their donors. GIVpower ranking will have changes that need to be made.

To distinguish some terminology

Goals

This features has 3 main goals

Attestations Flow

What are Attestations: https://docs.attest.sh/docs/welcome

Only an approved pool of users will be able to verify Giveth projects. This "approved" pool of users will themselves have their own attestations, issued by Giveth that identifies them. We'll also issue a separate attestation from Giveth to our current Project Review team (Nikola, Ashley, Anamarija).

Two other types of Attestations will exist - "Verified" and "GIVbacks Eligible" which correspond to the project's status. The approved verifier pool will be able to issue the Verification attestation. While our current Project Review team (Nikola, Ashley, Anamarija) will be able to issue the GIVbacks Eligible attestation.

Technically anyone can issue these attestations on chain but part of this feature's requirements is that we only recognize attestations made by the aforementioned groups, for their relevant attestation that each group should issue.

The attestation we issue to Verify will have two fields:

The attestation we issue to GIVbacks Eligible will have two fields:

A project becomes "Verified" automatically when a given threshold of unique attestors have issued an attestation with isVerified value of true for a given project, aliased by it's projectId contained in the attestation.

image.png

A project becomes "GIVbacks Eligible" when at least 1 project reviewer issues a GIVbacks Eligible attestation with isGivbacksEligible value of true for a given project, aliased by it's projectId contained in the attestation.

Notifying Verification Attestors

Projects will apply for GIVbacks Eligibility in the same way they currently apply for Verification. A project reviewer will have another option and this will be to "Pass to Verification". This will trigger a webhook that sends selected portions of the project's application to a special discord channel and tags a corresponding role of verification attestors to take action!

The message also includes the link to the front-end where attestors can make attestations. (Described below)

Issuing Attestations

For Verification

We'll need to setup a Schema, this can not be modified after being made. Schemas can be deployed no-code https://easscan.org/schema/create

With this schema we will need to make a SIMPLE front-end that allows the approved pool of verifiers to issue attestations for projects.

it should be able to take these inputs:

The project slug is more accessible to users than the projectId, if we enter the slug we should get the projectId. User will be able to connect to the page with web3. Clicking a button to issue attestation will generate the on-chain transaction to issue the attestation using our schema

For GIVbacks Eligible

We create a slightly modified version of the verification front-end that the project review team uses to issue attestations. This would be pretty much the same but we use a different schema in the background. This is linked in the admin panel for project reviewers to complete manually after they approve a GIVbacks Eligible application (formerly verification application)

Detecting Attestations

We can use the existing EAS graphQL API to get required information to our own endpoints, which can parse the data and provide better endpoints for our back-end calculations

example https://optimism.easscan.org/graphql

We need to consider in our calculations: How many unique attestors who hold a specific attestation have issued a Verification attestation for a given projectId with boolean value & revocation status of:

How many unique attestors who hold a specific attestation have issued a GIVbacks Eligible attestation for a given projectId with boolean value & revocation status of:

Back-end

The back-end will need to detect the aforementioned data as it comes through, assess if a project meets the required criteria then update its status in our DB.

To reiterate, to become Verified a project must have: At least two attestations from unique attestors who hold the required "approved verifier" attestation issued by Giveth that are not revoked.

We'll need a way to check in real-time or very frequently for new eligible attestations made and update a project's status, this could be through a webhook or cronJob or some other service.

The back-end should update the project table and make available via graphQL query:

To become GIVbacks Eligible we can use our existing system in the admin panel.

Project Verification Statuses

We'll have three new statuses related to a project's verification application

If a project has had the toVerify status for over 2 weeks we change their status to rejected and send them the appropriate notifications/emails.

Mandatory Updates

The mandatory updates feature will be applied to givbacks eligible projects instead of verified projects

Status Badges

Apart from the aforementioned UI for making attestations we will also need to update the badges we use on the project cards

We'll need two badges

GIVbacks Calculations

Changes to GIVpower and GIVbacks Calculations will be handled in a separate feature led by @laurenluz

laurenluz commented 5 months ago

I left a comment in the notion @divine-comedian: https://www.notion.so/giveth/Project-Verification-Attestations-94953daeff4f46ddac687484437def75?d=5df28e9c79044e29b8f0f2b4996c461d#763278705a8e4f3ba8c94d150c9aa40c

Let's remove adjusting any "ranks" for GIVpower from the scope of this epic please. And we can cover that after this as part of GIVpower changes.

I can start to define a new epic for it.

jainkrati commented 5 months ago

@MoeNick pls confirm if there are issues created but not linked for this