The OrderBook contract should enable sellers to list supported ERC20 tokens (wETH, wBTC, wSOL) for sale in exchange for USDC, ensuring buyers can also purchase them by paying the exact USDC amount, with both sell and payment tokens recognized as valid by the contract.
When a User indulges any function that tries checking allowedSellToken[usdcAddress]
will return false simply because there's no boolean value
, even though USDC is meant to be the primary payment method. Transaction reverses when buyers attempt to submit USDC especially if the contract checks **allowedSellToken,
**while initializing allowed ERC20 tokens for trading, USDC is assigned to the iUSDC
variable but is not marked as an allowed sell token in the allowedSellToken
mapping, unlike other tokens such as WETH, WBTC, and WSOL.
Likelihood:
(H) - Most likely to happen since it's a simple mistake during development phase. There's no guard to detect missing tokens in the allowed list, and users may assume USDC works as expected.
Impact:
(H) - Critical logic (e.g. fulfilling orders, accepting payments) may silently fail, especially if USDC is meant to be the primary currency for transactions. This could cause fund locks or a complete halt in trading.
USDC is not added to the allowedSellToken mapping and very importantly USDC-based trades will also fail, breaking core order book logic.
OrderBook
Due to Missing Mapping
You can get this in order.t.sol
The allowedSellToken
mapping acts as a whitelist for tradable tokens in the marketplace. Without setting allowedSellToken[_usdc] = true
, any attempt to by users to trade using USDC will fail runtime checks, even if the token address is valid and the ERC20 contract is functional.
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.