Skip to content

revoke_delegation is blocked during pause, preventing learners from revoking malicious delegates #492

Description

@DeFiVC

What

revoke_delegation (progress-tracker lib.rs:1889) calls Self::require_not_paused(&env) at line 1890, which means learners cannot revoke a delegation while the contract is emergency-paused.

Why

If a delegate address becomes compromised or acts maliciously, the emergency pause is exactly when a learner would most need to revoke delegation. Blocking revocation during pause leaves learners stuck with a potentially malicious delegate who can still submit progress, quiz scores, and retakes on their behalf (since complete_module_for, submit_quiz_score_for, retake_quiz_for all check pause too -- but once unpaused, the malicious delegate can immediately act).

The pause mechanism should freeze state-mutating operations that ADD risk, not operations that REMOVE risk. Revoking a delegation reduces risk and should be allowed at all times.

Scope

Remove Self::require_not_paused(&env); from revoke_delegation (line 1890). This makes revocation always available, matching the principle that safety-critical operations should not be blocked during emergencies.

Acceptance Criteria

  • revoke_delegation succeeds even when the contract is paused
  • delegate_progress remains blocked during pause (no change)
  • Test verifies revocation works during pause

Technical Context

  • contracts/progress-tracker/src/lib.rs:1889-1899 -- revoke_delegation
  • contracts/progress-tracker/src/lib.rs:1857-1870 -- delegate_progress (should stay paused)

Activity

  1. added
    bugSomething isn't working
    rustRust language
    securitySecurity concern
    Stellar WaveIssues in the Stellar wave program
    mediumFunctionality impaired but workaround exists, edge case, partial feature
    on Sep 30, 2026
  2. Goodness-0x commented on Sep 30, 2026

    @Goodness-0x

    @Goodness-0x has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi, I'd like to work on this issue.

    I've gone through the requirements, understand the problem, and have the skills needed to implement a solution.

    Could you please assign it to me?

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Goodness-0x to this issue.

  3. codetamer commented on Sep 30, 2026

    @codetamer

    @codetamer has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello maintainer, I'd love to take care of this! Ready to start immediately and deliver clean code with passing tests within a few hours. Please assign me! Thanks!

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @codetamer to this issue.

  4. LuckyBeekeper commented on Sep 30, 2026

    @LuckyBeekeper

    @LuckyBeekeper has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello, I would be glad to contribute to this issue. I have gone through the task and would appreciate the opportunity to work on it. Thank you for considering my application.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @LuckyBeekeper to this issue.

  5. Shindy-Ship commented on Sep 30, 2026

    @Shindy-Ship

    @Shindy-Ship has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello, I’ve reviewed the requirements and understand the goal of the issue. I’m willing and prepared to contribute to its resolution.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Shindy-Ship to this issue.

  6. Adexxytemi commented on Sep 30, 2026

    @Adexxytemi

    @Adexxytemi has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi Maintainer, I would like to work on this issue. Please assign this issue to me so I can get started.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Adexxytemi to this issue.

  7. lmduy2612 commented on Oct 2, 2026

    @lmduy2612

    Resolved via PR #518. Removed the pause check from revoke_delegation so learners can unbind delegates during an emergency pause, while keeping delegate_progress paused, with unit and integration tests passing.

  8. Ranjeet2063 commented on Oct 3, 2026

    @Ranjeet2063

    Hi maintainers,

    I reviewed this issue and would like to contribute the fix.

    Plan:

    1. Audit storage layout and state invariants ensuring strict auth guards.
    2. Implement deterministic state transitions with safe checked arithmetic.
    3. Add hermetic unit and regression tests covering authorized, unauthorized, and boundary edge cases.
    4. Profile instruction and CPU/gas limits under Soroban host environment.

    Please assign this to me if the plan looks good. Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbugSomething isn't workingmediumFunctionality impaired but workaround exists, edge case, partial featurerustRust languagesecuritySecurity concern

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions