Description:
The FeeCollector::collectFee
function is designed to collect fees of various types, specifically in raacToken
. It accepts two parameters: amount
and feeType
, which restrict the collected fee to a certain amount and type per transaction. However, there is no dedicated modifier to restrict access, allowing any user to invoke this function and deposit fees into the FeeCollector.sol
contract. Crucially, the function does not track the sender's identity when collecting fees.
Impact:
Due to the absence of a mapping mechanism, fees sent via the FeeCollector::collectFee
function are received by the contract without any record of the sender or the specific amounts contributed by each entity. This lack of tracking could lead to issues in auditability and reconciliation, making it difficult to verify individual fee contributions.
Proof of Concept:
Currently, the FeeCollector::collectFee
function only verifies the amount and type of fee (raacToken
) being collected. However, it does not maintain any record of the sender, which could hinder future auditing and accountability.
Recommended Mitigation:
Implement a mapping structure to record the sender’s address alongside the corresponding fee amount. This would enable better tracking and accountability of collected fees.
Example:
This approach ensures that each sender's contributions are recorded, improving transparency and traceability.
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.