Hacker News new | ask | show | jobs
by infinii 2626 days ago
Surprised that nobody has taken the effort to explain "how" this is happening.

The article talks about flaws in DEX design, opening the risk of front running. What's happening is that DEXs work on chain, therefore orders are submitted on chain and thus visible in the mempool while waiting for miners to include it in a block. Front runners view these pending orders and then submit a similar order (but with a higher gas fee), thus incentivizing miners to take their Ethereum transaction instead of the earlier order (for higher fees).

While the article in question is correct with regards to what I explained above, I hate how generalizing it is. Not all DEXs are designed the same way. The first generation of DEXs did everything on chain which also has the downside of limited throughput (limited by blockchain transactions per second). The next generation DEXs are working to solve this with off chain solutions which would also solve the front running problem.