Chapter 7
Oracle and MEV Risks
Oracles and MEV are different problems that often collide in DeFi. Oracles tell contracts what the outside world looks like; MEV is profit extracted from transaction ordering. Both can drain value when users and builders treat on-chain prices and execution as fair by default.
Oracle manipulation usually means pushing a spot price on a thin market so a lending protocol misprices collateral. MEV sandwich attacks front-run and back-run your swap, capturing the slippage you thought you were paying to the pool.
Not all MEV is malicious. Arbitrage tightens prices and liquidations keep lending markets solvent. The harmful forms are the ones that tax uninformed users without improving protocol health.
As a user, prefer wallets and routers that support private submission or simulate outcomes before signing. As a builder, design liquidation and pricing logic that resists single-block manipulation.