The createSellOrder()
function should safely create a new sell order by transferring tokens from the seller to the contract and storing the order details atomically without risk of reentrancy.
The function violates the Checks-Effects-Interactions (CEI) pattern by making an external call (safeTransferFrom
) before completing all state updates, creating a reentrancy vulnerability that allows malicious token contracts to re-enter the function during execution.
Likelihood:
A malicious token contract must be whitelisted via setAllowedSellToken(),
Owner controls token whitelist, reducing immediate risk
However, owner could unknowingly whitelist a malicious token
Overall it is Low
Impact:
Malicious token contracts can re-enter during safeTransferFrom
Could potentially manipulate order state or create multiple orders with same tokens
May lead to inconsistent contract state or fund loss
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.