Chainlink pricer is using a deprecated API
The price oracle contract used Chainlink's deprecated latestAnswer function to fetch asset prices. If Chainlink stops supporting that API or returns stale data, the contract could receive an outdated or failing price feed.
Submitted by cccz, also found by 0x1f8b, 0xDjango, 0xNazgul, GimelSec, hake, IllIllI, kebabsec, oyc_109, Ruhum, sorrynotsorry, throttle, and tintin
According to Chainlink’s documentation, the latestAnswer function is deprecated. This function might suddenly stop working if Chainlink stop supporting deprecated APIs. And the old API can return stale data.
Proof of Concept
PriceOracleImplementation.sol#L29-L30
Recommended Mitigation Steps
Use the latestRoundData function to get the price instead. Add checks on the return data with proper revert messages if the price is stale or the round is uncomplete https://docs.chain.link/docs/price-feeds-api-reference/
bunkerfinance-dev (bunker.finance) confirmed
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 relied on a deprecated oracle function that returns a single value without freshness or round-completion checks.
Impact
The oracle could return stale prices or stop working entirely, which may lead to incorrect pricing in the protocol.
What the attacker needed
Protocol relies on Chainlink price feeds
The fix
The contract should use latestRoundData and check that the returned price is fresh and the round is complete, reverting with a clear message otherwise.
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 smart contract often needs to know the current price of an asset, so it asks an outside service called an oracle. This contract asked the oracle using an old, deprecated way of requesting the price, which may stop working or give an out-of-date answer. If the price is wrong, anything that depends on it, such as loans or trades, can be calculated incorrectly.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.