I am interested in creating an order matching contract. I started looking at a contract that Vitalik wrote....https://github.com/ethereum/serpent/blob/master/examples/cyberdyne/market.se
in the comments, he mentions.....
"This contract operates in "epochs" of 100 blocks At the end of each epoch, we process all orders simultaneously, independent of order. This algorithm prevents front-running, and generates a profit from the spread."
Can someone explain to me why he needs to prevent "front running". Is it because the miners can see the transactions and therefore front-run them?
Also interested in developing a matching engine that does both FIFO (Is this not possible in ethereum due to front-running?) and Pro-Rata...http://www.rajeevranjansingh.com/order-matching-execution-side
Anyone who can share ideas on order matching algos would be greatly appreciated.