Skip to content

Add governance voting hook so share BPS doubles as voting weight on issuer proposals #458

Description

@thlpkee20-wq

Description

Many revenue-share offerings grant voting rights proportional to shares. Add a lightweight propose / cast_vote / tally flow keyed on offering_id, using current holder share BPS as voting weight at proposal-snapshot block.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: Revora-Contracts/src/lib.rs
  • Voting weight must be snapshotted at proposal creation, not at vote-cast time

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/governance-voting-hook
  • Implement changes
    • Add Proposal { id, offering_id, snapshot_period, end_ts, for_bps, against_bps }
    • Add propose, cast_vote(proposal_id, for_), tally(proposal_id)
    • Reject votes from blacklisted holders
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • cargo test --all
  • Cover edge cases
    • Double-vote attempt must be rejected with AlreadyVoted
  • Include test output and security notes

Example commit message

feat: add governance voting hook weighted by snapshot share BPS

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions