Repository navigation
revoke_delegation is blocked during pause, preventing learners from revoking malicious delegates #492
Description
Activity
- addedbugSomething isn't workingSomething isn't workingrustRust languageRust languagesecuritySecurity concernSecurity concernStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programmediumFunctionality impaired but workaround exists, edge case, partial featureFunctionality impaired but workaround exists, edge case, partial feature
on Sep 30, 2026 @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.
@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.
@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.
@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.
@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.
Resolved via PR #518. Removed the pause check from
revoke_delegationso learners can unbind delegates during an emergency pause, while keepingdelegate_progresspaused, with unit and integration tests passing.Hi maintainers,
I reviewed this issue and would like to contribute the fix.
Plan:
- Audit storage layout and state invariants ensuring strict auth guards.
- Implement deterministic state transitions with safe checked arithmetic.
- Add hermetic unit and regression tests covering authorized, unauthorized, and boundary edge cases.
- Profile instruction and CPU/gas limits under Soroban host environment.
Please assign this to me if the plan looks good. Thanks!
What
revoke_delegation(progress-tracker lib.rs:1889) callsSelf::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_forall 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);fromrevoke_delegation(line 1890). This makes revocation always available, matching the principle that safety-critical operations should not be blocked during emergencies.Acceptance Criteria
revoke_delegationsucceeds even when the contract is pauseddelegate_progressremains blocked during pause (no change)Technical Context
contracts/progress-tracker/src/lib.rs:1889-1899--revoke_delegationcontracts/progress-tracker/src/lib.rs:1857-1870--delegate_progress(should stay paused)