Skip to content

vote, create_proposal, and execute_proposal bypass pause state check in learn-token #498

Closed

Description

@DeFiVC

What

Three governance functions in learn-token do not check the pause state:

  1. vote (lib.rs:1657) -- voters can cast votes during pause
  2. create_proposal (lib.rs:1609) -- admin can create proposals during pause
  3. execute_proposal (lib.rs:1701) -- admin can execute proposals during pause

All three modify state (proposal vote totals, vote records, executed flag).

Why

During an emergency pause, governance operations should be frozen. An admin could create and execute a proposal during pause to take actions (like changing contract parameters) that the pause was meant to prevent. Note: #446 was previously filed and closed for this exact issue, but the code at the current HEAD still lacks the pause checks.

Scope

Add Self::require_not_paused(&env); to each function, after the auth check.

Acceptance Criteria

  • All three functions panic when the contract is paused
  • Tests verify governance is blocked during pause

Technical Context

  • contracts/learn-token/src/lib.rs:1609-1646 -- create_proposal
  • contracts/learn-token/src/lib.rs:1657-1689 -- vote
  • contracts/learn-token/src/lib.rs:1701-1740 -- execute_proposal

Activity

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

    @felixumeh

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

    Hi maintainer, this issue is part of my current study and I would like to work on it. Thank you

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

  3. Peaostrel commented on Sep 30, 2026

    @Peaostrel

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

    i can handle this quickly

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

  4. emmixeryng commented on Sep 30, 2026

    @emmixeryng

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

    Hello maintainer, can I work on this

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

  5. macsonfleek commented on Sep 30, 2026

    @macsonfleek

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

    Hi Maintainer! Please assign me to this issue, I can fix it properly before 24hrs

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

  6. 339mon commented on Sep 30, 2026

    @339mon

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

    Hi, kindly assign, i would love to fix

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

  7. dammy-lab commented on Sep 30, 2026

    @dammy-lab

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

    I can work on this issue because it is a focused Rust smart-contract change involving pause-state enforcement, authorization checks, state-changing governance functions, and regression testing. This issue is especially suitable because the required change is small and well-defined, while the tests ensure the emergency pause actually provides the intended protection.

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

  8. MorsH14 commented on Sep 30, 2026

    @MorsH14

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

    I'll love to work on this issue asap

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

  9. optimist82 commented on Sep 30, 2026

    @optimist82

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

    Hi. I have reviewed this issue and would like to work on it....ETA 3hr

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

  10. Richard-tobi commented on Sep 30, 2026

    @Richard-tobi

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

    Hi maintainer, please assign me this issue, can get it done asap

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

  11. ravimahatonp commented on Oct 3, 2026

    @ravimahatonp

    Hello team,

    I looked into vote, create_proposal, and execute_proposal bypass pause state check in learn-token and have an implementation approach ready.

    Technical outline:

    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.

    I can deliver a clean, tested PR within 24 hours. Please assign!

  12. Marvy247 commented on Oct 19, 2026

    @Marvy247
    Contributor

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

    can i fix this please?

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

  13. Mikewaves7 commented on Oct 19, 2026

    @Mikewaves7

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

    Hi Maintainer, I would like to work on this task
    Kindly assign

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

  14. drips-wave commented on Oct 19, 2026

    @drips-wave

    Congratulations, @Marvy247! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @Marvy247: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  15. grantfox-oss commented on Oct 19, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @Marvy247's PR #657 was approved and merged by @DeFiVC.

    🏆 @Marvy247: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,342 total points). Track your full progress on GrantFox.

    👏 Great work, @Marvy247! Keep contributing to ChainLearnOfficial.

  16. drips-wave commented on Oct 19, 2026

    @drips-wave

    This issue has been completed by @Marvy247 as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @Marvy247: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions