QuantAMM

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

Remove Oracle executes and emits an event whether the oracle exists in the system or not

Summary

When adding an oracle there is a revert statement if the oracle has already been added, however when removing an oracle, even if it has been removed before or doesn't exist the function will execute seamlessly and emit an event to the backend, while this does not lead to loss of funds it can be misleading for registry related operations

Vulnerability Details

in the removeOraclefunction there is no check as to whether the oracle to be removed exists in the system or not.

function removeOracle(OracleWrapper _oracleToRemove) external {
approvedOracles[address(_oracleToRemove)] = false;
require(msg.sender == quantammAdmin, "ONLYADMIN");
emit OracleRemved(address(_oracleToRemove));
}

This inconsistency is pronounced as there is a check in the addOracle function here:

if (!approvedOracles[oracleAddress]) {
approvedOracles[oracleAddress] = true;
} else {
revert("Oracle already added");
}

Impact

Inconsistency in admin operations, misleading emits.

Tools Used

Manual Review

Recommendations

Check for existence of the oracle before event emission and revert if the oracle to be removed is not present in the system

Updates

Lead Judging Commences

n0kto Lead Judge 10 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!