Normal behavior: The protocol charges a fee on each order, calculated as a percentage (FEE) of the order price, using a precision constant (PRECISION).
Example: protocolFee = (order.priceInUSDC * FEE) / PRECISION;
Issue: With FEE = 3 and PRECISION = 100, the calculation uses integer division. For small order values, this results in the protocol fee being rounded down to zero, allowing users to avoid paying any fee by splitting large orders into many small ones.
Likelihood:
This will occur whenever users create small orders (e.g., less than 34 USDC).
Users can intentionally split large trades into many small orders to avoid protocol fees.
Impact:
Protocol loses fee revenue on small orders.
Potential for fee avoidance by malicious users.
A user wants to avoid paying protocol fees by splitting a large trade into many small orders.
Protocol should increase precision to be able to collect fees on low value orders.
Protocol Suffers Potential Revenue Leakage due to Precision Loss in Fee Calculation
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.