Fireship · @fireship
The most expensive software bug in history...
Uploaded August 27, 2026 · Length 5:19
Summary
Learn how a single software bug cost Knight Capital $440 million in 45 minutes, making it the most expensive bug in history.
- knight capital bug
- most expensive software bug
- stock trading glitch
- smars system failure
- power peg exploit
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
It seems like every week now we're
- 0:01
seeing security incidents happening that
- 0:03
would have made mainstream news just a
- 0:04
few years ago. The big ones lately have
- 0:07
been the North Korean hackers who Trojan
- 0:09
horse tapped the JavaScript ecosystem,
- 0:11
the OpenAI model that committed a felony
- 0:13
to get answers to a benchmark, and that
- 0:15
time Anthropic accidentally open-sourced
- 0:17
Claude code at 4:00 a.m. via an NPM
- 0:19
source map. But, sometimes it's good to
- 0:21
remember that even before AI, the
- 0:23
software has always been held together
- 0:25
with duct tape and the poverty of
- 0:26
open-source maintainers. And there's no
- 0:28
better example of this than the damage
- 0:30
one company managed to do to itself 14
- 0:32
years ago this month with organic human
- 0:34
retardedness. In about 45 minutes on a
- 0:37
random Wednesday, Knight Capital, who at
- 0:39
one time was responsible for 10% of all
- 0:41
stock trading happening in the United
- 0:43
States, lost $440 million, and 4 months
- 0:46
later was sold for parts. In today's
- 0:48
video, we'll look into what caused the
- 0:50
most expensive software bug in history
- 0:52
and learn how to lose $10 million in a
- 0:53
minute with this one weird trick. It is
- 0:55
August 27th, 2026, and you're watching
- 0:58
The Code Report. In 2012, while the rest
- 1:00
of us were planking on gas station roofs
- 1:02
and awaiting the Mayan apocalypse,
- 1:04
Knight Capital was quietly operating as
- 1:06
the biggest market maker on Wall Street
- 1:08
as it processed $20 billion in trades
- 1:10
every day. If you remember back to the
- 1:12
GameStop Robinhood saga from a few years
- 1:14
ago, Knight Capital was basically the
- 1:16
Citadel of its time. Whenever an ape
- 1:18
like you or me would buy a stock from a
- 1:19
brokerage like E*TRADE, the brokerage
- 1:21
didn't actually execute the trade
- 1:23
themselves. Instead, they'd often pass
- 1:25
it off to Knight, who would fill the
- 1:26
order and pocket the spread. At its core
- 1:28
was a system called SMARS, which was an
- 1:31
order router that took large orders and
- 1:33
chopped them up into smaller orders to
- 1:35
fill them across the market at the best
- 1:37
prices. It was fast, reliable, and more
- 1:39
importantly, it printed money for over a
- 1:41
decade. Then, in the summer of 2012, the
- 1:43
New York Stock Exchange decided it was
- 1:45
sick of watching firms like Knight skim
- 1:47
off all the retail orders before they
- 1:49
ever reached the actual exchange. So, it
- 1:51
created something called the retail
- 1:53
liquidity program, which was essentially
- 1:55
its own version of Knight's business
- 1:56
model designed to get orders back with
- 1:58
slightly better prices. The SEC approved


