Contract: FeeCollector
Function: distributeCollectedFees
Severity: Medium
Description:
The distributeCollectedFees
function deletes the collectedFees
struct after the distribution is processed. This means that once fees are distributed, the contract can no longer accumulate new fees, effectively disabling the fee collection mechanism after the first distribution.
Code:
Impact:
Loss of Functionality: After the initial fee distribution, the contract can no longer collect any new fees.
Economic Impact: The protocol's revenue generation mechanism is broken after the first distribution.
Recommendation:
Modify the distributeCollectedFees
function to reset the values of the fields within the collectedFees
struct to zero instead of deleting the struct entirely. This will allow the contract to continue accumulating fees after the distribution.
Proposed Fix:
Replace the delete collectedFees;
line with the following:
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.