# One Missed Update: How Knight Capital Lost $460 Million

> One server missed an update, and old code from 2003 woke up. Here is what the SEC found about Knight Capital's 45 minutes on August 1, 2012.

*2026-11-02T13:42:58Z*

# One Missed Update: How Knight Capital Lost $460 Million

On August 1, 2012, a US trading firm called Knight Capital deployed new code to eight servers and missed one. About 45 minutes after the market opened, it was holding billions of dollars of stock it never meant to buy or sell, and it ultimately lost more than $460 million. This is the story as the US Securities and Exchange Commission (SEC) documented it.

## In 60 seconds (the video)

1. **One server missed an update.** It ended up costing the company over $460 million.
2. **Eight servers, seven updated.** Knight pushed new code and forgot one.
3. **97 error emails.** From about 8:01 a.m. the system sent them. Nobody treated them as alerts.
4. **9:30, the market opens.** Server eight wakes up code abandoned since 2003.
5. **The code doesn't know the word "done".** The order fills, and it keeps sending more.
6. **About 1,500 trades a second, on average.** And no plan to stop it.
7. **The fix made it worse.** The team pulled the new code from the seven healthy servers.
8. **45 minutes.** Not a hacker. Old code nobody deleted, and a server nobody checked.

## What actually happened

Knight's automated order router was called SMARS. It took an incoming order, the "parent", and sent smaller "child" orders to the market until the parent was filled.

To join a new New York Stock Exchange program for retail orders, which started on August 1, Knight wrote new code for SMARS. That code was meant to replace an old, unused feature called **Power Peg**, and it reused the flag that used to switch Power Peg on.

Three old decisions were waiting:

- **2003:** Knight stopped using Power Peg but left the code on its production servers.
- **2005:** Knight moved the part of the code that counted filled shares, the part that told Power Peg to stop. It did not retest Power Peg afterwards.
- **July 27, 2012 onward:** the new code went out in stages. One technician did not copy it to one of the eight servers. No second technician reviewed the deployment, and no written procedure required one.

So on the morning of August 1, seven servers read the flag as the new feature. The eighth read it as Power Peg.

## The warning nobody read

From about 8:01 a.m., an internal system sent automated emails that mentioned SMARS and the error "Power Peg disabled". 97 of them went out before the 9:30 a.m. open. They were not designed as system alerts, and staff generally did not review them when they arrived. The SEC notes they gave Knight a potential chance to find the problem before the market opened.

## 45 minutes

For 212 small retail orders, the eighth server sent millions of child orders. Because the counting function had moved, it kept sending without regard to how many shares had already been filled.

| What the SEC recorded | Number |
|---|---|
| Incoming orders that triggered it | 212 |
| Executions | Over 4 million |
| Stocks | 154 |
| Shares | More than 397 million |
| Time | About 45 minutes |
| Net long position | About $3.5 billion in 80 stocks |
| Net short position | About $3.15 billion in 74 stocks |
| Ultimate loss | Over $460 million |

Two numbers need care:

- **$460 million is the eventual loss** on those positions, not a per-minute rate and not money that vanished at the moment of the deploy.
- **1,500 trades a second is an average.** It is our arithmetic, not an SEC figure: about 4 million executions over about 45 minutes comes to roughly 1,500 a second.

## The fix that made it worse

During the incident, Knight removed the new code from the seven servers where it had been deployed correctly. That worsened the problem: more incoming orders activated Power Peg. Knight also had no procedures to halt SMARS when it misbehaved, and no control comparing the orders leaving SMARS with those entering it.

## What the SEC did

In an order dated October 16, 2013, the SEC found that Knight had violated the rule requiring brokers to control the risks of their market access. Knight settled without admitting or denying the findings, agreed to pay a $12 million penalty, and undertook to hire an independent consultant to review its procedures and controls.

## What to take to your own deploys

- **Delete code you don't use.** Dead code still runs if something calls it.
- **Never reuse a flag** that used to mean something else.
- **Verify every server after a deploy**, automatically, instead of trusting the process.
- **Decide what an alert is.** An error email nobody reads is not monitoring.
- **Keep a written stop plan**, and know whether a rollback could make things worse.

The code you don't use? Delete it, before it deletes you.

## FAQ

### Did Knight Capital lose $460 million per minute or in one instant?
No. The orders ran for about 45 minutes and left Knight holding unwanted positions. The loss of over $460 million is what those positions ultimately cost.

### Was it a hacker?
No. The SEC describes a deployment error and old code left on a production server, not an attack.

### Is 1,500 trades a second an exact figure?
No. It is an average: about 4 million executions divided by about 45 minutes comes to roughly 1,500 a second.

## Sources

- [SEC press release 2013-222](https://www.sec.gov/newsroom/press-releases/2013-222): the charges and the loss of more than $460 million.
- [SEC administrative order, Release No. 70694 (October 16, 2013)](https://www.sec.gov/litigation/admin/2013/34-70694.pdf): the deployment, Power Peg, the emails, the numbers, the controls and the undertakings. Every fact above comes from this order, except the per-second average, which we calculated from it.

## Next steps

- [What Is Null in Programming? The Billion-Dollar Mistake](https://fadymondy.com/en/blog/what-is-null)
- [What Is a Variable in Programming?](https://fadymondy.com/en/blog/what-is-a-variable)

---

Source: https://fadymondy.com/en/blog/knight-capital-460-million-bug
