Description:Description\
In CvgOracle.sol, _postTreatmentAndVerifyEth() uses bool isStalePrice that returns true if lastUpdateDate + oracleParams.maxLastUpdateAggregator > block.timestamp i.e. price is not stale. The variable should be renamed to isNotStalePrice to better reflect its meaning and prevent future bugs/mistakes by the team.
Attack Scenario\
An serious error could be introduced if a dev checks for false instead of true
Recommendation\
Rename to isNotStalePrice
P.S. should also fix isOracleNotToLow and isOracleNotToHigh for typo to isOracleNotTooLow and isOracleNotTooHigh
Github username: @chewonithard Submission hash (on-chain): 0x04a260b17297f7f32568f55d62e495b35db8f4fcbbeadc031e0a10acc029762c Severity: low
Description: Description\ In CvgOracle.sol,
_postTreatmentAndVerifyEth()
usesbool isStalePrice
that returns true iflastUpdateDate + oracleParams.maxLastUpdateAggregator > block.timestamp
i.e. price is not stale. The variable should be renamed toisNotStalePrice
to better reflect its meaning and prevent future bugs/mistakes by the team.Attack Scenario\ An serious error could be introduced if a dev checks for
false
instead oftrue
Recommendation\ Rename to
isNotStalePrice
P.S. should also fixisOracleNotToLow
andisOracleNotToHigh
for typo toisOracleNotTooLow
andisOracleNotTooHigh