QuantAMM

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

Multihop Oracle Missing Redundant Oracles Sanitization Check: Vulnerability Causes Centralization Risk and Invert Manipulation

Summary

In the MultihopOracle contract, the constructor allows unsanitized oracles to be pushed into the multihopConfigs oracles array. This oversight can result in severe centralization risks and invert data manipulation, potentially leading to fund losses, market manipulation, and other issues.

Vulnerability Details

MultihopOracle::constructor

constructor(HopConfig[] memory _oracles) {
for (uint256 i = 0; i < _oracles.length; i++) {
@> // @info: Missing redundant oracle wrapper checks
@> // Q: What if the same oracle has different invert settings?
// A: Full disaster
oracles.push(_oracles[i]);
}
}

Impact

  1. Centralization Risk
    Multiple instances of the same oracle can lead to a single point of failure.

  2. Oracle Data Manipulation
    Different opposite invert boolean settings for the same oracle could result in data corruption.

  3. Fund Losses
    Misconfigured or manipulated data can lead to financial losses.

  4. Market Manipulation
    Malicious actors could exploit vulnerabilities to manipulate markets.

Tools Used

Manual Review

Recommendations

Implement logic to detect and eliminate redundant identical oracle entries in the oracles array.

Suggested Solution

Below is a possible solution for the MultihopOracle constructor:

constructor(HopConfig[] memory _oracles) {
for (uint256 i = 0; i < _oracles.length; i++) {
+ for (uint256 j = 0; j < oracles.length; j++) {
+ require(_oracles[i] != oracles[j], "Duplicate oracles not allowed");
+ }
oracles.push(_oracles[i]);
}
}
Updates

Lead Judging Commences

n0kto Lead Judge 11 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.

Give us feedback!