gitcoinco / passport

Passport allows users to prove their identity through a secure, decentralized UI
Other
937 stars 449 forks source link

Automated Proposal of Gnosis Safe Transactions for Address Duplication Slashing #2270

Open erichfi opened 4 months ago

erichfi commented 4 months ago

User Story:

As a system administrator of the Gitcoin platform, I want to propose Gnosis Safe transactions automatically for slashing stakes associated with duplication events, So that I can streamline the process of managing and mitigating fraudulent activities within the Gitcoin staking system. This is part two of the initiative to automate tracking and management of duplication events, with the first part focusing on identifying and compiling addresses for slashing (referenced in issue #2018).

Acceptance Criteria

Automated Proposal of Gnosis Safe Transactions for Slashing: GIVEN a list of addresses/stakes has been compiled for slashing due to duplication events, WHEN the system identifies the need to initiate the slashing process, THEN it should automatically propose the corresponding transactions in Gnosis Safe for approval.

Secure and Efficient Transaction Management: GIVEN a transaction has been proposed in Gnosis Safe, WHEN awaiting approval, THEN the system should ensure the transaction is prepared with all necessary security checks to prevent errors or malicious activity.

Approval Notification System: GIVEN a slashing transaction has been proposed in Gnosis Safe, WHEN the transaction is awaiting approval, THEN stakeholders should be notified to review and approve the transaction in a timely manner.

Product & Design Links:

Related Spike: https://github.com/gitcoinco/passport/issues/2173

Tech Details:

Open Questions:

Notes/Assumptions:

nutrina commented 4 months ago

Regarding "Secure and Efficient Transaction Management:" - this is basically covered by Gnosis Safe. Regarding "Automated Proposal of Gnosis Safe Transactions for Slashing" - this proposal should happen in the cronjob, after the list of addresses is compiled.

We should however implement a way to check that the slash transaction has been executed or not.

lucianHymer commented 2 months ago

Here's a typescript util file for proposing gnosis transactions: https://github.com/gitcoinco/id-staking-v2/blob/main/scripts/utils/safe.ts used here: https://github.com/gitcoinco/id-staking-v2/blob/30597dcece6a5aed0ddc203f8ff79353a894264f/scripts/slash.ts#L16