Skip to content
Audit finding Intermediate

PendleLPOracle::_fetchAndValidate uses Chainlink’s deprecated answeredInRound

The PendleLPOracle contract's price-fetching function relied on Chainlink's deprecated answeredInRound field when validating oracle responses. This could cause the contract to accept or reject rounds incorrectly, leading to invalid or wrong prices being used.

0xAlix2 Follow with 0xAlix2, Bauchibred and 31 others

Originally disclosed on Code4rena

Submitted by 0xAlix2, also found by 0xAlix2, peanuts (1, 2), Bauchibred, Rhaydden, 0xhacksmithh, unRekt, inh3l, atoko, 0xjoaovpsantos, Kaysoft (1, 2, 3), lightoasis, jolah1, josephxander, web3km, 0xINFINITY (1, 2, 3), Spearmint, zhaojohnson, Bigsam, 0xBugSlayer, Infect3d, Sungyu, yashar (1, 2), emmac002, pks_, y0ng0p3, EPSec, grearlake, 0xspryon, 0XRolko, 0xAadi, Damola0x, 4B, Sparrow, crypticdefense, NexusAudits, pkqs90 (1, 2), novamanbg, and BiasedMerc

PendleLPOracle uses Chainlink to get the price of Pendle’s underlying asset in ETH; this is done using _fetchAndValidate. That function uses answeredInRound, which is deprecated according to Chainlink docs.

answeredInRound: Deprecated - Previously used when answers could take multiple rounds to be computed.

This results in invalid/wrong prices from Chainlink.

Recommended Mitigation Steps

Remove the usage of answeredInRound in PendleLPOracle::_fetchAndValidate.

Assessed type

Oracle

0xtj24 (LoopFi) confirmed


The original report as published on Code4rena, by 0xAlix2. 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 price validation logic checks a Chainlink response field that has been deprecated and is no longer reliably populated.

Impact

The contract could receive invalid or wrong prices from Chainlink, which may affect any logic that depends on the oracle's output.

What the attacker needed

Oracle returns a round with stale answeredInRound

The fix

The use of answeredInRound in PendleLPOracle::_fetchAndValidate should be removed.

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 asks an outside service, called an oracle, for the current price of an asset. Chainlink is a common oracle, and its answers include several fields; one of them, answeredInRound, is no longer maintained. Relying on a field that is no longer meaningful can make the contract misjudge whether a price is fresh, so it may act on a bad price.

More by 0xAlix2

View all

39 more disclosed reports, best first.

More from LoopFi

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.