You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
batch_claim_reward bypasses pause check while claim_reward checks it #497
batch_claim_reward (learn-token lib.rs:717) does not call Self::require_not_paused(&env), while the single claim_reward (lib.rs:634) does. This means batch reward claims can mint tokens even when the contract is emergency-paused.
// claim_reward checks pause:pubfnclaim_reward(...){Self::require_not_paused(&env);// line 634
...}// batch_claim_reward does NOT:pubfnbatch_claim_reward(...){
learner.require_auth();// line 723 -- no pause check
...}
Why
batch_claim_reward mints tokens just like claim_reward. If the contract is paused to stop token minting (e.g., due to a discovered exploit), batch_claim_reward remains functional and can still mint tokens.
Scope
Add Self::require_not_paused(&env); at line 723, before learner.require_auth().
Acceptance Criteria
batch_claim_reward panics when the contract is paused
Test verifies batch claims are blocked during pause
I have submitted a pull request fixing this issue in #516. batch_claim_reward now calls Self::require_not_paused(&env) before learner auth, with unit tests passing green.
Activity
MorsH14 commentedon Sep 30, 2026
@MorsH14 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @MorsH14 to this issue.
dvreolv-ux commentedon Sep 30, 2026
@dvreolv-ux has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @dvreolv-ux to this issue.
demola13777 commentedon Sep 30, 2026
@demola13777 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @demola13777 to this issue.
Tinu-ola commentedon Sep 30, 2026
@Tinu-ola has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Tinu-ola to this issue.
339mon commentedon Sep 30, 2026
@339mon has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @339mon to this issue.
Sophie2704 commentedon Sep 30, 2026
@Sophie2704 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Sophie2704 to this issue.
Husinat commentedon Sep 30, 2026
@Husinat has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Husinat to this issue.
Demilade10 commentedon Sep 30, 2026
@Demilade10 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Demilade10 to this issue.
lmduy2612 commentedon Oct 2, 2026
I have submitted a pull request fixing this issue in #516.
batch_claim_rewardnow callsSelf::require_not_paused(&env)before learner auth, with unit tests passing green.Ranjeet2063 commentedon Oct 5, 2026
Hi maintainers,
I reviewed this issue and would like to contribute the fix.
Technical outline:
Please assign this to me if the plan looks good. Thanks!