The contract has a logic flaw in transfering USDC
In the function collectUsdcFromSelling, the contract attempts to transfer USDC from the contract back to itself.
Since the USDC was already pulled into the contract during the buy() function (via transferFrom), the tokens are already sitting in the contract's balance. Executing a transfer where the sender and recipient are the same address changes nothing regarding the balance but still triggers the full execution logic of the USDC ERC20 contract.
There is unnnecessary loss of gas
Likelihood
Basically everytime,
The Flow of Funds:
Buyer calls buy(): usdc.transferFrom(Buyer, NFTDealers, price) is executed. The contract now holds the full price
** Seller calls collectUsdcFromSelling():**
The contract calculates fees
The Issue: It calls usdc.safeTransfer(address(this), fees).
The Result: The USDC contract subtracts 5 from NFTDealers and adds 5 to NFTDealers. The balance remains 100.
The Waste: This operation costs approximately ** gas** (standard ERC20 for a zero-sum result.
Impact
Financial Waste: Every seller who collects their funds pays an unnecessary gas premium. On a high-traffic marketplace, this totals significant capital wasted on "do-nothing" operations.
Contract Complexity: It adds unnecessary external calls, which slightly increases the risk of reentrancy or unexpected reverts if the underlying token (USDC) has non-standard behavior for self-transfers.
Just remove the reduntant line 'usdc.safeTransfer(address(this), fees);'
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.