The latest trading snafu on Wall Street delivered what looked like a death blow to Knight Capital (NYSE: KCG) after its new trading software went berserk and embarked upon a buying spree that was so much more than the company had bargained for.

Goldman Sachs (NYSE: GS) swooped in to save the day, but now Knight must pay the piper: According to trade settlement rules, the beleaguered market maker must come up with the $440 million Goldman is charging for the rescue by Wednesday. As of today, it looks like that just may happen.

Wonky software woes
Knight isn't the only one to have incurred multimillion-dollar losses due to possessed trading software. UBS is blaming Nasdaq's buggy computer system for causing the bank's loss of $356 million during the Facebook IPO in May, even though its own trading software also malfunctioned.  But while UBS' loss won't dent the Swiss behemoth's balance sheet, Knight's loss overwhelmed its own -- cash on hand was estimated to be just a smidge over UBS' loss, or around $365 million late last week.

Knight was able to beg funding from JPMorgan Chase (NYSE: JPM), Bank of America (NYSE: BAC), and US Bancorp (NYSE: USB) in order to stay afloat going into the weekend. Knight hired Goldman and Sandler O'Neill to help it look for investors -- or, if necessary, to engineer a buyout. Weekend negotiations produced a $400 million funding agreement from investors Blackstone, Stifel Nicolaus, Jefferies Group, and TD AMERITRADE -- not a moment too soon.

Fool's take
Though this new lifeline means that Knight can continue to function, at least in the near term, the price is steep indeed. The group of investors now owns three-quarters of Knight, and the value of shares has plummeted -- from approximately $10 early last week to a measly $3.30 currently. (The investors also have the option to purchase more shares at $1.50.)

The Internet investing community has been abuzz with editorials predicting that this newest gaffe will hurt the stock market overall, causing investors to flee. Others are less pessimistic, opining that investors know better, and that the problem affects traders more than investors, anyway. In this case, at least, I would side with the second opinion, since it seems obvious that the only parties smarting here are Knight Capital and its stockholders.

Will this rescue plan do the trick? Only time will tell. The banks involved in the pre-weekend bailout were obviously not interested in a piece of Knight, though any or all might be interested in taking over the firm if the price was right, or may prefer scooping up sections if the company declares bankruptcy.

Despite its eleventh-hour save, Knight faces some pretty dark days as it tries to win back business. Meanwhile, the company must endure scrutiny from the SEC, and may well find itself on the receiving end of lawsuits from shareholders who saw their money evaporate over one weekend.

Upsets like the Knight Capital fiasco show how opportunities arise even out of chaos -- and firms like Bank of America will be right there to grab some of the spoils. Let me invite you to take a detailed look at one of the most popular banks on the board with our premium report, which gives a comprehensive look at B of A's risks, as well as opportunities for growth -- and comes with one full year of updates. Interested? Click here for access.