QuantAMM

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

Wrong emit typo might allow offchain listeners not listen to event

Summary

There is a typo in the event name OracleRemved in the removeOracle function. The event name should be OracleRemoved instead. This typo will cause issues for off-chain event listeners and systems that rely on the event name to process or monitor the contract.

Vulnerability Details

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

In the removeOracle function, the event emitted when an oracle is removed is named OracleRemved instead of OracleRemoved. This is a typographical error that can cause issues in off-chain systems (such as event listeners, monitoring services, or dApps) that are designed to listen for the correct event name.

Impact

Off chain listeners depending on name might catch this emitted event.

Tools Used

Manual review

Recommendations

function removeOracle(OracleWrapper _oracleToRemove) external {
approvedOracles[address(_oracleToRemove)] = false;
require(msg.sender == quantammAdmin, "ONLYADMIN");
- emit OracleRemved(address(_oracleToRemove));
}
function removeOracle(OracleWrapper _oracleToRemove) external {
approvedOracles[address(_oracleToRemove)] = false;
require(msg.sender == quantammAdmin, "ONLYADMIN");
+ emit OracleRemoved(address(_oracleToRemove)); // Corrected event name
}
Updates

Lead Judging Commences

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