Normal behavior: Every trade should pay 0.3% of the output token as fees to the LPs, regardless of the trade size.
Problem: Due to integer truncation in fee calculation, very small trades may pay 0 fees, leading to cumulative fee loss and potential abuse.
Likelihood:
This will occur whenever a trade is small enough that amount_out * 3 / 1000 < 1
.
Common in arbitrage scenarios or bots executing small swaps frequently.
Impact:
LPs will receive less than expected or even zero fees.
Smart bots can exploit this to avoid paying fees, gaining unfair profits.
The protocol’s economic balance is broken, leading to potential reputational damage.
Set minimum fee of 1 (if any output, charge at least 1 fee)
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.