QA Report #177
Labels
bug
Something isn't working
grade-b
Q-03
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
The function 'findFirstBin' in TreeMath.sol checks if the last bin for level 2 and level 1, but missing check for level 0.
Functionally there will be no problem,since coincidentally in this case an arithmetic overflow/underflow error will occur while calling function 'closestBit'. But it will revert with an unexpected reason rather than 'TreeMath__ErrorDepthSearch'.
https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/TreeMath.sol#L56
The text was updated successfully, but these errors were encountered: