QuantAMM

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

The multiplier in setWeightsManually Can Be Negative

Summary

In the setWeightsManually function, the multiplier can potentially be a negative value, but there is an if statement enforcing that it must be positive. This prevents the multiplier from being set to a negative value when needed.

Vulnerability Details

The setWeightsManually function enforces that the multiplier must always be positive through a validation check. This restriction prevents the multiplier from being configured as negative, which may limit flexibility or conflict with specific use cases.

https://github.com/Cyfrin/2024-12-quantamm/blob/main/pkg/pool-quantamm/contracts/UpdateWeightRunner.sol#L578-L581

Impact

Restricting the multiplier to positive values could cause unintended behavior or prevent certain configurations, potentially reducing the functionality of the system.

Tools Used

Manual Review

Recommendations

Separate the validation logic for multiplier and weight.

Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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