The FeeCollector.sol contract lacks a reentrancy guard on distributeCollectedFees(), which allows reentrant callsto manipulate fee distribution.
The function distributeCollectedFees() transfers fees before deleting stored values:
If an attacker reenters via a callback function before delete collectedFees executes, they can double-claim fees.
This allows multiple fee withdrawals in a single transaction.
Missing nonReentrant modifier in distributeCollectedFees() in FeeCollector.sol.
The attacker reenters the fee distribution function before delete collectedFees executes.
This allows multiple withdrawals in a single transaction.
Funds are drained due to multiple withdrawals.
The attacker drains the FeeCollector’s balance.
The function distributes more fees than intended.
Legitimate users lose rewards due to reentrancy.
Fee theft: Attackers can withdraw more than their fair share of collected fees.
Incorrect accounting: Fee balances may not reflect reality, impacting governance decisions.
Slither for reentrancy detection
Foundry Tests simulating reentrant calls
Manual code Review
Add the nonReentrant modifier to distributeCollectedFees():
Ensure fee updates occur before external calls using the Checks-Effects-Interactions pattern.
Implement unit tests for reentrancy scenarios.
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.