QuantAMM

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

Lack of Event Emission After _calculateMultiplerAndSetWeights in calculateMultiplierAndSetWeightsFromRule

Summary

In the function:

function calculateMultiplierAndSetWeightsFromRule(CalculateMuliplierAndSetWeightsLocal memory params) external {
require(msg.sender == address(rules[params.poolAddress]), "ONLYRULECANSETWEIGHTS");
uint256 poolRegistryEntry = QuantAMMWeightedPool(params.poolAddress).poolRegistry();
require(poolRegistryEntry & MASK_POOL_RULE_DIRECT_SET_WEIGHT > 0, "FUNCTIONNOTAPPROVEDFORPOOL");
_calculateMultiplerAndSetWeights(params);
}

the call to _calculateMultiplerAndSetWeights(params) updates state by setting new weights in the pool, yet no event is emitted to signal this significant action. Emitting events after weight adjustments is a recognized best practice for on-chain traceability and to help integrators or off-chain services track changes.

Vulnerability Details

Impact

  • Reduced Transparency: External watchers (including block explorers, indexers, and analytics tools) cannot easily detect that a weight update occurred via this function.

  • Potential Operational Confusion: If pool weights change without an event, it can be harder for auditors or integrators to confirm or debug weight changes over time.

Tools Used

Manual audit

Recommendations

  1. Emit an Event after calling _calculateMultiplerAndSetWeights(params) that includes:

    • The calling address (msg.sender)

    • The pool address (params.poolAddress)

    • The updated weights or any other relevant details.
      For example:

event WeightsFromRuleUpdated(address indexed caller, address indexed pool, int256[] updatedWeights);
function calculateMultiplierAndSetWeightsFromRule(...) external {
...
_calculateMultiplerAndSetWeights(params);
emit WeightsFromRuleUpdated(msg.sender, params.poolAddress, params.updatedWeights);
}
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!