Skip to content

[RewardPool] Revoke approved spender access #92

Description

@Kaylahray

Description

The RewardPool can add approved spender contracts, but it also needs an admin-controlled revoke path so compromised or deprecated spenders can be removed immediately.

User Story

As a Protocol Admin,
I want to revoke a spender's authorization,
so that outdated or compromised contracts can no longer distribute rewards.

Requirements and Context

  • Files: contracts/reward-pool/src/lib.rs, contracts/reward-pool/src/types.rs, contracts/reward-pool/src/test.rs
  • Add remove_approved_spender(env: Env, admin: Address, spender: Address)
  • Require admin auth and stored-admin verification
  • Ensure distribute_reward fails immediately for revoked spenders

Suggested Implementation

// IN FUNCTION: remove_approved_spender(env: Env, admin: Address, spender: Address)
// 1. admin.require_auth();
// 2. verify admin matches stored admin;
// 3. env.storage().persistent().set(&DataKey::Spender(spender), &false);
// 4. emit spender-revoked event.

Acceptance Criteria

  • Revoked spenders can no longer call distribute_reward successfully.
  • Other approved spenders remain unaffected.
  • Revocation is idempotent or otherwise documented clearly.

Submission Guidelines

  • Branch: feat/revoke-approved-spender
  • Depends on: RewardPool add_approved_spender function
  • PR: feat(reward-pool): add approved spender revocation

Activity

  1. Martins-594 commented on Jul 21, 2026

    @Martins-594

    Hi, I'd like to work on this issue. I've gone through the description and acceptance criteria and I'm confident I can deliver it. I'll make sure every acceptance criterion is met and submit a clean, tested PR. Please assign it to me.

  2. malaysiaonelove commented on Jul 21, 2026

    @malaysiaonelove

    Hi maintain,I will love to work on this issue,I have an experience and I have already reviewed the issue please assigned me to it and I will give a good result.

  3. chijioke003 commented on Jul 29, 2026

    @chijioke003
    Contributor

    Hi maintainer, can you assign this issue to me

  4. grantfox-oss commented on Jul 29, 2026

    @grantfox-oss

    🦊 GrantFox — @chijioke003 has been assigned to this issue as part of the Official Campaign | FWC26 campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #92)
    2. Your PR will be reviewed by the learnault maintainers

    Good luck! Track your progress on GrantFox.

  5. grantfox-oss commented on Jul 29, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!

    @chijioke003's PR #105 was approved and merged by @Kaylahray.

    🏆 @chijioke003: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (45 total points). Track your full progress on GrantFox.

    👏 Great work, @chijioke003! Keep contributing to learnault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions