How Can a Decentralized Exchange (DEX) Design Its Transaction Mechanism to Resist Sandwich Attacks?
DEXs can implement mechanisms like batch auctions, similar to CEXs, to execute all transactions submitted within a time window at a single price. Another method is using time-locked transactions or commitment schemes, where the transaction details are hidden until the execution time.
This removes the front-runner's ability to observe the pending order and submit a profitable transaction before it.