QuantAMM

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

Incorrect event data emitted in `UpdateWeightRunnerAddressUpdated` event

Summary

The QuantAMMWeightedPool::setUpdateWeightRunnerAddress function emits the UpdateWeightRunnerAddressUpdated event with incorrect data. The expected event data should include both the old and new addresses of the UpdateWeightRunner contract. However, the emitted event only contains the new address.

QuantAMMWeightedPool::setUpdateWeightRunnerAddress function:

function setUpdateWeightRunnerAddress(address _updateWeightRunner) external override {
require(msg.sender == quantammAdmin, "ONLYADMIN");
updateWeightRunner = UpdateWeightRunner(_updateWeightRunner);
// `updateWeightRunner` is updated to new address before emitting event
=> emit UpdateWeightRunnerAddressUpdated(address(updateWeightRunner), _updateWeightRunner);
}

Impact

Incorrectly emitted event data can potentially lead to incorrect data indexing on off-chain services.

Recommendations

Update the QuantAMMWeightedPool::setUpdateWeightRunnerAddress function:

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

Lead Judging Commences

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

Give us feedback!