In _calculateDistribution(uint256 totalFees), the function calculates fee shares using integer division:
Since Solidity rounds down in integer division, a small remainder may be left unallocated. If this remainder is not explicitly handled, some collected fees will never be distributed, leading to permanent fund loss.
The contract fails to distribute 100% of collected fees, small portions of tokens remain locked inside the contract with no way to recover them. Over time, significant amounts of funds may accumulate as "dust", leading to lost protocol revenue.
Ensure the entire totalFees
is accounted for by allocating the remainder to the treasury:
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.