Normal Behavior: The buyOrder() function should atomically transfer USDC from the buyer to both the protocol (as fees) and the seller, then transfer the sold tokens to the buyer, marking the order as inactive exactly once.
Specific Issue: The function performs multiple external calls after marking the order as inactive but before completing all transfers, allowing malicious seller contracts to reenter the function and exploit the inconsistent state.
Likelihood:
Any seller using a smart contract address (multisig, DAO, or malicious contract) creates a reentry opportunity during USDC payment reception
The vulnerability triggers automatically when the malicious seller contract implements reentrant logic in its receive() or fallback() functions
Impact:
Double spending allows attackers to receive multiple payments for the same order while only providing tokens once
Protocol fee theft through manipulation of the totalFees variable during reentrant calls
Complete order book state corruption leading to locked funds and market manipulation
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.