The contract declares totalPenaltyFeesCollected as a public state variable (line 38) intended to track cumulative penalty fees collected by the protocol. However, in the _beforeSwap function (lines 174-177), when a penalty is applied and transferred, this variable is never incremented. The penalty fee is calculated, transferred to the owner, and an event is emitted—but the accounting state remains unchanged.
Likelihood:
Medium - Every penalty transaction fails to update the tracking variable. Since penalties are core to the launch mechanism (Phase 1: 50%, Phase 2: 20%), this occurs whenever users exceed swap limits.
Impact:
Medium - Administrative and operational consequences:
Broken transparency: Protocol cannot query total fees collected via totalPenaltyFeesCollected()
Broken fee-sharing logic: Any future feature relying on this variable (e.g., staking rewards, fee distribution) will read 0
Off-chain accounting burden: Must rely solely on event logs (PenaltyApplied) rather than on-chain state
Integration failures: External contracts or analytics reading totalPenaltyFeesCollected receive incorrect data
Below code demo the lack of tracking totalfeecollected
Increment totalPenaltyFeesCollected when penalty fees are transferred to maintain accurate on-chain accounting.
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.
The contest is complete and the rewards are being distributed.