Skip to content
Audit finding Advanced

OracleRef assumes backup oracle uses the same normalizer as main oracle

The contract assumed the backup oracle shares the main oracle's scaling factor, but a backup oracle may be a different system with a different normaliser. If the main oracle failed, the backup price could be scaled wrongly, letting users mint or redeem the token at inflated rates.

cmichel Follow

Originally disclosed on Code4rena

Submitted by cmichel

OracleRef.sol#L104

The OracleRef assumes that the backup oracle uses the same normalizer as the main oracle. This generally isn’t the case as it could be a completely different oracle, not even operated by Chainlink.

If the main oracle fails, the backup oracle could be scaled by a wrong amount and return a wrong price which could lead to users being able to mint volt cheap or redeem volt for inflated underlying amounts.

Recommended Mitigation Steps

Should there be two scaling factors, one for each oracle?

ElliotFriedman (Volt) confirmed and commented:

This is a good catch as it exposes some underlying assumptions made about backup oracles; however, we can assume that both oracles will use the same scaling factor and thus we will not need a second value for the backup oracle.


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 code applies a single normaliser to both the main and backup oracle without checking that the backup uses the same scaling.

Impact

If the main oracle fails, the backup price could be mis-scaled, potentially letting users mint the token cheaply or redeem it for inflated underlying amounts; the team argued both oracles will share the same scaling factor.

What the attacker needed

Main oracle fails; backup oracle uses a different scaling factor

The fix

The report suggests a separate scaling factor for each oracle, though the team said it would keep a single shared factor.

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.

An oracle is a service that feeds a price into a smart contract. Prices often need a scaling factor to turn a raw number into a usable value, and this code reused the main oracle's factor for a backup oracle that may not share it. A wrong price then lets people trade the token on unfair terms.

More by cmichel

View all

196 more disclosed reports, best first.

More from Volt Protocol contest

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.