QuantAMM

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

Missing Events Emission in Constructor for Critical State Variables

Vulnerability Details

In the UpdateWeightRunner contract's constructor, critical state variables (ethOracle) is initialized without emitting corresponding event:

event ETHUSDOracleSet(address ethUsdOracle);

This is seen in the constructor of the UpdateWeightRunner contract below

constructor(address _quantammAdmin, address _ethOracle) Ownable(msg.sender) {
require(_quantammAdmin != address(0), "Admin cannot be default address");
require(_ethOracle != address(0), "eth oracle cannot be default address");
quantammAdmin = _quantammAdmin;
ethOracle = OracleWrapper(_ethOracle);
// @audit No event emitted after setting the ethOracle
}

Impact

It breaks the principle of recording all state changes via events thus making it difficult for off-chain services to monitor the complete lifecycle of the variable ethOracle shown above

Tools Used

Manual Review

Recommendations

constructor(address _quantammAdmin, address _ethOracle) Ownable(msg.sender) {
require(_quantammAdmin != address(0), "Admin cannot be default address");
require(_ethOracle != address(0), "eth oracle cannot be default address");
quantammAdmin = _quantammAdmin;
ethOracle = OracleWrapper(_ethOracle);
+ emit ETHUSDOracleSet(_ethUsdOracle);
}
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!