Skip to content

execute_proposal succeeds with zero votes -- no quorum or minimum vote check #503

Open

Description

@DeFiVC

What

execute_proposal (learn-token lib.rs:1701) does not check if any votes were cast. If no one votes on a proposal, all vote_totals are 0, and the function still marks the proposal as executed with winning_choice = 0 and winning_votes = 0.

Why

A proposal that received zero votes should not be executable. This allows an admin to create a proposal, wait for the voting period to end, and execute it with a "winner" that no one voted for. This undermines the governance mechanism.

Scope

Add a check after the tally loop (after line 1725):

if winning_votes == 0 {
    panic!("no votes cast");
}

Acceptance Criteria

  • execute_proposal panics if no votes were cast
  • Test verifies zero-vote proposals cannot be executed

Technical Context

  • contracts/learn-token/src/lib.rs:1701-1733 -- execute_proposal
  • contracts/learn-token/src/lib.rs:1716-1725 -- tally loop (no quorum check)

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. Isaacayomide28 commented on Sep 30, 2026

    @Isaacayomide28

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

    I want to work on this issue, assign me

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

  3. Obito-2222 commented on Sep 30, 2026

    @Obito-2222

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

    Hi Maintainer,

    I’m interested in taking ownership of this issue and would appreciate the opportunity to work on it if it is still available. I’ve carefully reviewed the issue requirements and have a clear understanding of the scope, expected outcome, and implementation approach.

    I’m confident I can execute the task efficiently and deliver a clean, well-tested, and maintainable solution in accordance with the project’s standards and contribution guidelines. I’m also available to prioritize this issue and aim to have the implementation completed within 12 hours of being assigned.

    If the issue is still unassigned, I’d be grateful if you could assign it to me. I’m ready to get started immediately.

    Thank you for your time and consideration.

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

  4. darkwalker2 commented on Sep 30, 2026

    @darkwalker2

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

    Hi Maintainer, I have the necessary skillset to resolve this issue, I am a full stack developer I would really like to contribute on this project, as I clearly understand what is needed to be done.

    Expect results in 1-4hours

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

  5. Luna-netty commented on Sep 30, 2026

    @Luna-netty

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

    Hello! I’d be happy to contribute to this task.

    I’m comfortable picking up unfamiliar codebases, tracing existing behavior, and making focused changes without disrupting other functionality. I’ll take ownership of the implementation from understanding the requirements through testing and final verification.

    I’d appreciate the opportunity to work on it.

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

  6. umarhussainiagaie-bot commented on Sep 30, 2026

    @umarhussainiagaie-bot

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

    Assigned this issue for I can fix the issue

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

  7. TheHalalHunter commented on Sep 30, 2026

    @TheHalalHunter

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

    Hi maintainer
    I’d love to help out with this issue. I’ve checked the current codebase/documentation and know exactly what needs to be updated to make this clearer. I will ensure everything aligns perfectly with your existing contribution guidelines.

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

  8. joelatabs commented on Sep 30, 2026

    @joelatabs

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

    Dear Maintainer,

    I’d be glad to take on this issue and work toward resolving it. I have relevant experience troubleshooting and addressing similar issues, and I’m confident I can contribute effectively to getting this resolved.

    Thank you for the opportunity. 🙏

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

  9. Saber1Y commented on Sep 30, 2026

    @Saber1Y

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

    Hi maintainer,I'd like to take this issue, Here's my solution as the issues asks:

    I’ll add a guard in "execute_proposal" after the tally loop to reject proposals with zero votes, using the specified "no votes cast" panic. I’ll also add a regression test confirming that a zero-vote proposal cannot be executed.

    Please assign to me I'll start immediately and open pr within 24 hours

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

  10. 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.

    Ill love to work on this project professionally, kindly assign

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

  11. Ranjeet2063 commented on Sep 30, 2026

    @Ranjeet2063

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

    Ready to ship immediately! Focus: Smart Contract & Systems Architecture (Rust / Soroban / Web3) for "execute_proposal succeeds with zero votes -- no qu". Plan: Implement idiomatic Rust logic with strict authorization checks, gas-efficient storage patterns, and defensive error handling. Guaranteed 100% green CI & test coverage. Zero hand-holding. SLA: clean PR in 1-2h. Track record: 166+ merged PRs in Web3 (OSS score 83, Top 2%).

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

  12. fauztech05 commented on Sep 30, 2026

    @fauztech05

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

    Hi Maintainer, I’d like to work on this issue. I have experience handling similar tasks and can start immediately

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

  13. lmduy2612 commented on Oct 2, 2026

    @lmduy2612

    Submitted PR #512 with the zero-vote check in execute_proposal (if winning_votes == 0 { panic!("no votes cast"); }) and corresponding unit test test_execute_proposal_fails_with_zero_votes. All 79 token tests passing green.

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 language

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions