Usage of deprecated ChainLink API in Buoy3Pool
The Buoy3Pool oracle wrappers use a deprecated Chainlink API that can return stale price data. An attacker could exploit stale prices to manipulate the pool or cause financial loss.
Submitted by cmichel, also found by 0xRajeev and adelamo_
The Chainlink API (latestAnswer) used in the Buoy3Pool oracle wrappers is deprecated:
This API is deprecated. Please see API Reference for the latest Price Feed API. Chainlink Docs
It seems like the old API can return stale data. Checks similar to that of the new API using latestTimestamp and latestRoundare are needed, as this could lead to stale prices according to the Chainlink documentation:
- under current notifications: “if answeredInRound < roundId could indicate stale data.”
- under historical price data: “A timestamp with zero value means the round is not complete and should not be used.”
Recommend adding checks similar to latestTimestamp and latestRoundare
(
uint80 roundID,
int256 price,
,
uint256 timeStamp,
uint80 answeredInRound
) = chainlink.latestRoundData();
require(
timeStamp != 0,
“ChainlinkOracle::getLatestAnswer: round is not complete”
);
require(
answeredInRound >= roundID,
“ChainlinkOracle::getLatestAnswer: stale data”
);
require(price != 0, "Chainlink Malfunction”);
Confirmed and Fix has been implemented in release version.
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 contract used the deprecated latestAnswer function without checking the timestamp or round completeness, allowing stale prices.
Impact
Stale prices could lead to incorrect valuations and potential financial loss, though the report does not specify a concrete exploit.
What the attacker needed
None
The fix
The fix was implemented in a release version, adding checks for timestamp and round completeness.
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.
This report is about a smart contract that gets price information from an oracle (a service that provides external data). The contract used an old way to ask for the price, which might give an outdated number. If the price is wrong, someone could take advantage of it to steal funds or cause problems.