Order.priceInUSDC
in OrderBook.sol
Normal Behavior: Sellers create sell orders by specifying the token they’re offering, the amount, and the priceInUSDC
they want to receive. Buyers then purchase the token by paying the specified USDC amount.
Issue: The contract allows sellers to specify any arbitrary priceInUSDC
, regardless of the real market value of the token being sold. Even with whitelisted, a malicious seller can list a grossly inflated price (e.g., 1 wETH for 4,000 USDC) and scam unsuspecting buyers. The contract does not validate prices against any on-chain oracle or external reference and blindly accepts any price input.
Likelihood:
Occurs whenever a buyer relies on the frontend UI or static off-chain listings without manually verifying token value
Common when buyers are rushed, unfamiliar with token values, or assume the platform enforces fair pricing
Impact:
Leads to economic scams and loss of funds
Buyer pays significantly more than market value for a legitimate token
Reduces user trust in the platform and may lead to regulatory risk
Seller lists 1 wSol for 300 USDC (assuming real market price: ~100 USDC).
Buyer sees “1 wSol” and assumes the price is fair.
Buyer calls buyOrder()
and transfers 300 USDC for something worth only ~100 USDC.
Trade executes as expected — no bugs — but buyer is effectively scammed.
setUp
functionIntegrate a Price Oracle (e.g., Chainlink)
Use a trusted on-chain price feed (like Chainlink) to get the real-time market value of the token being sold. This prevents sellers from setting outrageously inflated prices
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.