-
Notifications
You must be signed in to change notification settings - Fork 0
Testing: Add test for quadratic voting cost calculation #54
Copy link
Copy link
Closed
Labels
Description
Summary
The quadratic voting mechanism (cost = weight squared) is the project's core innovation and should have thorough dedicated tests. These tests should verify:
- vote-weight of 1 costs 1 STX
- vote-weight of 5 costs 25 STX
- vote-weight of 10 costs 100 STX
- vote-weight of 0 is handled (should be rejected)
- Large vote weights do not cause overflow
- Cost is properly deducted from stake (once the deduction bug is fixed)
- Insufficient stake for vote cost is properly rejected
Impact
High - Core mechanism correctness must be verified.
Reactions are currently unavailable