QuantAMM

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

Incorrect parameters were used to emit the `UpdateWeightRunnerAddressUpdated` event in the `QuantAMMWeightedPool::setUpdateWeightRunnerAddress` function

Summary

The UpdateWeightRunnerAddressUpdated event use two input parameters: The old address of UpdateWeightRunner contract and the new address (+), However in QuantAMMWeightedPool::setUpdateWeightRunnerAddress function, both inputs of event are the new contract address.

Recommendations

  • Save old address of updateWeightRunner variable and then allocate new address to it.

function setUpdateWeightRunnerAddress(address _updateWeightRunner) external override {
require(msg.sender == quantammAdmin, "ONLYADMIN");
+ address oldWeightRunner = address(updateWeightRunner);
updateWeightRunner = UpdateWeightRunner(_updateWeightRunner);
- emit UpdateWeightRunnerAddressUpdated(address(updateWeightRunner), _updateWeightRunner);
+ emit UpdateWeightRunnerAddressUpdated(oldWeightRunner, _updateWeightRunner);
}
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_setUpdateWeightRunnerAddress_emit_only_new_address

Likelihood: Low, changing this address is rare. Impact: Low, incorrect event.

Support

FAQs

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