Open howlbot-integration[bot] opened 6 months ago
alcueca marked the issue as not a duplicate
alcueca marked the issue as primary issue
alcueca marked the issue as unsatisfactory: Invalid
Hi @alcueca, is there a reason why this finding was rejected ? This issue was not caught by the bot. This submission shows that due to the fact that the heartbeat for ezETH/ETH is 6hours on Arbitrum and 24 hours on ethereum, the MAX_TIME_WINDOW
chosen would be considered stale for Arbitrum.
SImilar findings that were marked as medium :
alcueca removed the grade
You are right, my mistake here.
alcueca marked the issue as satisfactory
alcueca marked the issue as selected for report
Lines of code
https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/Bridge/L2/Oracle/RenzoOracleL2.sol#L13 https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/Bridge/L2/Oracle/RenzoOracleL2.sol#L52
Vulnerability details
Impact
The stale period 86400 + 60 seconds used for the oracle price validation is too short for some tokens like
ezETH
for example on Arbitrum. This could lead to the protocol consuming stale prices on Arbitrum.Proof of Concept
In both
RenzoOracle
andRenzoOracleL2
, the hearbeat periodMAX_TIME_WINDOW
is set to86400 + 60; // 24 hours + 60 seconds
. In the functionsRenzoOracleL2::getMintRate
andRenzoOracle::lookupTokenValue
, a validation checks sees if the price data fed by Chainlink's price feed aggregators is stale depending if the period of 24 hours + 60 seconds has passed. Example :The problem is that depending on the token and the chain, the same period can be considered too small or too stale.
Let's consider the ezETH/ETH oracles on different chains:
This means that on Arbitrum, 24 hours can be considered too large for the stale period which will cause the function
RenzoOracleL2::getMintRate
to return stale data.Tools Used
Manual review
Recommended Mitigation Steps
It is recommanded to store a mapping that would record the hearbeat parameter for the stale period of each token and for every different chain.
Assessed type
Oracle