Front running (sucks)
Last week, I wrote about MEV and flash loans. If you have a lot of money in crypto to begin with, you don't need flash loans to participate in MEV. But if you're not a whale, MEV is still attractive. You can get a guaranteed return if you can find the right opportunities. Flash loans make that profit accessible to smaller players.
But MEV is highly competitive because of front running. This is a problem in traditional finance as well, but it's illegal to front run stock trades. Blockchains are permissionless, public, anonymous networks. You can't just outlaw front running here. As long as it's possible, people will do it.
Here's how it works:
Let's say you find an opportunity to make $100 with MEV. You submit the transaction to the blockchain, expecting the funds to hit your account in the next few seconds. While your transaction is queued up, someone else has their computer testing out pending transactions. They run your transaction just on their computer before it's accepted to the broader network. When they see that it will return $100 in profit, they submit a copy of your transaction but with their address as the recipient. Their transaction gets processed before yours because they decided to pay $99 more for gas than you did.
The front runner only made $1, you probably lost money, and the miner got paid extra from the front runner's gas fee.
This is a terrible experience! Fortunately, there are ways to mitigate front running if you try your hand at MEV on Ethereum, but it's a constant battle. Front runner's get more sophisticated and you have to work even harder to make a profit.
On Koinos, front running isn't possible because the transaction queue is first come, first served. You can't pay extra to skip the line.
-Luke
P.S. The only reliable way I can think of to front run would be if you're running an RPC node. You'd take in other people's transactions and try them out before broadcasting to the broader network. Broadcasting your own first if there's profit to be made. This is avoidable if you run your own node or some other trusted node.