QuantAMM

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

Missing separate variable for uplift fee

Summary

In the UpdateWeightRunner contract, the functions getQuantAMMSwapFeeTake() and setQuantAMMSwapFeeTake() serve as the getter and setter for the swap fees, with the corresponding variable being quantAMMSwapFeeTake. Additionally, there are two more functions—getQuantAMMUpliftFeeTake() and setQuantAMMUpliftFeeTake()—which are intended for managing the uplift fee.

The problem is that all four functions are using the same variable, quantAMMSwapFeeTake, instead of using a separate variable for the uplift fee, as would be expected given the presence of distinct functions for this purpose.

Vulnerability Details

https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-quantamm/contracts/UpdateWeightRunner.sol#L126-L154

Impact

It is not possible to set different value for the uplift fee from the value of the swap fee

Tools Used

Manual review

Recommendations

Use separate variable for uplift fee

Updates

Lead Judging Commences

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

finding_quantAMMSwapFeeTake==quantAMMUplfitFeeTake

Likelyhood: High, calling setters or getters Impact: Low/Medium, both getters return `quantAMMSwapFeeTake` and `setQuantAMMUpliftFeeTake` modify `quantAMMUplfitFeeTake`. Real impact: those 2 values will be always the same.

Support

FAQs

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