Root Cause:maxSwapAmount is calculated using Uniswap's liquidity unit (L), but swapAmount being compared to it is in token quantity; the two use different units.
Impact: The quota calculation may be severely off from expectations, causing users to be wrongly penalized or to bypass limits.
Expected behavior: Limits should be calculated based on token amounts to ensure a user's single or cumulative trades do not exceed a certain proportion of the pool's token reserves
Specific issue: the code uses the liquidity L value directly as the token amount:
Likelihood: High
This calculation is performed for every transaction
Unit discrepancies cause the limit value to be unrelated to the actual token reserves
Impact: Medium
If L >> token quantity, the cap is too high and the protection fails
If L << token supply, the cap is too low and legitimate users are penalized
Calculate limits using actual token reserve amounts:
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.
The contest is complete and the rewards are being distributed.