File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/mechanisms/voting-strategy Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ abstract contract ProperQF {
2525 /// delta update pattern of _processVoteUnchecked; only per-project readback is lossy.
2626 Quant internal constant CONTRIBUTIONS_SCHEME = Quant.wrap (uint16 ((96 << 8 ) | 32 ));
2727
28- /// @notice Packing scheme for sumSquareRoots: stored as uint160, shift=0 (no quantization).
29- /// @dev Max value: 2^160 - 1 ~= 1.46e48. No quantization because QF math (S_j^2) is
30- /// sensitive to rounding and sumSquareRoots operates in a sqrt-compressed range
31- /// that needs full resolution per bit.
28+ /// @notice Bounds-check wrapper for sumSquareRoots: stored as uint160, no quantization (shift=0).
29+ /// @dev Max value: 2^160 - 1 ~= 1.46e48. Shift is 0 so encode/decode are identity functions;
30+ /// the Quant wrapper is used solely for the overflow check in encode() and to keep
31+ /// _readProject/_writeProject symmetric with CONTRIBUTIONS_SCHEME.
32+ /// No quantization because QF math (S_j^2) is sensitive to rounding and sumSquareRoots
33+ /// operates in a sqrt-compressed range that needs full resolution per bit.
3234 Quant internal constant SQUARE_ROOTS_SCHEME = Quant.wrap (uint16 (160 << 8 ));
3335
3436 // Custom Errors
You can’t perform that action at this time.
0 commit comments