Fixed hearbeat used for price validation is too stale for some tokens
The oracle price validation uses a fixed stale period of 24 hours plus 60 seconds, which is too long for tokens like ezETH on Arbitrum where the price feed updates every 6 hours. This could cause the protocol to consume stale prices.
Submitted by Maroutis, also found by ZanyBonzy, ilchovski, and NentoR
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 and RenzoOracleL2, the hearbeat period MAX_TIME_WINDOW is set to 86400 + 60; // 24 hours + 60 seconds. In the functions RenzoOracleL2::getMintRate and RenzoOracle::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 :
function getMintRate() public view returns (uint256, uint256) {
(, int256 price, , uint256 timestamp, ) = oracle.latestRoundData();
if (timestamp < block.timestamp - MAX_TIME_WINDOW) revert OraclePriceExpired();
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:
- On Ethereum, the oracle will update the price data every
~24 hours. - On Arbitrum, the oracle will update the price data every
~6 hours. - On Linea, the oracle will update the price data every
24 hours.
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.
Recommended Mitigation Steps
It is recommended 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
jatinj615 (Renzo) acknowledged
Note: For full discussion, see here.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the stale period is hard-coded as a single constant instead of being set per token and per chain according to each feed's actual heartbeat.
Impact
The protocol could consume stale prices on Arbitrum, which may lead to incorrect minting rates.
What the attacker needed
None
The fix
It should be fixed by storing a mapping that records the heartbeat parameter for the stale period of each token and for every different chain.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A price oracle is a service that gives a blockchain program the current price of an asset. This report says the program waits too long before deciding a price is out of date, so it might use an old price that no longer matches the market.