The quantAMMUpliftFeeTake
and quantAMMSwapFeeTake
functions modify the same storage variable (quantAMMSwapFeeTake
), causing fees to overwrite each other & leading to incorrect fee accounting.
Protocol fee accounting will be incorrect as uplift fees and swap fees overwrite each other, potentially leading to revenue loss or incorrect revenue distribution.
Both getter functions will return the same value despite representing different fee types.
PoC:
Add testSwapAndUpliftFeeBug
test into pkg/pool-quantamm/test/foundry/UpdateWeightRunner.t.sol
and run it :)
Create separate storage variables for each fee type
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.