priceChange calculation of Line 73 of BoundedStepwiseExponentialPriceAdapter.sol would give error if a negative integer result is gotten. Since priceChange could be on the positive or negative side, this would lead to a precision error in next series of calculations or priceChange usage
Topmark
medium
Precision Lose Possibility.
Summary
priceChange calculation of Line 73 of BoundedStepwiseExponentialPriceAdapter.sol would give error if a negative integer result is gotten. Since priceChange could be on the positive or negative side, this would lead to a precision error in next series of calculations or priceChange usage
Detail
From the calculation @ https://github.com/sherlock-audit/2023-06-Index/blob/main/index-protocol/contracts/protocol/integration/auction-price/BoundedStepwiseExponentialPriceAdapter.sol#L73 , using uint256 priceChange would cause precision loss if the priceChange is negative
Tool used
Solidity, Hardhat
Recommendation
int256 should be used instead of unint256 for priceChange Variable