QuantAMM

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

Potential Duplicate Oracles

Summary

The constructor does not check for duplicate entries in the _oracles array

Vulnerability Details

The constructor for the contract directly accepts the _oracles array and pushes its entries into the _oracles storage array without checking for duplicates. This allows for scenarios where the same oracle address appears multiple times in the array. Since the system uses the oracles array in calculations (e.g. in _getData), duplicates can lead to redundant processing, unnecessary gas consumption, and potential logic errors.

Impact

  1. Unnecessary Gas Usage:

  • Duplicate oracles in the oracles array cause redundant calculations during execution, such as in _getData().

  • Redundant oracle configurations may lead to unnecessary gas usage and duplicate calculations.

  1. Redundant or Incorrect Aggregations:

  • If the same oracle is processed multiple times during data aggregation, the results may be distorted or unnecessarily duplicated.
    For example:

    • The timestamp aggregation could be incorrect (e.g. the same timestamp could be chosen multiple times.)

    • The data calculation may unnecessarily involve duplicate multiplications or divisions.

Tools Used

Manual review

Recommendations

Add logic to ensure each oracle is unique like a

  • Mapping-Based Duplicate Detection (Efficient Approach)

Updates

Lead Judging Commences

n0kto Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas / Admin is trusted / Pool creation is trusted / User mistake / Suppositions

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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