The UpdateWeightRunner contract contains a critical vulnerability where the setQuantAMMUpliftFeeTake function incorrectly updates the quantAMMSwapFeeTake state variable instead of maintaining a separate state variable for uplift fees. This causes swap fees and uplift fees to overwrite each other, leading to incorrect fee handling in the protocol.
The contract uses the same state variable (quantAMMSwapFeeTake) for both swap fees and uplift fees, instead of maintaining separate state variables for each fee type. This causes:
Uplift fee updates to overwrite swap fee values
Incorrect fee retrieval through the getter function
Misleading event emissions with incorrect old fee values
Financial: Incorrect fee calculations and distributions
Operational: Unexpected behavior when updating fees
Transparency: Misleading event logs for fee changes
Protocol Integrity: Compromised fee management system
Manual code review
Add a separate state variable for uplift fees:
Update the setter function:
Update the getter function:
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.