Skip to content

fix(rewards-program): make CloseDirectRecipient permissionless when fully claimed#35

Open
dev-jodee wants to merge 2 commits intomainfrom
fix/close-recipient-permissionless
Open

fix(rewards-program): make CloseDirectRecipient permissionless when fully claimed#35
dev-jodee wants to merge 2 commits intomainfrom
fix/close-recipient-permissionless

Conversation

@dev-jodee
Copy link
Copy Markdown
Collaborator

Summary

  • Removes the recipient signer requirement from CloseDirectRecipient
  • The processor already gates closing on claimed_amount >= total_amount, so the signer was redundant
  • Previously only the recipient could initiate close, but rent goes to original_payer — nobody was incentivized to call it
  • Now anyone can trigger the close once the recipient has fully claimed their allocation
  • Updates IDL: recipient account no longer marked as signer

Audit finding: #4

Test plan

  • just build
  • cargo test -p rewards-program --lib
  • cargo test -p tests-rewards-program test_close_direct_recipient --lib

…ully claimed

Remove the recipient signer requirement from CloseDirectRecipient. The
processor already gates closing on fully-claimed status, so the signer
check was redundant. Previously only the recipient could close, but
rent goes to original_payer — nobody was incentivized to call it.
Now anyone can trigger the close once the recipient has fully claimed.
…ipient

The recipient account is no longer a signer in the IDL, so the
generated client expects Address instead of TransactionSigner.
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