Skip to content

Fix execute_proposal to reject zero-vote proposals - #507

Closed
SrvFernandes wants to merge 1 commit into
ChainLearnOfficial:mainfrom
SrvFernandes:fix/execute-proposal-zero-votes-check-munw0lpd
Closed

SrvFernandes wants to merge 1 commit into
ChainLearnOfficial:mainfrom
SrvFernandes:fix/execute-proposal-zero-votes-check-munw0lpd

Conversation

@SrvFernandes

Copy link
Copy Markdown

Closes #503

Summary

Adds a check in execute_proposal to panic if no votes were cast, preventing execution of proposals with zero participation.

Changes

  • Added winning_votes == 0 check after tally loop in execute_proposal (line ~1726)
  • Added test case to verify zero-vote proposals cannot be executed

Testing

  • New test validates panic when executing a proposal with no votes

Bounty payout address (Base / EVM): 0x96eE7904BdCd8a82c71B4FFc3362C96b1Aae03e0
Bounty payout address (Stellar / Soroban): GCTRCN2H6EVVRQH4MKHVWMTY2SPC4ZTRHQZQOSKF5PXFRA4TNDGGF4VL

Signed-off-by: Sérgio <sveronezfernandes@gmail.com>
@DeFiVC DeFiVC closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants