Skip to content
Audit finding Intermediate

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.

cmichel Follow

Originally disclosed on Code4rena

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:

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”);

kristian-gro (Gro) confirmed

Confirmed and Fix has been implemented in release version.

The original report as published on Code4rena, by cmichel. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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.

More by cmichel

View all

196 more disclosed reports, best first.

More from Gro Protocol

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.