The functions setQuantAMMSwapFeeTake and setQuantAMMUpliftFeeTake both modify the same state variable quantAMMSwapFeeTake. This creates a logical flaw in the contract as both functions are intended to set different fee values but end up overwriting the same variable.
In contract UpdateWeightRunner, the setQuantAMMSwapFeeTake and setQuantAMMUpliftFeeTake functions both update the same state variable quantAMMSwapFeeTake, which is likely a mistake:
These two functions are intended to manage different fees (swap fees and uplift fees), so they should update separate state variables.
This leads to ambiguity and potential losses, as one fee setting can inadvertently affect the other. If a user or other contract calls one function to set the fee, the settings from the other function will be ignored, leading to situations where either the swap fee or uplift fee might not behave as intended. The business logic that requires separate fee settings is thus compromised.
The Impact is MEDIUM, the Likelihood is MEDIUM, so the Severity is MEDIUM.
Manual Review
Consider adding a new state variable for the uplift fee:
Update setQuantAMMUpliftFeeTake:
Modify the setQuantAMMUpliftFeeTake function to update the new quantAMMUpliftFeeTake variable instead of quantAMMSwapFeeTake:
Update getQuantAMMUpliftFeeTake:
Modify the getQuantAMMUpliftFeeTake function to return the new quantAMMUpliftFeeTake variable:
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.