The buyOrder
function does not revalidate whether the token being bought is still allowed:
This check exists in createSellOrder(...)
but is omitted in buyOrder(...)
. Thus, once an order is created, its execution is not blocked even if the associated token is later marked as disallowed.
The contract fails to enforce the allowed token list (allowedSellToken
) during the execution of active sell orders. This allows users to buy tokens that have been explicitly disallowed by the contract owner, defeating the purpose of the allowlist mechanism and potentially exposing users to risky or malicious tokens.
Likelihood: Medium (public function, easy to exploit)
Severity:High (token security bypass)
Impact:
Security Risk: Users can be tricked into buying tokens that the admin has deemed dangerous (e.g., malicious or scam tokens).
Control Bypass: The setAllowedSellToken()
function becomes ineffective after order creation.
** . Alice creates a sell order** for WBTC
(a currently allowed token).
WBTC is transferred to the contract (2 WBTC held in book
).
Owner blacklists WBTC using setAllowedSellToken(..., false)
.
Blacklist is not enforced in buyOrder()
.
Dan buys the order and receives the blacklisted WBTC.
Bypass observed: Disallowed token can still be sold.
Impact: Breaks admin control; blacklisting is ineffective.
Add the missing validation check in the buyOrder()
function:
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.