The UpdateWeightRunner contract incorrectly uses the same storage variable quantAMMSwapFeeTake for both swap fees and uplift fees, leading to incorrect fee calculations in the UpliftOnlyExample contract.
In UpdateWeightRunner:
Both setQuantAMMUpliftFeeTake() and setQuantAMMSwapFeeTake() modify the same storage variable quantAMMSwapFeeTake
getQuantAMMUpliftFeeTake() returns quantAMMSwapFeeTake
In UpliftOnlyExample:
Line 331: Retrieves uplift fee using getQuantAMMUpliftFeeTake()
Line 519: Uses the same function for swap fee calculations
This means both uplift fees and swap fees will always be identical, which is likely not the intended behavior, (evidenced from the two setter and getter functions too)
Incorrect fee calculations as uplift fees and swap fees cannot be set independently
Manual Review
1- Add separate storage variable for uplift fees:
2- Update getter functions to return correct variables:
3- Ensure setter functions modify their respective variables
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.
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.