Skip to content

Testing: Add test for quadratic voting cost calculation #54

@Mosas2000

Description

@Mosas2000

Summary

The quadratic voting mechanism (cost = weight squared) is the project's core innovation and should have thorough dedicated tests. These tests should verify:

  1. vote-weight of 1 costs 1 STX
  2. vote-weight of 5 costs 25 STX
  3. vote-weight of 10 costs 100 STX
  4. vote-weight of 0 is handled (should be rejected)
  5. Large vote weights do not cause overflow
  6. Cost is properly deducted from stake (once the deduction bug is fixed)
  7. Insufficient stake for vote cost is properly rejected

Impact

High - Core mechanism correctness must be verified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions