Skip to content

feat: implement grantee rage quit mechanism for #39#82

Open
edehvictor wants to merge 2 commits intoGrant-Stream:mainfrom
edehvictor:feat/rage-quit-security
Open

feat: implement grantee rage quit mechanism for #39#82
edehvictor wants to merge 2 commits intoGrant-Stream:mainfrom
edehvictor:feat/rage-quit-security

Conversation

@edehvictor
Copy link

Pull Request: feat: implement "Rage Quit" for Grantees - Issue #39

Overview

This PR implements the "Rage Quit" security mechanism in the GrantContract. This feature empowers grantees to exit a paused stream permanently if they feel the pause is unfair. It guarantees the immediate payout of accrued funds and transitions the grant to a terminal state.

Changes

  • Terminal State Logic: Added GrantStatus::RageQuitted to ensure that once a grantee exits, the stream cannot be resumed by the DAO admin.
  • Security Guarding: Modified resume_stream and withdraw functions to explicitly block operations on grants with a RageQuitted status.
  • Immediate Settlement: Integrated 100% payout of vested (accrued) tokens using the token::Client transfer method upon execution of the quit.
  • Fairness Check: Restricted the ability to Rage Quit to only those grants that are currently in a Paused state.

Acceptance Criteria Verification

  • Implement rage_quit(grant_id): New public function added to the core contract.
  • Accrued Funds: Grantee claims 100% of accrued funds immediately.
  • Permanent Termination: The grant cannot be resumed by the admin after this action.

Related Issues

Closes #39

@edehvictor
Copy link
Author

@JerryIdoko, please kindly review

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 this pull request may close these issues.

1 participant