Under normal behavior, the collateral locked during minting should only be returned once. After that collateral has been included in a seller payout, the token’s collateral accounting should be cleared so the same amount cannot be counted again in future flows.
In the current implementation, collectUsdcFromSelling() reads collateralForMinting[listing.tokenId] and adds it to the seller payout, but it never zeroes that mapping entry afterward. As a result, the same collateral remains recorded in storage even after being paid out, and can be counted again in subsequent invalid or repeated claims.
Likelihood:
The bug occurs whenever collectUsdcFromSelling() is called for a token whose collateral is still recorded in collateralForMinting.
The issue is easy to trigger because the function always reads the current collateral value and never clears it after payout.
Impact:
The same collateral can be included in multiple claims.
This amplifies the impact of repeated-claim and invalid-claim paths by adding extra value to each payout.
The contract’s pooled USDC can be drained faster than intended.
Paste this inside NFTDealersTest.t.sol:
Clear the collateral state before transferring funds out, so each token’s collateral can only be returned once.
collateral is not reset to zero after collecting USDC from sold NFT. No accounting for collected USDC
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.