DEV Community

Phuoc Nguyen Dang
Phuoc Nguyen Dang

Posted on • Originally published at youtube.com

Dead Code Destroyed a $1.5B Company in 45 Minutes — Knight Capital

On August 1, 2012, Knight Capital lost $440 million in 45 minutes. Not from a hack. From a deployment error.

Dead code from 2003 woke up because one server out of eight missed an update. The deployment script failed silently and reported success.

Four lessons every engineering leader should internalize:

  1. Dead code is not inert. Power Peg sat dormant for 8 years. A 2005 refactoring silently broke it. When it accidentally triggered in 2012, it sent orders in an infinite loop — buying high, selling low, thousands per second.

  2. Silent failures are the most dangerous failures. The SSH deployment script skipped a server and said everything was fine. 97 warning emails went out before market open. They looked like routine notifications. Nobody read them.

  3. Every system that can lose money needs a kill switch. Knight had none. When engineers tried to stop the bleeding, they panicked and removed the working code from the good servers — making it worse.

  4. No single decision was catastrophic. Don't delete old code. Reuse a free flag bit. Deploy manually. Skip verification. Each one was reasonable. Together: $440 million in 45 minutes.

CEO Thomas Joyce went on live TV hours later: "Knight Capital Group screwed up. We screwed up." He raised $400M over a weekend to save the company — giving up 73% ownership.

The company survived. Barely. It was acquired within a year.

Every team shipping code today faces the same pressures. Knight Capital is why CI/CD, kill switches, and infrastructure-as-code aren't best practices — they're survival strategies.

Full story on CodeLore: https://www.youtube.com/watch?v=JJTWt0ekufI

Top comments (0)