Independence Note: Execute solely using Rust native i128 logic matrices locally.
Context:
Guild treasuries often allocate funds to different sub-pools (e.g., 10% to community, 90% to development). Using basis points (BPS) is the standard for precision.
Objective:
Implement a utility to compute shares based on BPS.
Acceptance Criteria:
Technical Pointers:
- BPS is preferred over percentages in finance to avoid rounding errors when dealing with small amounts.
Independence Note: Execute solely using Rust native
i128logic matrices locally.Context:
Guild treasuries often allocate funds to different sub-pools (e.g., 10% to community, 90% to development). Using basis points (BPS) is the standard for precision.
Objective:
Implement a utility to compute shares based on BPS.
Acceptance Criteria:
10000as the maximum BPS (100%).calculate_share(total_amount, bps) -> i128.Technical Pointers: