The OrderBook allows buyers to purchase sell orders at a fixed price using USDC. Buyers commonly approve contracts for MAX_UINT256 USDC to avoid repeated approvals, expecting to pay only the order's listed price.
However, sellers can amend their orders at any time, including changing the price. This creates a critical MEV vulnerability where sellers can front-run buy transactions and increase prices to drain buyers' approved USDC balances.
Likelihood:
Sellers monitor the mempool for incoming buy transactions targeting their orders
MAX_UINT256 approvals are standard practice in DeFi for gas efficiency
Impact:
Direct theft of buyer funds up to their entire approved USDC balance
Buyers have no way to protect themselves once their transaction is submitted
This test demonstrates how a malicious seller can exploit MEV to steal funds. The attacker lists at an attractive price (15% below market) to ensure quick buyers, minimizing capital commitment and risk.
Implement price protection through either exact price commitment or slippage tolerance:
Option 1: Exact Price Commitment
Option 2: Slippage Protection (More User-Friendly)
Both approaches prevent MEV attacks by ensuring buyers don't pay more than expected. Option 2 provides better UX by allowing small price variations while preventing large MEV exploits.
A malicious seller can front-run a buy order for their order, and decrease the amount of assets to be sold. If the price is unchanged, the buy transaction fulfills, but the buyer gets lesser amount than expected.
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.