The protocol claims to apply a 0.3% swap fee on sell transactions. However, the current feeAmount calculation mistakenly uses a denominator of 100_000, producing an effective fee rate of 3%, which is ten times higher than intended.
Likelihood: Medium
While no immediate impact exists because the calculation is not fully integrated, any refactor that uses this current formula risks applying a 3% fee instead of 0.3%.
Impact: High
Charging swap fees significantly higher than advertised undermines protocol trust and may drive users away, impacting trading volume and platform reputation.
Run the following test using Foundry to observe the incorrect vs correct fee calculations (forge test --mt test_FeeCalc -vvv):
By changing the denominator to 1_000_000 to reflect the intended 0.3% fee precision:
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.