The LibChainlinkOracle
library use FOUR_DAY_TIMEOUT
constant that is set to 345600 (4 days). The duration is 4 time longer that Chainlink
heartbeat which is 86400 (1 day).
The LibWstethEthOracle::getWstethEthPrice
accept lookback
argument and return wstethEthPrice
.
The Chainlink
heartbeat is 86400 (1 day) as you can see on this link :
https://docs.chain.link/data-feeds/price-feeds/addresses?network=ethereum&page=1&search=0x86392dC19c0b719886221c78AB11eb8Cf5c52812
But even when the lookback==0
the function uses FOUR_DAY_TIMEOUT
which is significantly longer than the heartbeat, making the library accept data that may no longer reflect current market conditions, and in volatile markets 4 day window can lead to outdated prices, increasing the risk of outdated prices and price slippage. Also it could lead to inaccurate data especially where precision and decision-making is crucial and can have serious impact on protocol and it's functionality and reliability.
Manual Review
Reduce FOUR_DAY_TIMEOUT
to be more close with Chainlink
heartbeat this will improve relevance of the price data.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.