Open dkent600 opened 2 years ago
I introduced this bug when coding to avoid another issue where bignumbers were underflowing when typing small fractions into the funding amount in the LBP dashboard.
The bug is actually in the native javascript library, in toFixed
, which adds garbage at the 17 and 18 decimals.
The fix is to eliminate use of toFixed
and use a different algorithm.
When I create an LBP with default weights, sign it, then try to fund/initialized it, on the initialize step it fails with the UI error "Normalized weight invariant", a Balancer error which means "the normalized weights don't sum to ONE". They should sum to 100.