Hunt prep
Before you test Forte: Float128 Solidity Library
What 6 disclosed reports say about Forte: Float128 Solidity Library: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Smart contracts lesson | 2 | 0 | – | – | $0 |
| DoS lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Early 72-digit adjustment in sqrt will lead to incorrect result exponent calculation
The exponent halving should be moved before the mantissa digit adjustment, as shown in the provided diff.
Disclosed
-
Sqrt function silently reverts the entire control flow when a packed float of 0 value is passed
The function should return zero instead of using stop().
Disclosed
-
Inconsistent mantissa size auto-scaling between packedFloat encoding and calculations will lead to unacceptable rounding errors
The same auto-scaling rule should be enforced for both encoding and calculation, either by dropping the extra encoding rules or by adding them to the arithmetic operations.
Disclosed
-
Natural logarithm function silently accepts invalid non-positive inputs
The function should be fixed by adding explicit checks that revert when the input is zero or negative.
Disclosed
-
Unwrapping while equating inside the eq function fails to account for the set L_MATISSA_FLAG
The eq function should normalise the values before comparing, for example by decoding both, removing trailing zeros from the mantissas, and comparing the normalised mantissa and exponent.
Disclosed
-
Precision loss in toPackedFloat function when mantissa is in range ( MAX_M_DIGIT_NUMBER , MIN_L_DIGIT_NUMBER )
The format selection should also consider the number of digits in the mantissa, for example by forcing the large format when the digit count exceeds the medium limit.
Disclosed