In the QuantAMMWeightedPool contract, two variables are defined: _MIN_SWAP_FEE_PERCENTAGE and _MAX_SWAP_FEE_PERCENTAGE. These variables are intended to control the limits of the fee percentage for swaps, but they are never actually used.
In contrast, the UpdateWeightRunner contract includes a function called setQuantAMMSwapFeeTake that allows the admin to modify the quantAMMSwapFeeTake variable without using limitaions.
First, the quantAMMSwapFeeTake variable is set to 0.5e18, which represents a 50% fee (above the _MAX_SWAP_FEE_PERCENTAGE limit). Second, in the setQuantAMMSwapFeeTake function, the admin can adjust the swap fee, with the only restriction being that it must be less than 100%, rather than being limited to a range between 0.001% and 10%.
Users can loss excessive funds in a case of setting swap fee more than 10% (uppder limit).
Protocol may miss-behave mathimatically in a case of setting swap fee equale to zero (less than 0.001% lower limit).
Manual review
Change the code to sth like this:
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.