Fee calculation is potentially incorrect
The fee calculation in Basket.sol divides by BASE minus feePct instead of BASE, causing more fees to be charged than intended. An attacker could exploit this to overcharge users on fees.
Submitted by itsmeSTYJ
Impact
More fees are actually charged than intended
Mitigation Steps
Assume that license fee is 10% i.e. 1e17 and time diff = half a year.
When you calculate feePct, you expect to get 5e16 since that’s 5% and the actual amount of fee to be charged should be totalSupply * feePct (5) / BASE (100) but on line 118, we are actually dividing by BASE - feePct i.e. 95.
5 / 95 = 0.052 instead of the intended 0.05.
Solution is to replace BASE - feePct in the denominator with BASE.
frank-beard (Kuiper) confirmed
Alex the Entreprenerd (judge) commented:
The warden identified an inconsistency with the math that charged more fees than intended
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the fee calculation incorrectly uses BASE - feePct as the denominator instead of BASE.
What the attacker needed
None
The fix
The fix is to replace BASE - feePct in the denominator with BASE.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a smart contract bug where the fee calculation uses the wrong denominator. Instead of dividing by 100 (the base), it divides by 95, which makes the fee percentage slightly higher than it should be. Users end up paying more fees than they should.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.