It takes two to make a trade, and in the world of investing if one side's losing the other side's winning. JPMorgan Chase's (NYSE: JPM) now infamous trading loss in the derivatives market has cost the bank at least $2 billion dollars, with some estimates reaching as high as $5 billion. So if JPMorgan is losing all that money, it stands to reason someone else is making it.

Here's a look at two banks we know for sure are making out like bandits on the deal, as well as the story behind the trade as we know it so far.

Yes, I'd like all of my eggs in one basket, please
Bruno Iksil, a trader working in the bank's London office, placed a massive bet in the derivatives market. Derivatives "derive" their value from the value of an underlying asset, like stocks, bonds, currencies, or a market index. The specific type of derivative used in Iksil's bet was a credit default swap index, known as "CDX.NA.IG.9."

CDX.NA.IG.9 tracks a basket of corporate bonds. Iksil's positions on the index were so big (one report put it at $100 billion) that they were moving the market and interfering with other traders' positions. These annoyed traders -- hedge-fund managers -- dubbed Iksil "the London Whale" for his outsize bets.

JPMorgan CEO Jamie Dimon initially wrote off the complaints as "a tempest in a teapot," but as these hedge funds began betting against Iksil's positions, the losses began to mount dramatically, and Dimon finally had to speak up. He initially reported the bank's losses on Iksil's bets to be $2 billion, with the possibility of them reaching $3 billion.

Analysts for rival Morgan-Stanley (NYSE: MS) are now estimating they could go as high as $5 billion. Whether JPMorgan's positions on CDX.NA.IG.9 amounted to $100 billion or not, they had to be big enough to lose at least $2 billion in the space of weeks. So, who's on the other side?

Thar she blows!
For starters, hedge funds. They were the first to spot the London Whale, so it makes sense they're in the game for a large chunk of the winnings. The Wall Street Journal is reporting specifically that each of five or more hedge funds stand to make $50 million each at JPMorgan's expense.

Otherwise, it's banks -- about a dozen of them, with the biggest names being Goldman Sachs (NYSE: GS) and Bank of America (NYSE: BAC). Together, these banks could score between $500 million to $1 billion on trades that go directly head-to-head with JPMorgan's chief investment office, ground zero for the bank's massive derivatives bets.

But not every bank that came into contact with Iksil's bets is walking away with big profits. The Wall Street Journal is reporting that Citigroup (NYSE: C) is one such example. A spokesperson for the bank said that no large gains were made in its dealing with JPMorgan's chief investment office.

Nauseatingly complex
Why all the guessing and estimating when it comes to this trading blunder? First of all, it's in JPMorgan's best interests to say as little as possible about trade specifics. The more people know about the trades, the easier it is to take counter positions, positions that could send JPMorgan's losses even higher.

Also, the bank's bets are so big and so complicated, they will naturally take time to unwind. When Dimon himself finally saw the exact positions the CIO had taken, he's reported to have said they made him "queasy."

And by virtue of the sheer amount of money it has in CDX.NA.IG.9, JPMorgan has practically become the derivatives market -- at least that corner of it. As such, any moves it makes to get out reveals its positions even further, increasing the bank's risk of losses. In the end, the longer JPMorgan can wait to get out its positions, the the better. And being so big, JPMorgan can probably afford to wait out its positions longer than all but the biggest hedge funds and banks that are counter betting.

Stay tuned for even more winners and losers
But the Tale of the London Whale isn't over yet. As JPMorgan Chase slowly unwinds it's positions, keep your eye, of course, on Goldman Sachs and Bank of America -- especially as they deliver their next quarterly reports. See if what are very likely paper gains right now translate into cash on the balance sheet.

But also keep your investing antenna up for more winners and losers to emerge from this debacle, as details about the trade continue to come to light. There's still a lot of money riding around out there, and no matter how careful JPMorgan is in unwinding its positions, and how long it waits (and even JPMorgan can't wait forever), there will likely continue to be further losses on its part.

While you're waiting to see how the Tale of the London Whale ends, learn about some delightfully straightforward bank stocks, including one Warren Buffett could have loved in his earlier years, in our special free report: "The Stocks Only the Smartest Investors Are Buying." Take a minute and download your copy while it's still available