In normal operation, the protocol charges a 3% fee on the sale price of each order. This fee should accumulate to totalFees
and be withdrawable by the protocol owner.
However, when the priceInUSDC
of an order is small (especially below 34), the fee computation using integer division truncates the result, potentially to zero. This means that small orders avoid paying any fees, or pay less than the expected 3%, leading to systematic loss of protocol revenue. Even for some number that are greater than 34, the protocol get some fee but still lost some due to rounding off error as solidity dosent accomadate decimals.
Likelihood:
Occurs whenever users submit orders priced under 34 USDC, which is trivially done.
Easy to automate or script many low-value orders that systematically evade fees.
Impact:
Protocol loses revenue it should have accrued from fees.
Could be used as a fee evasion strategy to exploit the system.
Over time, this creates a financial imbalance between the protocol and users.
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.