The OrderBook contract is designed to facilitate peer-to-peer trading of ERC20 tokens, allowing sellers to list tokens at their desired price in USDC and buyers to purchase these tokens directly on-chain. Normally, the contract should ensure that orders represent reasonable market conditions by validating that the relationship between token amounts and prices falls within acceptable ranges.
The specific issue is that the contract fails to implement any validation of the price-to-amount ratio when creating or amending sell orders. It only checks that both values are non-zero, allowing users to create orders with arbitrary and potentially manipulative price points, such as selling 1 wei of a token for millions of USDC. This vulnerability undermines the contract's reliability as a price reference and enables market manipulation.
Likelihood:
Reason 1: Any user with minimal resources can create orders with extreme price-to-amount ratios without any technical barriers or special conditions required.
Reason 2: The exploitation requires no complex setup or coordination, as the contract directly accepts any non-zero values for both amount and price parameters.
Impact:
Impact 1: External systems or protocols that use this contract as a price oracle would receive severely manipulated price data, potentially leading to significant financial losses through misinformed trading decisions or incorrect liquidations.
Impact 2: The platform's reputation and trustworthiness would be severely damaged when users observe unrealistic prices and manipulated market conditions, leading to reduced adoption and usage.
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.