Category: Coding Mistakes
Incorrect size for ABS_MAX_INIT_PRICE
Informational Impact
Informational Severity
N/A Likelihood
Description
The following error message suggests that ABS_MAX_INIT_PRICE should be the maximum uint216 value:
if(minInitPrice_ > ABS_MAX_INIT_PRICE) revert MinInitPriceExceedsUint216();However, according to its definition, it holds the uint192 maximum value:
uint256 constant public ABS_MAX_INIT_PRICE = type(uint192).max; // chosen so that initPrice * priceMultiplier does not exceed uint256Impact
This finding simply documents an inconsistency in the code.
Recommendations
Consider renaming the error or changing the value of ABS_MAX_INIT_PRICE.
Remediation
This issue has been acknowledged by Euler Labs, and a fix was implemented in commit 8c2767f5↗.