This book explains what the stock market actually is: https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393...
It's much less friendly than it seems and only "efficient" for a select few.
I've heard some crazy shit about how much money comes from adtech to fund blackhat data brokers. Adtech buys hacked databases on underground markets, but more than that they fund supply chain attacks to get highly intrusive adware into popular apps. They frequently buy up applications that have a wide install base on phones and browser extensions, and then on the next update, request maximum privileges and use it to loot as much as they can from user systems.
It's a symbiotic relationship. Shady ad networks are often used by criminals for narrowly targeted attacks (advertise this crafted phishing site to women aged 25-35 in the greater Dallas Fort Worth area who are recently married). Those criminals use that access to obtain more private data which they sell to adtech companies. It's a pretty gross business.
In other news, HFT isn't bad because it's HFT, it's bad because order matching services have a bunch of shady, undocumented order types that are designed to allow HFT firms to specifically extract winnings from retail investors. They are absolutely economic parasites, and no one has any incentive to stop them.
https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393...
https://www.amazon.com/Dark-Pools-Machine-Traders-Rigging/dp...
Imagine two investors sitting at a restaurant table discussing trades they are about to make. The trades they are making will be significant, in the sense that their trades will then impact the value of the stocks they're trading. Meanwhile, a waiter at the restaurant makes a habit of eavesdropping on the conversations of these investors. When he gets the information, he runs to the phone and effects his own, smaller trade.
It's not that the waiter happened to overhear something. The waiter makes it his business to "overhear." The waiter adds no real value. He's a parasite on the people who do add value. The HFT traders are likewise.
What they do is documented in Michael Lewis's Flashboys.
https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393...
This is very similar to "front running" [1], but because a) this happens privately and in small quantities, and b) it is not necessarily privileged information, it's considered legal by the SEC. But it is highly questionable for sure.
"Flash Boys", by Michael Lewis [2] is a great read, and goes into detail on the world of high frequency traders, and how they operate.
[1] https://en.wikipedia.org/wiki/Front_running
[2] https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393...
In case no one with actual experience responds to you, you might want to check out Flash Boys[0], which spends a little time talking about GS's code. From what I've read in that book and in other places, what you heard seems to be the correct.
[0] https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393...
http://www.amazon.com/Flash-Boys-Wall-Street-Revolt-ebook/dp...
As someone who knows and has worked with all the people involved with the write-ups referenced in this blog post, I can pretty confidently say that the author is way way behind here. There have been some insane advancements in recent years that would blow his mind.
MEV harvesting is actually an insanely fascinating field of study, and it comes down to consensus in a world where information can only move as fast as the speed of light.
Front-running is a general problem where, if you can find out that someone wants to buy something, and can buy it first and sell it to the person who actually want it at a premium. This gets really interesting in the blockchain space, because Miners (Validators) decide the order of transactions, and in some cases validators can be incentivized/coerced to move around transactions in a way that might be beneficial for certain users. This is what is referred to as "Miner Extractable Value".
Yes it's a problem, yes there are mitigations, yes there are fun and weird ways around those mitigations, etc.
This is what happens when people are incentivized to take a really good hard look at what global consensus really means. At a high level, most users don't really need to know or care about any of it, but it exists as a parasitic force constantly extracting value from the network. Still, IMO the parasites that feed off MEV are at a significant disadvantage compared with those who feed of legacy financial networks (for more on that, you can read the actual Flash Boys book https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393...).