Normal behavior: Fee calculations should use named constants and clear scaling (e.g., FEE_DENOMINATOR) so integrators understand units (bps/ppm).
Problem: The contract computes feeAmount = (swapAmount * sellFee) / 100000; but 100000 is a magic number with no documentation, causing ambiguity about fee units.
Likelihood:
Any future maintainer or integrator reading the code may assume a different denominator (10,000 bps, 1e6, etc.).
Changing fees or interpreting sellFee = 3000 may lead to misconfiguration.
Impact:
Wrong interpretation can cause incorrect displayed percent values or unexpected fee amounts, but not direct reentrancy or theft.
Leads to correctness/financial miscalculation risk rather than immediate security exploit.
Introduce a named constant to document the denominator and use it in math:
Also add NatSpec or comment above fee state variables documenting the unit (e.g., // buyFee / sellFee are expressed in 1/FEE_DENOMINATOR units).
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.