Normal behavior: When a sale occurs, the marketplace should collect fees and send them to the owner.
The current logic increments totalFeesCollected but during payout uses usdc.safeTransfer(address(this), fees) which returns fees to the contract itself, not to a protocol fee account.
Likelihood:
Occurs on every sale transaction (buy) during normal marketplace use.
No role restriction or conditional path needed.
Impact:
Fees never leave the contract until explicitly withdrawn.
If withdrawFees() is misused or ownership is malicious/compromised, fees can be locked or withheld.
Move fee transfer to the owner at the point of sale:
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.