Assessment reports>Benqi Oracle>Discussion>Incorrect revert error message

Incorrect revert error message

This is in the BenqiDualOracle::setDeviationThreshold function.

if (newMaxThreshold == 0) revert InvalidAddress();

When the function's uint256 type parameter newThreshold is 0, the function will revert InvalidAddress(), which is inconsistent with the code semantics because newThreshold is not of address type. Consider adding an InvalidnewThreshold error, and when newThreshold is 0, revert InvalidnewThreshold().

This issue has been acknowledged by Chaos Labs, and a fix was implemented in commit 475e51c0.

Zellic © 2025Back to top ↑