How Do Different DEX Architectures (E.g. AMM Vs. Order Book) Affect Front-Running Vulnerability?
Automated Market Makers (AMMs) are highly vulnerable to front-running, especially sandwich attacks, because the transaction's price impact is predictable based on the fixed formula and liquidity pool size. On-chain Order Book DEXs, while resembling CEXs, are less vulnerable to sandwich attacks but still susceptible to MEV front-running based on transaction ordering.
Off-chain order book models (like those using a relayer) reduce MEV by moving order matching off-chain, making transaction details private until execution.