Fireship · @fireship

The most expensive software bug in history...

Uploaded August 27, 2026 · Length 5:19

The most expensive software bug in history...

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.

  1. 0:00

    It seems like every week now we're

  2. 0:01

    seeing security incidents happening that

  3. 0:03

    would have made mainstream news just a

  4. 0:04

    few years ago. The big ones lately have

  5. 0:07

    been the North Korean hackers who Trojan

  6. 0:09

    horse tapped the JavaScript ecosystem,

  7. 0:11

    the OpenAI model that committed a felony

  8. 0:13

    to get answers to a benchmark, and that

  9. 0:15

    time Anthropic accidentally open-sourced

  10. 0:17

    Claude code at 4:00 a.m. via an NPM

  11. 0:19

    source map. But, sometimes it's good to

  12. 0:21

    remember that even before AI, the

  13. 0:23

    software has always been held together

  14. 0:25

    with duct tape and the poverty of

  15. 0:26

    open-source maintainers. And there's no

  16. 0:28

    better example of this than the damage

  17. 0:30

    one company managed to do to itself 14

  18. 0:32

    years ago this month with organic human

  19. 0:34

    retardedness. In about 45 minutes on a

  20. 0:37

    random Wednesday, Knight Capital, who at

  21. 0:39

    one time was responsible for 10% of all

  22. 0:41

    stock trading happening in the United

  23. 0:43

    States, lost $440 million, and 4 months

  24. 0:46

    later was sold for parts. In today's

  25. 0:48

    video, we'll look into what caused the

  26. 0:50

    most expensive software bug in history

  27. 0:52

    and learn how to lose $10 million in a

  28. 0:53

    minute with this one weird trick. It is

  29. 0:55

    August 27th, 2026, and you're watching

  30. 0:58

    The Code Report. In 2012, while the rest

  31. 1:00

    of us were planking on gas station roofs

  32. 1:02

    and awaiting the Mayan apocalypse,

  33. 1:04

    Knight Capital was quietly operating as

  34. 1:06

    the biggest market maker on Wall Street

  35. 1:08

    as it processed $20 billion in trades

  36. 1:10

    every day. If you remember back to the

  37. 1:12

    GameStop Robinhood saga from a few years

  38. 1:14

    ago, Knight Capital was basically the

  39. 1:16

    Citadel of its time. Whenever an ape

  40. 1:18

    like you or me would buy a stock from a

  41. 1:19

    brokerage like E*TRADE, the brokerage

  42. 1:21

    didn't actually execute the trade

  43. 1:23

    themselves. Instead, they'd often pass

  44. 1:25

    it off to Knight, who would fill the

  45. 1:26

    order and pocket the spread. At its core

  46. 1:28

    was a system called SMARS, which was an

  47. 1:31

    order router that took large orders and

  48. 1:33

    chopped them up into smaller orders to

  49. 1:35

    fill them across the market at the best

  50. 1:37

    prices. It was fast, reliable, and more

  51. 1:39

    importantly, it printed money for over a

  52. 1:41

    decade. Then, in the summer of 2012, the

  53. 1:43

    New York Stock Exchange decided it was

  54. 1:45

    sick of watching firms like Knight skim

  55. 1:47

    off all the retail orders before they

  56. 1:49

    ever reached the actual exchange. So, it

  57. 1:51

    created something called the retail

  58. 1:53

    liquidity program, which was essentially

  59. 1:55

    its own version of Knight's business

  60. 1:56

    model designed to get orders back with

  61. 1:58

    slightly better prices. The SEC approved