Description
The setQuantAMMUpliftFeeTake function in UpdateWeightRunner incorrectly modifies quantAMMSwapFeeTake instead of maintaining a separate state variable for uplift fees. This causes the protocol's uplift-based fee model to malfunction since getQuantAMMUpliftFeeTake() returns swap fee values.
And also the getter function getQuantAMMUpliftFeeTake returns quantAMMSwapFeeTake which shouldnt be.
Impact
Incorrect fee distribution between protocol and LPs
Setting up quantAMMUpliftFeeTake overwrites quantAMMSwapFeeTake. So if the system chooses to use two distinctive value for these variables, it wouldn't be achievable.
Proof of Concept
Admin sets uplift fee to 20% using setQuantAMMUpliftFeeTake(0.2e18)
This overwrites quantAMMSwapFeeTake
When UpliftOnlyExample calls getQuantAMMUpliftFeeTake(), it receives swap fee value
Fee calculations in withdrawal use incorrect percentage
Both swap and uplift fee mechanisms are corrupted
Recommended Mitigation
Add separate state variable:
Modify the Getter function to this:
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.