QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: low
Invalid

MultiHopOracle Setup Could Lead To Losses

Summary

The MultiHopOracle works by having internally N oracle feed by which it hops. For it to work feeds should be like:

1. A -> B
2. B -> C
3. C -> D
4. D -> ...

If this continuity is broken somewhere the whole calculation will be wrong.

However, it is never checked if every next feed/hop is connected to the previous one (whether the quote token of the previous feed is equal to the base token of the current one).

This can easily be missed out and wrong input data can be easily provided without a way to see that the information is wrong.

Vulnerability Details

Let's have the following MultiHopOracle setup:

1. A -> B
2. C -> D
3. B -> C

As we can see the right feeds are used but their order is incorrect. This will lead to a completely wrong calculation of price and can be dangerous to use as it will lead to losses.

Impact

Wrong oracle results and losses.

Tools Used

Manual Review

Recommendations

Supply as additional data base token name and quote token name of each "hop" to be able to check that after the oracle is deployed.

Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.